[java-server-msf4j] fix and upgrade (#2303)

This commit is contained in:
Vincent Devos 2019-03-07 08:59:32 +01:00 committed by William Cheng
parent e810848a03
commit 49ef024cf6
55 changed files with 1400 additions and 292 deletions

View File

@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/MSF4J -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ -DhideGenerationTimestamp=true --additional-properties artifactId=swagger-msf4j-server $@"
ags="generate -t modules/openapi-generator/src/main/resources/MSF4J -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ -DhideGenerationTimestamp=true --additional-properties artifactId=java-msf4j-server $@"
echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main"
rm -rf samples/server/petstore/java-msf4j/src/main

View File

@ -16,6 +16,7 @@ declare -a scripts=(
"./bin/ruby-client-petstore.sh"
"./bin/java-petstore-all.sh"
"./bin/java-jaxrs-petstore-server-all.sh"
"./bin/java-msf4j-petstore-server.sh"
"./bin/openapi3/jaxrs-jersey-petstore.sh"
"./bin/spring-all-pestore.sh"
"./bin/javascript-petstore-all.sh"

View File

@ -18,12 +18,12 @@ mvn package
for build jar, then start your server:
```
java -jar target/micro-service-server-1.0.0.jar
java -jar target/{{artifactId}}-{{artifactVersion}}.jar
```
Java Microservice listening on default port 8080.
Run the following command or simply go to http://127.0.0.1:8080/pet/12 from your browser:
Java Microservice listening on default port 9090.
Run the following command or simply go to http://127.0.0.1:9090/pet/12 from your browser:
```
curl http://127.0.0.1:8080/pet/12
curl http://127.0.0.1:9090/pet/12
```

View File

@ -2,7 +2,7 @@
<parent>
<groupId>org.wso2.msf4j</groupId>
<artifactId>msf4j-service</artifactId>
<version>2.0.0</version>
<version>2.6.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>{{groupId}}</groupId>
@ -19,7 +19,7 @@
<configuration>
<archive>
<manifest>
<mainClass>io.swagger.api.Application</mainClass>
<mainClass>org.openapitools.api.Application</mainClass>
</manifest>
</archive>
</configuration>
@ -54,13 +54,18 @@
<dependency>
<groupId>org.wso2.msf4j</groupId>
<artifactId>msf4j-all</artifactId>
<version>2.0.0</version>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.4.1</version>
</dependency>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson-version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
@ -75,13 +80,8 @@
<java.version>{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<swagger-core-version>1.5.18</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<jersey2-version>2.22.2</jersey2-version>
<junit-version>4.12</junit-version>
<logback-version>1.1.7</logback-version>
<servlet-api-version>2.5</servlet-api-version>
<jersey2-version>2.22.2</jersey2-version>
<jackson-version>2.8.9</jackson-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -1 +1 @@
3.2.0-SNAPSHOT
4.0.0-SNAPSHOT

View File

@ -1,7 +1,7 @@
# Swagger MSF4J generated server
# OpenAPI MSF4J generated server
WSO2 Microservices Framework for Java (MSF4J) is a lightweight high performance framework for developing & running microservices. WSO2 MSF4J is one of the highest performing lightweight Java microservices frameworks. Now swagger code generator will generate micro service skeleton from swagger definition. So you can use this project to convert your swagger definitions to micro service quickly. With this approach you can develop complete micro service within seconds from your swagger definition.
WSO2 Microservices Framework for Java (MSF4J) is a lightweight high performance framework for developing & running microservices. WSO2 MSF4J is one of the highest performing lightweight Java microservices frameworks. Now openapi-generator will generate micro service skeleton from OpenAPI definition. So you can use this project to convert your OpenAPI definitions to micro service quickly. With this approach you can develop complete micro service within seconds from your OpenAPI definition.
MSF4J generator uses java-msf4j as the default library.
Before you build/run service replace .deploy(new PetApi()) with your actual service class name in Application.java file like .deploy(new ApisAPI()) then it will start that service. If you have multiple service classes add them in , separated manner.
@ -18,12 +18,12 @@ mvn package
for build jar, then start your server:
```
java -jar target/micro-service-server-1.0.0.jar
java -jar target/java-msf4j-server-1.0.0.jar
```
Java Microservice listening on default port 8080.
Run the following command or simply go to http://127.0.0.1:8080/pet/12 from your browser:
Java Microservice listening on default port 9090.
Run the following command or simply go to http://127.0.0.1:9090/pet/12 from your browser:
```
curl http://127.0.0.1:8080/pet/12
curl http://127.0.0.1:9090/pet/12
```

View File

@ -2,13 +2,13 @@
<parent>
<groupId>org.wso2.msf4j</groupId>
<artifactId>msf4j-service</artifactId>
<version>2.0.0</version>
<version>2.6.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>swagger-msf4j-server</artifactId>
<artifactId>java-msf4j-server</artifactId>
<packaging>jar</packaging>
<name>swagger-msf4j-server</name>
<name>java-msf4j-server</name>
<version>1.0.0</version>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
@ -19,7 +19,7 @@
<configuration>
<archive>
<manifest>
<mainClass>io.swagger.api.Application</mainClass>
<mainClass>org.openapitools.api.Application</mainClass>
</manifest>
</archive>
</configuration>
@ -54,13 +54,18 @@
<dependency>
<groupId>org.wso2.msf4j</groupId>
<artifactId>msf4j-all</artifactId>
<version>2.0.0</version>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.4.1</version>
</dependency>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson-version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
@ -75,13 +80,8 @@
<java.version>1.7</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<swagger-core-version>1.5.18</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<jersey2-version>2.22.2</jersey2-version>
<junit-version>4.12</junit-version>
<logback-version>1.1.7</logback-version>
<servlet-api-version>2.5</servlet-api-version>
<jersey2-version>2.22.2</jersey2-version>
<jackson-version>2.8.9</jackson-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -37,9 +37,9 @@ public class AnotherFakeApi {
@io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) Client client
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) Client body
)
throws NotFoundException {
return delegate.call123testSpecialTags(client);
return delegate.call123testSpecialTags(body);
}
}

View File

@ -18,6 +18,6 @@ import javax.ws.rs.core.SecurityContext;
public abstract class AnotherFakeApiService {
public abstract Response call123testSpecialTags(Client client
public abstract Response call123testSpecialTags(Client body
) throws NotFoundException;
}

View File

@ -16,6 +16,7 @@ import java.util.Map;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
import org.openapitools.model.XmlItem;
import java.util.List;
import org.openapitools.api.NotFoundException;
@ -38,6 +39,18 @@ import javax.ws.rs.*;
public class FakeApi {
private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi();
@POST
@Path("/create_xml_item")
@Consumes({ "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" })
@io.swagger.annotations.ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) XmlItem xmlItem
)
throws NotFoundException {
return delegate.createXmlItem(xmlItem);
}
@POST
@Path("/outer/boolean")
@ -57,10 +70,10 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) })
public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) OuterComposite outerComposite
public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) OuterComposite body
)
throws NotFoundException {
return delegate.fakeOuterCompositeSerialize(outerComposite);
return delegate.fakeOuterCompositeSerialize(body);
}
@POST
@Path("/outer/number")
@ -93,10 +106,10 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) FileSchemaTestClass fileSchemaTestClass
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) FileSchemaTestClass body
)
throws NotFoundException {
return delegate.testBodyWithFileSchema(fileSchemaTestClass);
return delegate.testBodyWithFileSchema(body);
}
@PUT
@Path("/body-with-query-params")
@ -106,10 +119,10 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithQueryParams(@ApiParam(value = "",required=true) @QueryParam("query") String query
,@ApiParam(value = "" ,required=true) User user
,@ApiParam(value = "" ,required=true) User body
)
throws NotFoundException {
return delegate.testBodyWithQueryParams(query,user);
return delegate.testBodyWithQueryParams(query,body);
}
@PATCH
@ -118,10 +131,10 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(@ApiParam(value = "client model" ,required=true) Client client
public Response testClientModel(@ApiParam(value = "client model" ,required=true) Client body
)
throws NotFoundException {
return delegate.testClientModel(client);
return delegate.testClientModel(body);
}
@POST
@ -134,22 +147,22 @@ public class FakeApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response testEndpointParameters(@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("number") BigDecimal number
,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("double") Double _double
,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("pattern_without_delimiter") String patternWithoutDelimiter
,@ApiParam(value = "None", required=true, defaultValue="null") @DefaultValue("null") @FormParam("byte") byte[] _byte
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("integer") Integer integer
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("int32") Integer int32
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("int64") Long int64
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("float") Float _float
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("string") String string
public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number
,@ApiParam(value = "None", required=true) @FormParam("double") Double _double
,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter
,@ApiParam(value = "None", required=true) @FormParam("byte") byte[] _byte
,@ApiParam(value = "None") @FormParam("integer") Integer integer
,@ApiParam(value = "None") @FormParam("int32") Integer int32
,@ApiParam(value = "None") @FormParam("int64") Long int64
,@ApiParam(value = "None") @FormParam("float") Float _float
,@ApiParam(value = "None") @FormParam("string") String string
,
@FormDataParam("binary") InputStream binaryInputStream,
@FormDataParam("binary") FileInfo binaryDetail
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("date") Date date
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("dateTime") Date dateTime
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("password") String password
,@ApiParam(value = "None", defaultValue="null") @DefaultValue("null") @FormParam("callback") String paramCallback
,@ApiParam(value = "None") @FormParam("date") Date date
,@ApiParam(value = "None") @FormParam("dateTime") Date dateTime
,@ApiParam(value = "None") @FormParam("password") String password
,@ApiParam(value = "None") @FormParam("callback") String paramCallback
)
throws NotFoundException {
return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binaryInputStream, binaryDetail,date,dateTime,password,paramCallback);
@ -163,9 +176,9 @@ public class FakeApi {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) })
public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray
public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $", defaultValue="new ArrayList<String>()")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray
,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString
,@ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $") @QueryParam("enum_query_string_array") List<String> enumQueryStringArray
,@ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $", defaultValue="new ArrayList<String>()") @DefaultValue("new ArrayList<String>()") @QueryParam("enum_query_string_array") List<String> enumQueryStringArray
,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString
,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger
,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble
@ -175,6 +188,23 @@ public class FakeApi {
throws NotFoundException {
return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString);
}
@DELETE
@io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) })
public Response testGroupParameters(@ApiParam(value = "Required String in group parameters",required=true) @QueryParam("required_string_group") Integer requiredStringGroup
,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup
,@ApiParam(value = "Required Integer in group parameters",required=true) @QueryParam("required_int64_group") Long requiredInt64Group
,@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup
,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup
,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group
)
throws NotFoundException {
return delegate.testGroupParameters(requiredStringGroup,requiredBooleanGroup,requiredInt64Group,stringGroup,booleanGroup,int64Group);
}
@POST
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })
@ -182,10 +212,10 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) Map<String, String> requestBody
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) Map<String, String> param
)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(requestBody);
return delegate.testInlineAdditionalProperties(param);
}
@GET
@Path("/jsonFormData")
@ -194,8 +224,8 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testJsonFormData(@ApiParam(value = "field1", required=true, defaultValue="null") @DefaultValue("null") @FormParam("param") String param
,@ApiParam(value = "field2", required=true, defaultValue="null") @DefaultValue("null") @FormParam("param2") String param2
public Response testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param
,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2
)
throws NotFoundException {
return delegate.testJsonFormData(param,param2);
@ -216,7 +246,7 @@ public class FakeApi {
,
@FormDataParam("requiredFile") InputStream requiredFileInputStream,
@FormDataParam("requiredFile") FileInfo requiredFileDetail
,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata
,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata
)
throws NotFoundException {
return delegate.uploadFileWithRequiredFile(petId,requiredFileInputStream, requiredFileDetail,additionalMetadata);

View File

@ -15,6 +15,7 @@ import java.util.Map;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
import org.openapitools.model.XmlItem;
import java.util.List;
import org.openapitools.api.NotFoundException;
@ -26,20 +27,22 @@ import javax.ws.rs.core.SecurityContext;
public abstract class FakeApiService {
public abstract Response createXmlItem(XmlItem xmlItem
) throws NotFoundException;
public abstract Response fakeOuterBooleanSerialize(Boolean body
) throws NotFoundException;
public abstract Response fakeOuterCompositeSerialize(OuterComposite outerComposite
public abstract Response fakeOuterCompositeSerialize(OuterComposite body
) throws NotFoundException;
public abstract Response fakeOuterNumberSerialize(BigDecimal body
) throws NotFoundException;
public abstract Response fakeOuterStringSerialize(String body
) throws NotFoundException;
public abstract Response testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass
public abstract Response testBodyWithFileSchema(FileSchemaTestClass body
) throws NotFoundException;
public abstract Response testBodyWithQueryParams(String query
,User user
,User body
) throws NotFoundException;
public abstract Response testClientModel(Client client
public abstract Response testClientModel(Client body
) throws NotFoundException;
public abstract Response testEndpointParameters(BigDecimal number
,Double _double
@ -65,7 +68,14 @@ public abstract class FakeApiService {
,List<String> enumFormStringArray
,String enumFormString
) throws NotFoundException;
public abstract Response testInlineAdditionalProperties(Map<String, String> requestBody
public abstract Response testGroupParameters(Integer requiredStringGroup
,Boolean requiredBooleanGroup
,Long requiredInt64Group
,Integer stringGroup
,Boolean booleanGroup
,Long int64Group
) throws NotFoundException;
public abstract Response testInlineAdditionalProperties(Map<String, String> param
) throws NotFoundException;
public abstract Response testJsonFormData(String param
,String param2

View File

@ -39,9 +39,9 @@ public class FakeClassnameTestApi {
}, tags={ "fake_classname_tags 123#$%^", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClassname(@ApiParam(value = "client model" ,required=true) Client client
public Response testClassname(@ApiParam(value = "client model" ,required=true) Client body
)
throws NotFoundException {
return delegate.testClassname(client);
return delegate.testClassname(body);
}
}

View File

@ -18,6 +18,6 @@ import javax.ws.rs.core.SecurityContext;
public abstract class FakeClassnameTestApiService {
public abstract Response testClassname(Client client
public abstract Response testClassname(Client body
) throws NotFoundException;
}

View File

@ -44,10 +44,10 @@ public class PetApi {
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
)
throws NotFoundException {
return delegate.addPet(pet);
return delegate.addPet(body);
}
@DELETE
@Path("/{petId}")
@ -81,7 +81,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold", defaultValue="new ArrayList<String>()") @DefaultValue("new ArrayList<String>()") @QueryParam("status") List<String> status
)
throws NotFoundException {
return delegate.findPetsByStatus(status);
@ -100,7 +100,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags
public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true, defaultValue="new ArrayList<String>()") @DefaultValue("new ArrayList<String>()") @QueryParam("tags") List<String> tags
)
throws NotFoundException {
return delegate.findPetsByTags(tags);
@ -139,10 +139,10 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
)
throws NotFoundException {
return delegate.updatePet(pet);
return delegate.updatePet(body);
}
@POST
@Path("/{petId}")
@ -157,8 +157,8 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId
,@ApiParam(value = "Updated name of the pet", defaultValue="null") @DefaultValue("null") @FormParam("name") String name
,@ApiParam(value = "Updated status of the pet", defaultValue="null") @DefaultValue("null") @FormParam("status") String status
,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
)
throws NotFoundException {
return delegate.updatePetWithForm(petId,name,status);
@ -176,7 +176,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata
,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata
,
@FormDataParam("file") InputStream fileInputStream,
@FormDataParam("file") FileInfo fileDetail

View File

@ -20,7 +20,7 @@ import javax.ws.rs.core.SecurityContext;
public abstract class PetApiService {
public abstract Response addPet(Pet pet
public abstract Response addPet(Pet body
) throws NotFoundException;
public abstract Response deletePet(Long petId
,String apiKey
@ -31,7 +31,7 @@ public abstract class PetApiService {
) throws NotFoundException;
public abstract Response getPetById(Long petId
) throws NotFoundException;
public abstract Response updatePet(Pet pet
public abstract Response updatePet(Pet body
) throws NotFoundException;
public abstract Response updatePetWithForm(Long petId
,String name

View File

@ -83,9 +83,9 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order order
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body
)
throws NotFoundException {
return delegate.placeOrder(order);
return delegate.placeOrder(body);
}
}

View File

@ -24,6 +24,6 @@ public abstract class StoreApiService {
public abstract Response getInventory() throws NotFoundException;
public abstract Response getOrderById(Long orderId
) throws NotFoundException;
public abstract Response placeOrder(Order order
public abstract Response placeOrder(Order body
) throws NotFoundException;
}

View File

@ -38,10 +38,10 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUser(@ApiParam(value = "Created user object" ,required=true) User user
public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body
)
throws NotFoundException {
return delegate.createUser(user);
return delegate.createUser(body);
}
@POST
@Path("/createWithArray")
@ -50,10 +50,10 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<User> user
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
)
throws NotFoundException {
return delegate.createUsersWithArrayInput(user);
return delegate.createUsersWithArrayInput(body);
}
@POST
@Path("/createWithList")
@ -62,10 +62,10 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<User> user
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
)
throws NotFoundException {
return delegate.createUsersWithListInput(user);
return delegate.createUsersWithListInput(body);
}
@DELETE
@Path("/{username}")
@ -133,9 +133,9 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
,@ApiParam(value = "Updated user object" ,required=true) User user
,@ApiParam(value = "Updated user object" ,required=true) User body
)
throws NotFoundException {
return delegate.updateUser(username,user);
return delegate.updateUser(username,body);
}
}

View File

@ -19,11 +19,11 @@ import javax.ws.rs.core.SecurityContext;
public abstract class UserApiService {
public abstract Response createUser(User user
public abstract Response createUser(User body
) throws NotFoundException;
public abstract Response createUsersWithArrayInput(List<User> user
public abstract Response createUsersWithArrayInput(List<User> body
) throws NotFoundException;
public abstract Response createUsersWithListInput(List<User> user
public abstract Response createUsersWithListInput(List<User> body
) throws NotFoundException;
public abstract Response deleteUser(String username
) throws NotFoundException;
@ -34,6 +34,6 @@ public abstract class UserApiService {
) throws NotFoundException;
public abstract Response logoutUser() throws NotFoundException;
public abstract Response updateUser(String username
,User user
,User body
) throws NotFoundException;
}

View File

@ -14,7 +14,7 @@ import io.swagger.annotations.ApiModelProperty;
public class Animal {
@JsonProperty("className")
private String className = null;
private String className;
@JsonProperty("color")
private String color = "red";

View File

@ -1,50 +0,0 @@
package org.openapitools.model;
import java.util.Objects;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.Animal;
/**
* AnimalFarm
*/
public class AnimalFarm extends ArrayList<Animal> {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AnimalFarm {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -12,22 +12,22 @@ import io.swagger.annotations.ApiModelProperty;
public class Capitalization {
@JsonProperty("smallCamel")
private String smallCamel = null;
private String smallCamel;
@JsonProperty("CapitalCamel")
private String capitalCamel = null;
private String capitalCamel;
@JsonProperty("small_Snake")
private String smallSnake = null;
private String smallSnake;
@JsonProperty("Capital_Snake")
private String capitalSnake = null;
private String capitalSnake;
@JsonProperty("SCA_ETH_Flow_Points")
private String scAETHFlowPoints = null;
private String scAETHFlowPoints;
@JsonProperty("ATT_NAME")
private String ATT_NAME = null;
private String ATT_NAME;
public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel;

View File

@ -13,7 +13,7 @@ import org.openapitools.model.Animal;
public class Cat extends Animal {
@JsonProperty("declawed")
private Boolean declawed = null;
private Boolean declawed;
public Cat declawed(Boolean declawed) {
this.declawed = declawed;

View File

@ -12,10 +12,10 @@ import io.swagger.annotations.ApiModelProperty;
public class Category {
@JsonProperty("id")
private Long id = null;
private Long id;
@JsonProperty("name")
private String name = null;
private String name = "default-name";
public Category id(Long id) {
this.id = id;
@ -44,7 +44,7 @@ public class Category {
* Get name
* @return name
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public String getName() {
return name;
}

View File

@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty;
public class ClassModel {
@JsonProperty("_class")
private String propertyClass = null;
private String propertyClass;
public ClassModel propertyClass(String propertyClass) {
this.propertyClass = propertyClass;

View File

@ -12,7 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
public class Client {
@JsonProperty("client")
private String client = null;
private String client;
public Client client(String client) {
this.client = client;

View File

@ -13,7 +13,7 @@ import org.openapitools.model.Animal;
public class Dog extends Animal {
@JsonProperty("breed")
private String breed = null;
private String breed;
public Dog breed(String breed) {
this.breed = breed;

View File

@ -46,7 +46,7 @@ public class EnumArrays {
}
@JsonProperty("just_symbol")
private JustSymbolEnum justSymbol = null;
private JustSymbolEnum justSymbol;
/**
* Gets or Sets arrayEnum

View File

@ -47,7 +47,7 @@ public class EnumTest {
}
@JsonProperty("enum_string")
private EnumStringEnum enumString = null;
private EnumStringEnum enumString;
/**
* Gets or Sets enumStringRequired
@ -83,7 +83,7 @@ public class EnumTest {
}
@JsonProperty("enum_string_required")
private EnumStringRequiredEnum enumStringRequired = null;
private EnumStringRequiredEnum enumStringRequired;
/**
* Gets or Sets enumInteger
@ -117,7 +117,7 @@ public class EnumTest {
}
@JsonProperty("enum_integer")
private EnumIntegerEnum enumInteger = null;
private EnumIntegerEnum enumInteger;
/**
* Gets or Sets enumNumber
@ -151,10 +151,10 @@ public class EnumTest {
}
@JsonProperty("enum_number")
private EnumNumberEnum enumNumber = null;
private EnumNumberEnum enumNumber;
@JsonProperty("outerEnum")
private OuterEnum outerEnum = null;
private OuterEnum outerEnum;
public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;

View File

@ -16,43 +16,43 @@ import java.util.UUID;
public class FormatTest {
@JsonProperty("integer")
private Integer integer = null;
private Integer integer;
@JsonProperty("int32")
private Integer int32 = null;
private Integer int32;
@JsonProperty("int64")
private Long int64 = null;
private Long int64;
@JsonProperty("number")
private BigDecimal number = null;
private BigDecimal number;
@JsonProperty("float")
private Float _float = null;
private Float _float;
@JsonProperty("double")
private Double _double = null;
private Double _double;
@JsonProperty("string")
private String string = null;
private String string;
@JsonProperty("byte")
private byte[] _byte = null;
private byte[] _byte;
@JsonProperty("binary")
private File binary = null;
private File binary;
@JsonProperty("date")
private Date date = null;
private Date date;
@JsonProperty("dateTime")
private Date dateTime = null;
private Date dateTime;
@JsonProperty("uuid")
private UUID uuid = null;
private UUID uuid;
@JsonProperty("password")
private String password = null;
private String password;
public FormatTest integer(Integer integer) {
this.integer = integer;
@ -271,7 +271,7 @@ public class FormatTest {
* Get uuid
* @return uuid
**/
@ApiModelProperty(value = "")
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
}

View File

@ -12,10 +12,10 @@ import io.swagger.annotations.ApiModelProperty;
public class HasOnlyReadOnly {
@JsonProperty("bar")
private String bar = null;
private String bar;
@JsonProperty("foo")
private String foo = null;
private String foo;
/**
* Get bar

View File

@ -9,7 +9,6 @@ import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.model.StringBooleanMap;
/**
* MapTest
@ -57,7 +56,7 @@ public class MapTest {
private Map<String, Boolean> directMap = null;
@JsonProperty("indirect_map")
private StringBooleanMap indirectMap = null;
private Map<String, Boolean> indirectMap = null;
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
@ -137,21 +136,29 @@ public class MapTest {
this.directMap = directMap;
}
public MapTest indirectMap(StringBooleanMap indirectMap) {
public MapTest indirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
return this;
}
public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) {
if (this.indirectMap == null) {
this.indirectMap = new HashMap<String, Boolean>();
}
this.indirectMap.put(key, indirectMapItem);
return this;
}
/**
* Get indirectMap
* @return indirectMap
**/
@ApiModelProperty(value = "")
public StringBooleanMap getIndirectMap() {
public Map<String, Boolean> getIndirectMap() {
return indirectMap;
}
public void setIndirectMap(StringBooleanMap indirectMap) {
public void setIndirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
}

View File

@ -18,10 +18,10 @@ import org.openapitools.model.Animal;
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private UUID uuid = null;
private UUID uuid;
@JsonProperty("dateTime")
private Date dateTime = null;
private Date dateTime;
@JsonProperty("map")
private Map<String, Animal> map = null;

View File

@ -13,10 +13,10 @@ import io.swagger.annotations.ApiModelProperty;
public class Model200Response {
@JsonProperty("name")
private Integer name = null;
private Integer name;
@JsonProperty("class")
private String propertyClass = null;
private String propertyClass;
public Model200Response name(Integer name) {
this.name = name;

View File

@ -12,13 +12,13 @@ import io.swagger.annotations.ApiModelProperty;
public class ModelApiResponse {
@JsonProperty("code")
private Integer code = null;
private Integer code;
@JsonProperty("type")
private String type = null;
private String type;
@JsonProperty("message")
private String message = null;
private String message;
public ModelApiResponse code(Integer code) {
this.code = code;

View File

@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty;
public class ModelReturn {
@JsonProperty("return")
private Integer _return = null;
private Integer _return;
public ModelReturn _return(Integer _return) {
this._return = _return;

View File

@ -13,16 +13,16 @@ import io.swagger.annotations.ApiModelProperty;
public class Name {
@JsonProperty("name")
private Integer name = null;
private Integer name;
@JsonProperty("snake_case")
private Integer snakeCase = null;
private Integer snakeCase;
@JsonProperty("property")
private String property = null;
private String property;
@JsonProperty("123Number")
private Integer _123number = null;
private Integer _123number;
public Name name(Integer name) {
this.name = name;

View File

@ -13,7 +13,7 @@ import java.math.BigDecimal;
public class NumberOnly {
@JsonProperty("JustNumber")
private BigDecimal justNumber = null;
private BigDecimal justNumber;
public NumberOnly justNumber(BigDecimal justNumber) {
this.justNumber = justNumber;

View File

@ -14,16 +14,16 @@ import java.util.Date;
public class Order {
@JsonProperty("id")
private Long id = null;
private Long id;
@JsonProperty("petId")
private Long petId = null;
private Long petId;
@JsonProperty("quantity")
private Integer quantity = null;
private Integer quantity;
@JsonProperty("shipDate")
private Date shipDate = null;
private Date shipDate;
/**
* Order Status
@ -59,7 +59,7 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status = null;
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;

View File

@ -13,13 +13,13 @@ import java.math.BigDecimal;
public class OuterComposite {
@JsonProperty("my_number")
private BigDecimal myNumber = null;
private BigDecimal myNumber;
@JsonProperty("my_string")
private String myString = null;
private String myString;
@JsonProperty("my_boolean")
private Boolean myBoolean = null;
private Boolean myBoolean;
public OuterComposite myNumber(BigDecimal myNumber) {
this.myNumber = myNumber;

View File

@ -17,13 +17,13 @@ import org.openapitools.model.Tag;
public class Pet {
@JsonProperty("id")
private Long id = null;
private Long id;
@JsonProperty("category")
private Category category = null;
@JsonProperty("name")
private String name = null;
private String name;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
@ -65,7 +65,7 @@ public class Pet {
}
@JsonProperty("status")
private StatusEnum status = null;
private StatusEnum status;
public Pet id(Long id) {
this.id = id;

View File

@ -12,10 +12,10 @@ import io.swagger.annotations.ApiModelProperty;
public class ReadOnlyFirst {
@JsonProperty("bar")
private String bar = null;
private String bar;
@JsonProperty("baz")
private String baz = null;
private String baz;
/**
* Get bar

View File

@ -12,7 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
public class SpecialModelName {
@JsonProperty("$special[property.name]")
private Long $specialPropertyName = null;
private Long $specialPropertyName;
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;

View File

@ -1,49 +0,0 @@
package org.openapitools.model;
import java.util.Objects;
import java.util.HashMap;
import java.util.Map;
/**
* StringBooleanMap
*/
public class StringBooleanMap extends HashMap<String, Boolean> {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return true;
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class StringBooleanMap {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -12,10 +12,10 @@ import io.swagger.annotations.ApiModelProperty;
public class Tag {
@JsonProperty("id")
private Long id = null;
private Long id;
@JsonProperty("name")
private String name = null;
private String name;
public Tag id(Long id) {
this.id = id;

View File

@ -0,0 +1,174 @@
package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* TypeHolderDefault
*/
public class TypeHolderDefault {
@JsonProperty("string_item")
private String stringItem = "what";
@JsonProperty("number_item")
private BigDecimal numberItem;
@JsonProperty("integer_item")
private Integer integerItem;
@JsonProperty("bool_item")
private Boolean boolItem = true;
@JsonProperty("array_item")
private List<Integer> arrayItem = new ArrayList<Integer>();
public TypeHolderDefault stringItem(String stringItem) {
this.stringItem = stringItem;
return this;
}
/**
* Get stringItem
* @return stringItem
**/
@ApiModelProperty(required = true, value = "")
public String getStringItem() {
return stringItem;
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
public TypeHolderDefault numberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
return this;
}
/**
* Get numberItem
* @return numberItem
**/
@ApiModelProperty(required = true, value = "")
public BigDecimal getNumberItem() {
return numberItem;
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
public TypeHolderDefault integerItem(Integer integerItem) {
this.integerItem = integerItem;
return this;
}
/**
* Get integerItem
* @return integerItem
**/
@ApiModelProperty(required = true, value = "")
public Integer getIntegerItem() {
return integerItem;
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
public TypeHolderDefault boolItem(Boolean boolItem) {
this.boolItem = boolItem;
return this;
}
/**
* Get boolItem
* @return boolItem
**/
@ApiModelProperty(required = true, value = "")
public Boolean getBoolItem() {
return boolItem;
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
public TypeHolderDefault arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
return this;
}
public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) {
this.arrayItem.add(arrayItemItem);
return this;
}
/**
* Get arrayItem
* @return arrayItem
**/
@ApiModelProperty(required = true, value = "")
public List<Integer> getArrayItem() {
return arrayItem;
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o;
return Objects.equals(this.stringItem, typeHolderDefault.stringItem) &&
Objects.equals(this.numberItem, typeHolderDefault.numberItem) &&
Objects.equals(this.integerItem, typeHolderDefault.integerItem) &&
Objects.equals(this.boolItem, typeHolderDefault.boolItem) &&
Objects.equals(this.arrayItem, typeHolderDefault.arrayItem);
}
@Override
public int hashCode() {
return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TypeHolderDefault {\n");
sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n");
sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n");
sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n");
sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n");
sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,174 @@
package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* TypeHolderExample
*/
public class TypeHolderExample {
@JsonProperty("string_item")
private String stringItem;
@JsonProperty("number_item")
private BigDecimal numberItem;
@JsonProperty("integer_item")
private Integer integerItem;
@JsonProperty("bool_item")
private Boolean boolItem;
@JsonProperty("array_item")
private List<Integer> arrayItem = new ArrayList<Integer>();
public TypeHolderExample stringItem(String stringItem) {
this.stringItem = stringItem;
return this;
}
/**
* Get stringItem
* @return stringItem
**/
@ApiModelProperty(example = "what", required = true, value = "")
public String getStringItem() {
return stringItem;
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
public TypeHolderExample numberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
return this;
}
/**
* Get numberItem
* @return numberItem
**/
@ApiModelProperty(example = "1.234", required = true, value = "")
public BigDecimal getNumberItem() {
return numberItem;
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
public TypeHolderExample integerItem(Integer integerItem) {
this.integerItem = integerItem;
return this;
}
/**
* Get integerItem
* @return integerItem
**/
@ApiModelProperty(example = "-2", required = true, value = "")
public Integer getIntegerItem() {
return integerItem;
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
public TypeHolderExample boolItem(Boolean boolItem) {
this.boolItem = boolItem;
return this;
}
/**
* Get boolItem
* @return boolItem
**/
@ApiModelProperty(example = "true", required = true, value = "")
public Boolean getBoolItem() {
return boolItem;
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
public TypeHolderExample arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
return this;
}
public TypeHolderExample addArrayItemItem(Integer arrayItemItem) {
this.arrayItem.add(arrayItemItem);
return this;
}
/**
* Get arrayItem
* @return arrayItem
**/
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
public List<Integer> getArrayItem() {
return arrayItem;
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TypeHolderExample typeHolderExample = (TypeHolderExample) o;
return Objects.equals(this.stringItem, typeHolderExample.stringItem) &&
Objects.equals(this.numberItem, typeHolderExample.numberItem) &&
Objects.equals(this.integerItem, typeHolderExample.integerItem) &&
Objects.equals(this.boolItem, typeHolderExample.boolItem) &&
Objects.equals(this.arrayItem, typeHolderExample.arrayItem);
}
@Override
public int hashCode() {
return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TypeHolderExample {\n");
sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n");
sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n");
sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n");
sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n");
sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -12,28 +12,28 @@ import io.swagger.annotations.ApiModelProperty;
public class User {
@JsonProperty("id")
private Long id = null;
private Long id;
@JsonProperty("username")
private String username = null;
private String username;
@JsonProperty("firstName")
private String firstName = null;
private String firstName;
@JsonProperty("lastName")
private String lastName = null;
private String lastName;
@JsonProperty("email")
private String email = null;
private String email;
@JsonProperty("password")
private String password = null;
private String password;
@JsonProperty("phone")
private String phone = null;
private String phone;
@JsonProperty("userStatus")
private Integer userStatus = null;
private Integer userStatus;
public User id(Long id) {
this.id = id;

View File

@ -0,0 +1,793 @@
package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* XmlItem
*/
public class XmlItem {
@JsonProperty("attribute_string")
private String attributeString;
@JsonProperty("attribute_number")
private BigDecimal attributeNumber;
@JsonProperty("attribute_integer")
private Integer attributeInteger;
@JsonProperty("attribute_boolean")
private Boolean attributeBoolean;
@JsonProperty("wrapped_array")
private List<Integer> wrappedArray = null;
@JsonProperty("name_string")
private String nameString;
@JsonProperty("name_number")
private BigDecimal nameNumber;
@JsonProperty("name_integer")
private Integer nameInteger;
@JsonProperty("name_boolean")
private Boolean nameBoolean;
@JsonProperty("name_array")
private List<Integer> nameArray = null;
@JsonProperty("name_wrapped_array")
private List<Integer> nameWrappedArray = null;
@JsonProperty("prefix_string")
private String prefixString;
@JsonProperty("prefix_number")
private BigDecimal prefixNumber;
@JsonProperty("prefix_integer")
private Integer prefixInteger;
@JsonProperty("prefix_boolean")
private Boolean prefixBoolean;
@JsonProperty("prefix_array")
private List<Integer> prefixArray = null;
@JsonProperty("prefix_wrapped_array")
private List<Integer> prefixWrappedArray = null;
@JsonProperty("namespace_string")
private String namespaceString;
@JsonProperty("namespace_number")
private BigDecimal namespaceNumber;
@JsonProperty("namespace_integer")
private Integer namespaceInteger;
@JsonProperty("namespace_boolean")
private Boolean namespaceBoolean;
@JsonProperty("namespace_array")
private List<Integer> namespaceArray = null;
@JsonProperty("namespace_wrapped_array")
private List<Integer> namespaceWrappedArray = null;
@JsonProperty("prefix_ns_string")
private String prefixNsString;
@JsonProperty("prefix_ns_number")
private BigDecimal prefixNsNumber;
@JsonProperty("prefix_ns_integer")
private Integer prefixNsInteger;
@JsonProperty("prefix_ns_boolean")
private Boolean prefixNsBoolean;
@JsonProperty("prefix_ns_array")
private List<Integer> prefixNsArray = null;
@JsonProperty("prefix_ns_wrapped_array")
private List<Integer> prefixNsWrappedArray = null;
public XmlItem attributeString(String attributeString) {
this.attributeString = attributeString;
return this;
}
/**
* Get attributeString
* @return attributeString
**/
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
}
public void setAttributeString(String attributeString) {
this.attributeString = attributeString;
}
public XmlItem attributeNumber(BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber;
return this;
}
/**
* Get attributeNumber
* @return attributeNumber
**/
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
}
public void setAttributeNumber(BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber;
}
public XmlItem attributeInteger(Integer attributeInteger) {
this.attributeInteger = attributeInteger;
return this;
}
/**
* Get attributeInteger
* @return attributeInteger
**/
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
}
public void setAttributeInteger(Integer attributeInteger) {
this.attributeInteger = attributeInteger;
}
public XmlItem attributeBoolean(Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean;
return this;
}
/**
* Get attributeBoolean
* @return attributeBoolean
**/
@ApiModelProperty(example = "true", value = "")
public Boolean getAttributeBoolean() {
return attributeBoolean;
}
public void setAttributeBoolean(Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean;
}
public XmlItem wrappedArray(List<Integer> wrappedArray) {
this.wrappedArray = wrappedArray;
return this;
}
public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) {
if (this.wrappedArray == null) {
this.wrappedArray = new ArrayList<Integer>();
}
this.wrappedArray.add(wrappedArrayItem);
return this;
}
/**
* Get wrappedArray
* @return wrappedArray
**/
@ApiModelProperty(value = "")
public List<Integer> getWrappedArray() {
return wrappedArray;
}
public void setWrappedArray(List<Integer> wrappedArray) {
this.wrappedArray = wrappedArray;
}
public XmlItem nameString(String nameString) {
this.nameString = nameString;
return this;
}
/**
* Get nameString
* @return nameString
**/
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
}
public void setNameString(String nameString) {
this.nameString = nameString;
}
public XmlItem nameNumber(BigDecimal nameNumber) {
this.nameNumber = nameNumber;
return this;
}
/**
* Get nameNumber
* @return nameNumber
**/
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
}
public void setNameNumber(BigDecimal nameNumber) {
this.nameNumber = nameNumber;
}
public XmlItem nameInteger(Integer nameInteger) {
this.nameInteger = nameInteger;
return this;
}
/**
* Get nameInteger
* @return nameInteger
**/
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
}
public void setNameInteger(Integer nameInteger) {
this.nameInteger = nameInteger;
}
public XmlItem nameBoolean(Boolean nameBoolean) {
this.nameBoolean = nameBoolean;
return this;
}
/**
* Get nameBoolean
* @return nameBoolean
**/
@ApiModelProperty(example = "true", value = "")
public Boolean getNameBoolean() {
return nameBoolean;
}
public void setNameBoolean(Boolean nameBoolean) {
this.nameBoolean = nameBoolean;
}
public XmlItem nameArray(List<Integer> nameArray) {
this.nameArray = nameArray;
return this;
}
public XmlItem addNameArrayItem(Integer nameArrayItem) {
if (this.nameArray == null) {
this.nameArray = new ArrayList<Integer>();
}
this.nameArray.add(nameArrayItem);
return this;
}
/**
* Get nameArray
* @return nameArray
**/
@ApiModelProperty(value = "")
public List<Integer> getNameArray() {
return nameArray;
}
public void setNameArray(List<Integer> nameArray) {
this.nameArray = nameArray;
}
public XmlItem nameWrappedArray(List<Integer> nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray;
return this;
}
public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) {
if (this.nameWrappedArray == null) {
this.nameWrappedArray = new ArrayList<Integer>();
}
this.nameWrappedArray.add(nameWrappedArrayItem);
return this;
}
/**
* Get nameWrappedArray
* @return nameWrappedArray
**/
@ApiModelProperty(value = "")
public List<Integer> getNameWrappedArray() {
return nameWrappedArray;
}
public void setNameWrappedArray(List<Integer> nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray;
}
public XmlItem prefixString(String prefixString) {
this.prefixString = prefixString;
return this;
}
/**
* Get prefixString
* @return prefixString
**/
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
}
public void setPrefixString(String prefixString) {
this.prefixString = prefixString;
}
public XmlItem prefixNumber(BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber;
return this;
}
/**
* Get prefixNumber
* @return prefixNumber
**/
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
}
public void setPrefixNumber(BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber;
}
public XmlItem prefixInteger(Integer prefixInteger) {
this.prefixInteger = prefixInteger;
return this;
}
/**
* Get prefixInteger
* @return prefixInteger
**/
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
}
public void setPrefixInteger(Integer prefixInteger) {
this.prefixInteger = prefixInteger;
}
public XmlItem prefixBoolean(Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean;
return this;
}
/**
* Get prefixBoolean
* @return prefixBoolean
**/
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixBoolean() {
return prefixBoolean;
}
public void setPrefixBoolean(Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean;
}
public XmlItem prefixArray(List<Integer> prefixArray) {
this.prefixArray = prefixArray;
return this;
}
public XmlItem addPrefixArrayItem(Integer prefixArrayItem) {
if (this.prefixArray == null) {
this.prefixArray = new ArrayList<Integer>();
}
this.prefixArray.add(prefixArrayItem);
return this;
}
/**
* Get prefixArray
* @return prefixArray
**/
@ApiModelProperty(value = "")
public List<Integer> getPrefixArray() {
return prefixArray;
}
public void setPrefixArray(List<Integer> prefixArray) {
this.prefixArray = prefixArray;
}
public XmlItem prefixWrappedArray(List<Integer> prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray;
return this;
}
public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) {
if (this.prefixWrappedArray == null) {
this.prefixWrappedArray = new ArrayList<Integer>();
}
this.prefixWrappedArray.add(prefixWrappedArrayItem);
return this;
}
/**
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
@ApiModelProperty(value = "")
public List<Integer> getPrefixWrappedArray() {
return prefixWrappedArray;
}
public void setPrefixWrappedArray(List<Integer> prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray;
}
public XmlItem namespaceString(String namespaceString) {
this.namespaceString = namespaceString;
return this;
}
/**
* Get namespaceString
* @return namespaceString
**/
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
}
public void setNamespaceString(String namespaceString) {
this.namespaceString = namespaceString;
}
public XmlItem namespaceNumber(BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber;
return this;
}
/**
* Get namespaceNumber
* @return namespaceNumber
**/
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
}
public void setNamespaceNumber(BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber;
}
public XmlItem namespaceInteger(Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger;
return this;
}
/**
* Get namespaceInteger
* @return namespaceInteger
**/
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
}
public void setNamespaceInteger(Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger;
}
public XmlItem namespaceBoolean(Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean;
return this;
}
/**
* Get namespaceBoolean
* @return namespaceBoolean
**/
@ApiModelProperty(example = "true", value = "")
public Boolean getNamespaceBoolean() {
return namespaceBoolean;
}
public void setNamespaceBoolean(Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean;
}
public XmlItem namespaceArray(List<Integer> namespaceArray) {
this.namespaceArray = namespaceArray;
return this;
}
public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) {
if (this.namespaceArray == null) {
this.namespaceArray = new ArrayList<Integer>();
}
this.namespaceArray.add(namespaceArrayItem);
return this;
}
/**
* Get namespaceArray
* @return namespaceArray
**/
@ApiModelProperty(value = "")
public List<Integer> getNamespaceArray() {
return namespaceArray;
}
public void setNamespaceArray(List<Integer> namespaceArray) {
this.namespaceArray = namespaceArray;
}
public XmlItem namespaceWrappedArray(List<Integer> namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray;
return this;
}
public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) {
if (this.namespaceWrappedArray == null) {
this.namespaceWrappedArray = new ArrayList<Integer>();
}
this.namespaceWrappedArray.add(namespaceWrappedArrayItem);
return this;
}
/**
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
@ApiModelProperty(value = "")
public List<Integer> getNamespaceWrappedArray() {
return namespaceWrappedArray;
}
public void setNamespaceWrappedArray(List<Integer> namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray;
}
public XmlItem prefixNsString(String prefixNsString) {
this.prefixNsString = prefixNsString;
return this;
}
/**
* Get prefixNsString
* @return prefixNsString
**/
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
}
public void setPrefixNsString(String prefixNsString) {
this.prefixNsString = prefixNsString;
}
public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber;
return this;
}
/**
* Get prefixNsNumber
* @return prefixNsNumber
**/
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
}
public void setPrefixNsNumber(BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber;
}
public XmlItem prefixNsInteger(Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger;
return this;
}
/**
* Get prefixNsInteger
* @return prefixNsInteger
**/
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
}
public void setPrefixNsInteger(Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger;
}
public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean;
return this;
}
/**
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixNsBoolean() {
return prefixNsBoolean;
}
public void setPrefixNsBoolean(Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean;
}
public XmlItem prefixNsArray(List<Integer> prefixNsArray) {
this.prefixNsArray = prefixNsArray;
return this;
}
public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) {
if (this.prefixNsArray == null) {
this.prefixNsArray = new ArrayList<Integer>();
}
this.prefixNsArray.add(prefixNsArrayItem);
return this;
}
/**
* Get prefixNsArray
* @return prefixNsArray
**/
@ApiModelProperty(value = "")
public List<Integer> getPrefixNsArray() {
return prefixNsArray;
}
public void setPrefixNsArray(List<Integer> prefixNsArray) {
this.prefixNsArray = prefixNsArray;
}
public XmlItem prefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray;
return this;
}
public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) {
if (this.prefixNsWrappedArray == null) {
this.prefixNsWrappedArray = new ArrayList<Integer>();
}
this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem);
return this;
}
/**
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
@ApiModelProperty(value = "")
public List<Integer> getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
}
public void setPrefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlItem xmlItem = (XmlItem) o;
return Objects.equals(this.attributeString, xmlItem.attributeString) &&
Objects.equals(this.attributeNumber, xmlItem.attributeNumber) &&
Objects.equals(this.attributeInteger, xmlItem.attributeInteger) &&
Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) &&
Objects.equals(this.wrappedArray, xmlItem.wrappedArray) &&
Objects.equals(this.nameString, xmlItem.nameString) &&
Objects.equals(this.nameNumber, xmlItem.nameNumber) &&
Objects.equals(this.nameInteger, xmlItem.nameInteger) &&
Objects.equals(this.nameBoolean, xmlItem.nameBoolean) &&
Objects.equals(this.nameArray, xmlItem.nameArray) &&
Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) &&
Objects.equals(this.prefixString, xmlItem.prefixString) &&
Objects.equals(this.prefixNumber, xmlItem.prefixNumber) &&
Objects.equals(this.prefixInteger, xmlItem.prefixInteger) &&
Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) &&
Objects.equals(this.prefixArray, xmlItem.prefixArray) &&
Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) &&
Objects.equals(this.namespaceString, xmlItem.namespaceString) &&
Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) &&
Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) &&
Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) &&
Objects.equals(this.namespaceArray, xmlItem.namespaceArray) &&
Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) &&
Objects.equals(this.prefixNsString, xmlItem.prefixNsString) &&
Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) &&
Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) &&
Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) &&
Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) &&
Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray);
}
@Override
public int hashCode() {
return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class XmlItem {\n");
sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n");
sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n");
sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n");
sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n");
sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n");
sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n");
sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n");
sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n");
sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n");
sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n");
sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n");
sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n");
sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n");
sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n");
sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n");
sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n");
sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n");
sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n");
sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n");
sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n");
sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n");
sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n");
sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n");
sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n");
sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n");
sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n");
sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n");
sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n");
sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -19,7 +19,7 @@ import javax.ws.rs.core.SecurityContext;
public class AnotherFakeApiServiceImpl extends AnotherFakeApiService {
@Override
public Response call123testSpecialTags(Client client
public Response call123testSpecialTags(Client body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();

View File

@ -12,6 +12,7 @@ import java.util.Map;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
import org.openapitools.model.XmlItem;
import java.util.List;
import org.openapitools.api.NotFoundException;
@ -26,6 +27,12 @@ import javax.ws.rs.core.SecurityContext;
public class FakeApiServiceImpl extends FakeApiService {
@Override
public Response createXmlItem(XmlItem xmlItem
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response fakeOuterBooleanSerialize(Boolean body
) throws NotFoundException {
@ -33,7 +40,7 @@ public class FakeApiServiceImpl extends FakeApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response fakeOuterCompositeSerialize(OuterComposite outerComposite
public Response fakeOuterCompositeSerialize(OuterComposite body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
@ -51,20 +58,20 @@ public class FakeApiServiceImpl extends FakeApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass
public Response testBodyWithFileSchema(FileSchemaTestClass body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testBodyWithQueryParams(String query
, User user
, User body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testClientModel(Client client
public Response testClientModel(Client body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
@ -102,7 +109,18 @@ public class FakeApiServiceImpl extends FakeApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testInlineAdditionalProperties(Map<String, String> requestBody
public Response testGroupParameters(Integer requiredStringGroup
, Boolean requiredBooleanGroup
, Long requiredInt64Group
, Integer stringGroup
, Boolean booleanGroup
, Long int64Group
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testInlineAdditionalProperties(Map<String, String> param
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();

View File

@ -19,7 +19,7 @@ import javax.ws.rs.core.SecurityContext;
public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService {
@Override
public Response testClassname(Client client
public Response testClassname(Client body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();

View File

@ -21,7 +21,7 @@ import javax.ws.rs.core.SecurityContext;
public class PetApiServiceImpl extends PetApiService {
@Override
public Response addPet(Pet pet
public Response addPet(Pet body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
@ -52,7 +52,7 @@ public class PetApiServiceImpl extends PetApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response updatePet(Pet pet
public Response updatePet(Pet body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();

View File

@ -37,7 +37,7 @@ public class StoreApiServiceImpl extends StoreApiService {
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response placeOrder(Order order
public Response placeOrder(Order body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();

View File

@ -20,19 +20,19 @@ import javax.ws.rs.core.SecurityContext;
public class UserApiServiceImpl extends UserApiService {
@Override
public Response createUser(User user
public Response createUser(User body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response createUsersWithArrayInput(List<User> user
public Response createUsersWithArrayInput(List<User> body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response createUsersWithListInput(List<User> user
public Response createUsersWithListInput(List<User> body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
@ -63,7 +63,7 @@ public class UserApiServiceImpl extends UserApiService {
}
@Override
public Response updateUser(String username
, User user
, User body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();