[jaxrs-spec] fix nullable import, migrate tests to 3.0 spec (#18606)

* update samples

* fix nullable, better test (jaxrs-spec)

* Revert "update samples"

This reverts commit 2377d98de3b38a105fc970e8a97282fafb8a48ad.

* update samples
This commit is contained in:
William Cheng 2024-05-08 17:45:43 +08:00 committed by GitHub
parent 8226ff8f96
commit 4441ab303f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
49 changed files with 5195 additions and 3166 deletions

View File

@ -1,6 +1,6 @@
generatorName: jaxrs-spec
outputDir: samples/server/petstore/jaxrs-spec
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
additionalProperties:
artifactId: jaxrs-spec-petstore-server

View File

@ -607,7 +607,9 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
importMapping.put("JsonIgnore", "com.fasterxml.jackson.annotation.JsonIgnore");
importMapping.put("JsonIgnoreProperties", "com.fasterxml.jackson.annotation.JsonIgnoreProperties");
importMapping.put("JsonInclude", "com.fasterxml.jackson.annotation.JsonInclude");
importMapping.put("JsonNullable", "org.openapitools.jackson.nullable.JsonNullable");
if (openApiNullable) {
importMapping.put("JsonNullable", "org.openapitools.jackson.nullable.JsonNullable");
}
importMapping.put("SerializedName", "com.google.gson.annotations.SerializedName");
importMapping.put("TypeAdapter", "com.google.gson.TypeAdapter");
importMapping.put("JsonAdapter", "com.google.gson.annotations.JsonAdapter");

View File

@ -162,7 +162,14 @@
<version>${beanvalidation-version}</version>
<scope>provided</scope>
</dependency>
{{/useBeanValidation}}
{{/useBeanValidation}}
{{#openApiNullable}}
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
{{/openApiNullable}}
</dependencies>
<properties>
<java.version>1.8</java.version>
@ -192,5 +199,8 @@
{{^useJakartaEe}}
<jakarta.ws.rs-version>2.1.6</jakarta.ws.rs-version>
{{/useJakartaEe}}
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
{{/openApiNullable}}
</properties>
</project>

View File

@ -88,6 +88,11 @@
<version>${beanvalidation-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
@ -100,5 +105,6 @@
<javax.annotation-api-version>1.3.2</javax.annotation-api-version>
<beanvalidation-version>2.0.2</beanvalidation-version>
<jakarta.ws.rs-version>2.1.6</jakarta.ws.rs-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
</properties>
</project>

View File

@ -88,6 +88,11 @@
<version>${beanvalidation-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
@ -100,5 +105,6 @@
<javax.annotation-api-version>1.3.2</javax.annotation-api-version>
<beanvalidation-version>2.0.2</beanvalidation-version>
<jakarta.ws.rs-version>2.1.6</jakarta.ws.rs-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
</properties>
</project>

View File

@ -123,6 +123,11 @@
<version>${beanvalidation-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
@ -135,5 +140,6 @@
<javax.annotation-api-version>2.1.1</javax.annotation-api-version>
<beanvalidation-version>3.0.2</beanvalidation-version>
<jakarta.ws.rs-version>3.1.0</jakarta.ws.rs-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
</properties>
</project>

View File

@ -123,6 +123,11 @@
<version>${beanvalidation-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
@ -135,5 +140,6 @@
<javax.annotation-api-version>1.3.2</javax.annotation-api-version>
<beanvalidation-version>2.0.2</beanvalidation-version>
<jakarta.ws.rs-version>2.1.6</jakarta.ws.rs-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
</properties>
</project>

View File

@ -3,36 +3,36 @@ pom.xml
src/gen/java/org/openapitools/api/AnotherFakeApi.java
src/gen/java/org/openapitools/api/FakeApi.java
src/gen/java/org/openapitools/api/FakeClassnameTestApi.java
src/gen/java/org/openapitools/api/FooApi.java
src/gen/java/org/openapitools/api/PetApi.java
src/gen/java/org/openapitools/api/RestApplication.java
src/gen/java/org/openapitools/api/RestResourceRoot.java
src/gen/java/org/openapitools/api/StoreApi.java
src/gen/java/org/openapitools/api/UserApi.java
src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java
src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java
src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java
src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java
src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java
src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java
src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java
src/gen/java/org/openapitools/model/AdditionalPropertiesString.java
src/gen/java/org/openapitools/model/AllOfWithSingleRef.java
src/gen/java/org/openapitools/model/Animal.java
src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java
src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java
src/gen/java/org/openapitools/model/ArrayTest.java
src/gen/java/org/openapitools/model/BigCat.java
src/gen/java/org/openapitools/model/Capitalization.java
src/gen/java/org/openapitools/model/Cat.java
src/gen/java/org/openapitools/model/Category.java
src/gen/java/org/openapitools/model/ChildWithNullable.java
src/gen/java/org/openapitools/model/ClassModel.java
src/gen/java/org/openapitools/model/Client.java
src/gen/java/org/openapitools/model/DeprecatedObject.java
src/gen/java/org/openapitools/model/Dog.java
src/gen/java/org/openapitools/model/EnumArrays.java
src/gen/java/org/openapitools/model/EnumClass.java
src/gen/java/org/openapitools/model/EnumTest.java
src/gen/java/org/openapitools/model/FakeBigDecimalMap200Response.java
src/gen/java/org/openapitools/model/FileSchemaTestClass.java
src/gen/java/org/openapitools/model/Foo.java
src/gen/java/org/openapitools/model/FooGetDefaultResponse.java
src/gen/java/org/openapitools/model/FormatTest.java
src/gen/java/org/openapitools/model/HasOnlyReadOnly.java
src/gen/java/org/openapitools/model/HealthCheckResult.java
src/gen/java/org/openapitools/model/MapTest.java
src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java
src/gen/java/org/openapitools/model/Model200Response.java
@ -41,16 +41,22 @@ src/gen/java/org/openapitools/model/ModelFile.java
src/gen/java/org/openapitools/model/ModelList.java
src/gen/java/org/openapitools/model/ModelReturn.java
src/gen/java/org/openapitools/model/Name.java
src/gen/java/org/openapitools/model/NullableClass.java
src/gen/java/org/openapitools/model/NumberOnly.java
src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java
src/gen/java/org/openapitools/model/Order.java
src/gen/java/org/openapitools/model/OuterComposite.java
src/gen/java/org/openapitools/model/OuterEnum.java
src/gen/java/org/openapitools/model/OuterEnumDefaultValue.java
src/gen/java/org/openapitools/model/OuterEnumInteger.java
src/gen/java/org/openapitools/model/OuterEnumIntegerDefaultValue.java
src/gen/java/org/openapitools/model/OuterObjectWithEnumProperty.java
src/gen/java/org/openapitools/model/ParentWithNullable.java
src/gen/java/org/openapitools/model/Pet.java
src/gen/java/org/openapitools/model/ReadOnlyFirst.java
src/gen/java/org/openapitools/model/SingleRefType.java
src/gen/java/org/openapitools/model/SpecialModelName.java
src/gen/java/org/openapitools/model/Tag.java
src/gen/java/org/openapitools/model/TypeHolderDefault.java
src/gen/java/org/openapitools/model/TypeHolderExample.java
src/gen/java/org/openapitools/model/TestInlineFreeformAdditionalPropertiesRequest.java
src/gen/java/org/openapitools/model/User.java
src/gen/java/org/openapitools/model/XmlItem.java
src/main/openapi/openapi.yaml

View File

@ -123,6 +123,11 @@
<version>${beanvalidation-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
@ -135,5 +140,6 @@
<javax.annotation-api-version>1.3.2</javax.annotation-api-version>
<beanvalidation-version>2.0.2</beanvalidation-version>
<jakarta.ws.rs-version>2.1.6</jakarta.ws.rs-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
</properties>
</project>

View File

@ -1,7 +1,6 @@
package org.openapitools.api;
import org.openapitools.model.Client;
import java.util.UUID;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
@ -29,7 +28,7 @@ public class AnotherFakeApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
})
public Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body) {
public Response call123testSpecialTags(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
}
}

View File

@ -1,16 +1,22 @@
package org.openapitools.api;
import java.math.BigDecimal;
import org.openapitools.model.ChildWithNullable;
import org.openapitools.model.Client;
import java.util.Date;
import org.openapitools.model.EnumClass;
import org.openapitools.model.FakeBigDecimalMap200Response;
import java.io.File;
import org.openapitools.model.FileSchemaTestClass;
import org.openapitools.model.HealthCheckResult;
import org.joda.time.LocalDate;
import java.util.Map;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.OuterObjectWithEnumProperty;
import org.openapitools.model.Pet;
import org.openapitools.model.TestInlineFreeformAdditionalPropertiesRequest;
import org.openapitools.model.User;
import org.openapitools.model.XmlItem;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
@ -31,19 +37,45 @@ import javax.validation.Valid;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class FakeApi {
@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" })
@ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake" })
@GET
@Path("/BigDecimalMap")
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys", response = FakeBigDecimalMap200Response.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
@ApiResponse(code = 200, message = "successful operation", response = FakeBigDecimalMap200Response.class)
})
public Response createXmlItem(@Valid @NotNull XmlItem xmlItem) {
public Response fakeBigDecimalMap() {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/health")
@Produces({ "application/json" })
@ApiOperation(value = "Health check endpoint", notes = "", response = HealthCheckResult.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "The instance started successfully", response = HealthCheckResult.class)
})
public Response fakeHealthGet() {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/http-signature-test")
@Consumes({ "application/json", "application/xml" })
@ApiOperation(value = "test http signature authentication", notes = "", response = Void.class, authorizations = {
@Authorization(value = "http_signature_test")
}, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "The instance started successfully", response = Void.class)
})
public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") @ApiParam("query parameter") String query1,@HeaderParam("header_1") @ApiParam("header parameter") String header1) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/outer/boolean")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake" })
@ApiResponses(value = {
@ -55,17 +87,19 @@ public class FakeApi {
@POST
@Path("/outer/composite")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class)
})
public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) {
public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/outer/number")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake" })
@ApiResponses(value = {
@ -77,6 +111,7 @@ public class FakeApi {
@POST
@Path("/outer/string")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake" })
@ApiResponses(value = {
@ -86,14 +121,48 @@ public class FakeApi {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/body-with-file-schema")
@POST
@Path("/property/enum-int")
@Consumes({ "application/json" })
@ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake" })
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of enum (int) properties with examples", response = OuterObjectWithEnumProperty.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output enum (int)", response = OuterObjectWithEnumProperty.class)
})
public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/additionalProperties-reference")
@Consumes({ "application/json" })
@ApiOperation(value = "test referenced additionalProperties", notes = "", response = Void.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response testAdditionalPropertiesReference(@Valid @NotNull Map<String, Object> requestBody) {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/body-with-binary")
@Consumes({ "image/png" })
@ApiOperation(value = "", notes = "For this test, the body has to be a binary file.", response = Void.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = Void.class)
})
public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body) {
public Response testBodyWithBinary(@Valid File body) {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/body-with-file-schema")
@Consumes({ "application/json" })
@ApiOperation(value = "", notes = "For this test, the body for this request must reference a schema named `File`.", response = Void.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = Void.class)
})
public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass fileSchemaTestClass) {
return Response.ok().entity("magic!").build();
}
@ -104,7 +173,7 @@ public class FakeApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = Void.class)
})
public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body) {
public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
}
@ -115,13 +184,13 @@ public class FakeApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
})
public Response testClientModel(@Valid @NotNull Client body) {
public Response testClientModel(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
}
@POST
@Consumes({ "application/x-www-form-urlencoded" })
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = {
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = {
@Authorization(value = "http_basic_test")
}, tags={ "fake" })
@ -143,12 +212,15 @@ public class FakeApi {
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@ApiResponse(code = 404, message = "Not found", response = Void.class)
})
public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) {
public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@QueryParam("enum_query_model_array") List<EnumClass> enumQueryModelArray,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) {
return Response.ok().entity("magic!").build();
}
@DELETE
@ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake" })
@ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, authorizations = {
@Authorization(value = "bearer_test")
}, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Something wrong", response = Void.class)
})
@ -163,7 +235,18 @@ public class FakeApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response testInlineAdditionalProperties(@Valid @NotNull Map<String, String> param) {
public Response testInlineAdditionalProperties(@Valid @NotNull Map<String, String> requestBody) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/inline-freeform-additionalProperties")
@Consumes({ "application/json" })
@ApiOperation(value = "test inline free-form additionalProperties", notes = "", response = Void.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response testInlineFreeformAdditionalProperties(@Valid @NotNull TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) {
return Response.ok().entity("magic!").build();
}
@ -178,13 +261,35 @@ public class FakeApi {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/nullable")
@Consumes({ "application/json" })
@ApiOperation(value = "test nullable parent property", notes = "", response = Void.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response testNullable(@Valid @NotNull ChildWithNullable childWithNullable) {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/test-query-parameters")
@ApiOperation(value = "", notes = "To test the collection format in query parameters", response = Void.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = Void.class)
})
public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context) {
public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map<String, String> language) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/stringMap-reference")
@Consumes({ "application/json" })
@ApiOperation(value = "test referenced string map", notes = "", response = Void.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response testStringMapReference(@Valid @NotNull Map<String, String> requestBody) {
return Response.ok().entity("magic!").build();
}

View File

@ -31,7 +31,7 @@ public class FakeClassnameTestApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
})
public Response testClassname(@Valid @NotNull Client body) {
public Response testClassname(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
}
}

View File

@ -0,0 +1,33 @@
package org.openapitools.api;
import org.openapitools.model.FooGetDefaultResponse;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import io.swagger.annotations.*;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
* Represents a collection of functions to interact with the API endpoints.
*/
@Path("/foo")
@Api(description = "the foo API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class FooApi {
@GET
@Produces({ "application/json" })
@ApiOperation(value = "", notes = "", response = FooGetDefaultResponse.class, tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "response", response = FooGetDefaultResponse.class)
})
public Response fooGet() {
return Response.ok().entity("magic!").build();
}
}

View File

@ -32,10 +32,10 @@ public class PetApi {
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
}, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
@ApiResponse(code = 200, message = "Successful operation", response = Void.class),
@ApiResponse(code = 405, message = "Invalid input", response = Void.class)
})
public Response addPet(@Valid @NotNull Pet body) {
public Response addPet(@Valid @NotNull Pet pet) {
return Response.ok().entity("magic!").build();
}
@ -50,7 +50,7 @@ public class PetApi {
@io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
})
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
@ApiResponse(code = 200, message = "Successful operation", response = Void.class),
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class)
})
public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId) {
@ -113,12 +113,12 @@ public class PetApi {
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
}, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
@ApiResponse(code = 200, message = "Successful operation", response = Void.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@ApiResponse(code = 405, message = "Validation exception", response = Void.class)
})
public Response updatePet(@Valid @NotNull Pet body) {
public Response updatePet(@Valid @NotNull Pet pet) {
return Response.ok().entity("magic!").build();
}
@ -131,6 +131,7 @@ public class PetApi {
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
}, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful operation", response = Void.class),
@ApiResponse(code = 405, message = "Invalid input", response = Void.class)
})
public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) {

View File

@ -62,13 +62,14 @@ public class StoreApi {
@POST
@Path("/order")
@Consumes({ "application/json" })
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class)
})
public Response placeOrder(@Valid @NotNull Order body) {
public Response placeOrder(@Valid @NotNull Order order) {
return Response.ok().entity("magic!").build();
}
}

View File

@ -23,31 +23,34 @@ import javax.validation.Valid;
public class UserApi {
@POST
@Consumes({ "application/json" })
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response createUser(@Valid @NotNull User body) {
public Response createUser(@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/createWithArray")
@Consumes({ "application/json" })
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body) {
public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/createWithList")
@Consumes({ "application/json" })
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) {
public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) {
return Response.ok().entity("magic!").build();
}
@ -99,12 +102,13 @@ public class UserApi {
@PUT
@Path("/{username}")
@Consumes({ "application/json" })
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = Void.class)
})
public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User body) {
public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
}
}

View File

@ -2,9 +2,7 @@ package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
@ -22,30 +20,12 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AdditionalPropertiesClass implements Serializable {
private @Valid Map<String, String> mapString = new HashMap<>();
private @Valid Map<String, BigDecimal> mapNumber = new HashMap<>();
private @Valid Map<String, Integer> mapInteger = new HashMap<>();
private @Valid Map<String, Boolean> mapBoolean = new HashMap<>();
private @Valid Map<String, List<Integer>> mapArrayInteger = new HashMap<>();
private @Valid Map<String, List<Object>> mapArrayAnytype = new HashMap<>();
private @Valid Map<String, Map<String, String>> mapMapString = new HashMap<>();
private @Valid Map<String, Map<String, Object>> mapMapAnytype = new HashMap<>();
private Object anytype1;
private Object anytype2;
private Object anytype3;
private @Valid Map<String, String> mapProperty = new HashMap<>();
private @Valid Map<String, Map<String, String>> mapOfMapProperty = new HashMap<>();
protected AdditionalPropertiesClass(AdditionalPropertiesClassBuilder<?, ?> b) {
this.mapString = b.mapString;
this.mapNumber = b.mapNumber;
this.mapInteger = b.mapInteger;
this.mapBoolean = b.mapBoolean;
this.mapArrayInteger = b.mapArrayInteger;
this.mapArrayAnytype = b.mapArrayAnytype;
this.mapMapString = b.mapMapString;
this.mapMapAnytype = b.mapMapAnytype;
this.anytype1 = b.anytype1;
this.anytype2 = b.anytype2;
this.anytype3 = b.anytype3;
this.mapProperty = b.mapProperty;
this.mapOfMapProperty = b.mapOfMapProperty;
}
public AdditionalPropertiesClass() {
@ -53,341 +33,74 @@ public class AdditionalPropertiesClass implements Serializable {
/**
**/
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
this.mapString = mapString;
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("map_string")
public Map<String, String> getMapString() {
return mapString;
@JsonProperty("map_property")
public Map<String, String> getMapProperty() {
return mapProperty;
}
@JsonProperty("map_string")
public void setMapString(Map<String, String> mapString) {
this.mapString = mapString;
@JsonProperty("map_property")
public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
if (this.mapString == null) {
this.mapString = new HashMap<>();
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<>();
}
this.mapString.put(key, mapStringItem);
this.mapProperty.put(key, mapPropertyItem);
return this;
}
public AdditionalPropertiesClass removeMapStringItem(String key) {
if (this.mapString != null) {
this.mapString.remove(key);
public AdditionalPropertiesClass removeMapPropertyItem(String key) {
if (this.mapProperty != null) {
this.mapProperty.remove(key);
}
return this;
}
/**
**/
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("map_number")
@Valid public Map<String, BigDecimal> getMapNumber() {
return mapNumber;
@JsonProperty("map_of_map_property")
@Valid public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
@JsonProperty("map_number")
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
@JsonProperty("map_of_map_property")
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
if (this.mapNumber == null) {
this.mapNumber = new HashMap<>();
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<>();
}
this.mapNumber.put(key, mapNumberItem);
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
public AdditionalPropertiesClass removeMapNumberItem(String key) {
if (this.mapNumber != null) {
this.mapNumber.remove(key);
public AdditionalPropertiesClass removeMapOfMapPropertyItem(String key) {
if (this.mapOfMapProperty != null) {
this.mapOfMapProperty.remove(key);
}
return this;
}
/**
**/
public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("map_integer")
public Map<String, Integer> getMapInteger() {
return mapInteger;
}
@JsonProperty("map_integer")
public void setMapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
}
public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
if (this.mapInteger == null) {
this.mapInteger = new HashMap<>();
}
this.mapInteger.put(key, mapIntegerItem);
return this;
}
public AdditionalPropertiesClass removeMapIntegerItem(String key) {
if (this.mapInteger != null) {
this.mapInteger.remove(key);
}
return this;
}
/**
**/
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("map_boolean")
public Map<String, Boolean> getMapBoolean() {
return mapBoolean;
}
@JsonProperty("map_boolean")
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
}
public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
if (this.mapBoolean == null) {
this.mapBoolean = new HashMap<>();
}
this.mapBoolean.put(key, mapBooleanItem);
return this;
}
public AdditionalPropertiesClass removeMapBooleanItem(String key) {
if (this.mapBoolean != null) {
this.mapBoolean.remove(key);
}
return this;
}
/**
**/
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("map_array_integer")
@Valid public Map<String, List<Integer>> getMapArrayInteger() {
return mapArrayInteger;
}
@JsonProperty("map_array_integer")
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
}
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List<Integer> mapArrayIntegerItem) {
if (this.mapArrayInteger == null) {
this.mapArrayInteger = new HashMap<>();
}
this.mapArrayInteger.put(key, mapArrayIntegerItem);
return this;
}
public AdditionalPropertiesClass removeMapArrayIntegerItem(String key) {
if (this.mapArrayInteger != null) {
this.mapArrayInteger.remove(key);
}
return this;
}
/**
**/
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("map_array_anytype")
@Valid public Map<String, List<Object>> getMapArrayAnytype() {
return mapArrayAnytype;
}
@JsonProperty("map_array_anytype")
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
}
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List<Object> mapArrayAnytypeItem) {
if (this.mapArrayAnytype == null) {
this.mapArrayAnytype = new HashMap<>();
}
this.mapArrayAnytype.put(key, mapArrayAnytypeItem);
return this;
}
public AdditionalPropertiesClass removeMapArrayAnytypeItem(String key) {
if (this.mapArrayAnytype != null) {
this.mapArrayAnytype.remove(key);
}
return this;
}
/**
**/
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("map_map_string")
@Valid public Map<String, Map<String, String>> getMapMapString() {
return mapMapString;
}
@JsonProperty("map_map_string")
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
}
public AdditionalPropertiesClass putMapMapStringItem(String key, Map<String, String> mapMapStringItem) {
if (this.mapMapString == null) {
this.mapMapString = new HashMap<>();
}
this.mapMapString.put(key, mapMapStringItem);
return this;
}
public AdditionalPropertiesClass removeMapMapStringItem(String key) {
if (this.mapMapString != null) {
this.mapMapString.remove(key);
}
return this;
}
/**
**/
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("map_map_anytype")
@Valid public Map<String, Map<String, Object>> getMapMapAnytype() {
return mapMapAnytype;
}
@JsonProperty("map_map_anytype")
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
}
public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map<String, Object> mapMapAnytypeItem) {
if (this.mapMapAnytype == null) {
this.mapMapAnytype = new HashMap<>();
}
this.mapMapAnytype.put(key, mapMapAnytypeItem);
return this;
}
public AdditionalPropertiesClass removeMapMapAnytypeItem(String key) {
if (this.mapMapAnytype != null) {
this.mapMapAnytype.remove(key);
}
return this;
}
/**
**/
public AdditionalPropertiesClass anytype1(Object anytype1) {
this.anytype1 = anytype1;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("anytype_1")
public Object getAnytype1() {
return anytype1;
}
@JsonProperty("anytype_1")
public void setAnytype1(Object anytype1) {
this.anytype1 = anytype1;
}
/**
**/
public AdditionalPropertiesClass anytype2(Object anytype2) {
this.anytype2 = anytype2;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("anytype_2")
public Object getAnytype2() {
return anytype2;
}
@JsonProperty("anytype_2")
public void setAnytype2(Object anytype2) {
this.anytype2 = anytype2;
}
/**
**/
public AdditionalPropertiesClass anytype3(Object anytype3) {
this.anytype3 = anytype3;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("anytype_3")
public Object getAnytype3() {
return anytype3;
}
@JsonProperty("anytype_3")
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
}
@Override
public boolean equals(Object o) {
@ -398,22 +111,13 @@ public class AdditionalPropertiesClass implements Serializable {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapString, additionalPropertiesClass.mapString) &&
Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) &&
Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) &&
Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) &&
Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) &&
Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) &&
Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) &&
Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) &&
Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) &&
Objects.equals(this.anytype3, additionalPropertiesClass.anytype3);
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
public int hashCode() {
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
@ -421,17 +125,8 @@ public class AdditionalPropertiesClass implements Serializable {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n");
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n");
sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n");
sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n");
sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n");
sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n");
sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n");
sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n");
sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n");
sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n");
sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n");
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n");
sb.append("}");
return sb.toString();
}
@ -466,63 +161,18 @@ public class AdditionalPropertiesClass implements Serializable {
}
public static abstract class AdditionalPropertiesClassBuilder<C extends AdditionalPropertiesClass, B extends AdditionalPropertiesClassBuilder<C, B>> {
private Map<String, String> mapString = new HashMap<>();
private Map<String, BigDecimal> mapNumber = new HashMap<>();
private Map<String, Integer> mapInteger = new HashMap<>();
private Map<String, Boolean> mapBoolean = new HashMap<>();
private Map<String, List<Integer>> mapArrayInteger = new HashMap<>();
private Map<String, List<Object>> mapArrayAnytype = new HashMap<>();
private Map<String, Map<String, String>> mapMapString = new HashMap<>();
private Map<String, Map<String, Object>> mapMapAnytype = new HashMap<>();
private Object anytype1;
private Object anytype2;
private Object anytype3;
private Map<String, String> mapProperty = new HashMap<>();
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<>();
protected abstract B self();
public abstract C build();
public B mapString(Map<String, String> mapString) {
this.mapString = mapString;
public B mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return self();
}
public B mapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
return self();
}
public B mapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
return self();
}
public B mapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
return self();
}
public B mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
return self();
}
public B mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
return self();
}
public B mapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
return self();
}
public B mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
return self();
}
public B anytype1(Object anytype1) {
this.anytype1 = anytype1;
return self();
}
public B anytype2(Object anytype2) {
this.anytype2 = anytype2;
return self();
}
public B anytype3(Object anytype3) {
this.anytype3 = anytype3;
public B mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return self();
}
}

View File

@ -1,86 +0,0 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesInteger")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AdditionalPropertiesInteger extends HashMap<String, Integer> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesInteger name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o;
return Objects.equals(this.name, additionalPropertiesInteger.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesInteger {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,87 +0,0 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesNumber")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesNumber name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o;
return Objects.equals(this.name, additionalPropertiesNumber.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesNumber {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,86 +0,0 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesObject")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AdditionalPropertiesObject extends HashMap<String, Map> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesObject name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o;
return Objects.equals(this.name, additionalPropertiesObject.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesObject {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,86 +0,0 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesString")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AdditionalPropertiesString extends HashMap<String, String> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesString name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o;
return Objects.equals(this.name, additionalPropertiesString.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesString {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,147 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.SingleRefType;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AllOfWithSingleRef")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AllOfWithSingleRef implements Serializable {
private String username;
private SingleRefType singleRefType;
protected AllOfWithSingleRef(AllOfWithSingleRefBuilder<?, ?> b) {
this.username = b.username;
this.singleRefType = b.singleRefType;
}
public AllOfWithSingleRef() {
}
/**
**/
public AllOfWithSingleRef username(String username) {
this.username = username;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("username")
public String getUsername() {
return username;
}
@JsonProperty("username")
public void setUsername(String username) {
this.username = username;
}
/**
**/
public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) {
this.singleRefType = singleRefType;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("SingleRefType")
@Valid public SingleRefType getSingleRefType() {
return singleRefType;
}
@JsonProperty("SingleRefType")
public void setSingleRefType(SingleRefType singleRefType) {
this.singleRefType = singleRefType;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o;
return Objects.equals(this.username, allOfWithSingleRef.username) &&
Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType);
}
@Override
public int hashCode() {
return Objects.hash(username, singleRefType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AllOfWithSingleRef {\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static AllOfWithSingleRefBuilder<?, ?> builder() {
return new AllOfWithSingleRefBuilderImpl();
}
private static final class AllOfWithSingleRefBuilderImpl extends AllOfWithSingleRefBuilder<AllOfWithSingleRef, AllOfWithSingleRefBuilderImpl> {
@Override
protected AllOfWithSingleRefBuilderImpl self() {
return this;
}
@Override
public AllOfWithSingleRef build() {
return new AllOfWithSingleRef(this);
}
}
public static abstract class AllOfWithSingleRefBuilder<C extends AllOfWithSingleRef, B extends AllOfWithSingleRefBuilder<C, B>> {
private String username;
private SingleRefType singleRefType;
protected abstract B self();
public abstract C build();
public B username(String username) {
this.username = username;
return self();
}
public B singleRefType(SingleRefType singleRefType) {
this.singleRefType = singleRefType;
return self();
}
}
}

View File

@ -18,9 +18,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
@JsonSubTypes.Type(value = Cat.class, name = "CAT"),
@JsonSubTypes.Type(value = Dog.class, name = "DOG"),
})

View File

@ -45,7 +45,7 @@ public class ArrayTest implements Serializable {
@ApiModelProperty(value = "")
@JsonProperty("array_of_string")
public List<String> getArrayOfString() {
@Size(min=0,max=3)public List<String> getArrayOfString() {
return arrayOfString;
}

View File

@ -1,165 +0,0 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.Cat;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("BigCat")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class BigCat extends Cat implements Serializable {
public enum KindEnum {
LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars"));
private String value;
KindEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static KindEnum fromString(String s) {
for (KindEnum b : KindEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator
public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private KindEnum kind;
protected BigCat(BigCatBuilder<?, ?> b) {
super(b);
this.kind = b.kind;
}
public BigCat() {
}
/**
**/
public BigCat kind(KindEnum kind) {
this.kind = kind;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("kind")
public KindEnum getKind() {
return kind;
}
@JsonProperty("kind")
public void setKind(KindEnum kind) {
this.kind = kind;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BigCat bigCat = (BigCat) o;
return Objects.equals(this.kind, bigCat.kind) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(kind, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BigCat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static BigCatBuilder<?, ?> builder() {
return new BigCatBuilderImpl();
}
private static final class BigCatBuilderImpl extends BigCatBuilder<BigCat, BigCatBuilderImpl> {
@Override
protected BigCatBuilderImpl self() {
return this;
}
@Override
public BigCat build() {
return new BigCat(this);
}
}
public static abstract class BigCatBuilder<C extends BigCat, B extends BigCatBuilder<C, B>> extends CatBuilder<C, B> {
private KindEnum kind;
public B kind(KindEnum kind) {
this.kind = kind;
return self();
}
}
}

View File

@ -0,0 +1,119 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.jackson.nullable.JsonNullable;
import org.openapitools.model.ParentWithNullable;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("ChildWithNullable")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class ChildWithNullable extends ParentWithNullable implements Serializable {
private String otherProperty;
protected ChildWithNullable(ChildWithNullableBuilder<?, ?> b) {
super(b);
this.otherProperty = b.otherProperty;
}
public ChildWithNullable() {
}
/**
**/
public ChildWithNullable otherProperty(String otherProperty) {
this.otherProperty = otherProperty;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("otherProperty")
public String getOtherProperty() {
return otherProperty;
}
@JsonProperty("otherProperty")
public void setOtherProperty(String otherProperty) {
this.otherProperty = otherProperty;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChildWithNullable childWithNullable = (ChildWithNullable) o;
return Objects.equals(this.otherProperty, childWithNullable.otherProperty) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(otherProperty, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChildWithNullable {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static ChildWithNullableBuilder<?, ?> builder() {
return new ChildWithNullableBuilderImpl();
}
private static final class ChildWithNullableBuilderImpl extends ChildWithNullableBuilder<ChildWithNullable, ChildWithNullableBuilderImpl> {
@Override
protected ChildWithNullableBuilderImpl self() {
return this;
}
@Override
public ChildWithNullable build() {
return new ChildWithNullable(this);
}
}
public static abstract class ChildWithNullableBuilder<C extends ChildWithNullable, B extends ChildWithNullableBuilder<C, B>> extends ParentWithNullableBuilder<C, B> {
private String otherProperty;
public B otherProperty(String otherProperty) {
this.otherProperty = otherProperty;
return self();
}
}
}

View File

@ -2,9 +2,6 @@ package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
@ -18,14 +15,21 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesArray")
@JsonTypeName("DeprecatedObject")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AdditionalPropertiesArray extends HashMap<String, List> implements Serializable {
public class DeprecatedObject implements Serializable {
private String name;
protected DeprecatedObject(DeprecatedObjectBuilder<?, ?> b) {
this.name = b.name;
}
public DeprecatedObject() {
}
/**
**/
public AdditionalPropertiesArray name(String name) {
public DeprecatedObject name(String name) {
this.name = name;
return this;
}
@ -51,21 +55,20 @@ public class AdditionalPropertiesArray extends HashMap<String, List> implements
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
return Objects.equals(this.name, additionalPropertiesArray.name) &&
super.equals(o);
DeprecatedObject deprecatedObject = (DeprecatedObject) o;
return Objects.equals(this.name, deprecatedObject.name);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
return Objects.hash(name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesArray {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("class DeprecatedObject {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
@ -83,5 +86,33 @@ public class AdditionalPropertiesArray extends HashMap<String, List> implements
}
public static DeprecatedObjectBuilder<?, ?> builder() {
return new DeprecatedObjectBuilderImpl();
}
private static final class DeprecatedObjectBuilderImpl extends DeprecatedObjectBuilder<DeprecatedObject, DeprecatedObjectBuilderImpl> {
@Override
protected DeprecatedObjectBuilderImpl self() {
return this;
}
@Override
public DeprecatedObject build() {
return new DeprecatedObject(this);
}
}
public static abstract class DeprecatedObjectBuilder<C extends DeprecatedObject, B extends DeprecatedObjectBuilder<C, B>> {
private String name;
protected abstract B self();
public abstract C build();
public B name(String name) {
this.name = name;
return self();
}
}
}

View File

@ -3,7 +3,11 @@ package org.openapitools.model;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.jackson.nullable.JsonNullable;
import org.openapitools.model.OuterEnum;
import org.openapitools.model.OuterEnumDefaultValue;
import org.openapitools.model.OuterEnumInteger;
import org.openapitools.model.OuterEnumIntegerDefaultValue;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
@ -213,6 +217,9 @@ public class EnumTest implements Serializable {
private EnumNumberEnum enumNumber;
private OuterEnum outerEnum;
private OuterEnumInteger outerEnumInteger;
private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED;
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0;
protected EnumTest(EnumTestBuilder<?, ?> b) {
this.enumString = b.enumString;
@ -220,6 +227,9 @@ public class EnumTest implements Serializable {
this.enumInteger = b.enumInteger;
this.enumNumber = b.enumNumber;
this.outerEnum = b.outerEnum;
this.outerEnumInteger = b.outerEnumInteger;
this.outerEnumDefaultValue = b.outerEnumDefaultValue;
this.outerEnumIntegerDefaultValue = b.outerEnumIntegerDefaultValue;
}
public EnumTest() {
@ -320,6 +330,63 @@ public class EnumTest implements Serializable {
this.outerEnum = outerEnum;
}
/**
**/
public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("outerEnumInteger")
@Valid public OuterEnumInteger getOuterEnumInteger() {
return outerEnumInteger;
}
@JsonProperty("outerEnumInteger")
public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
}
/**
**/
public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("outerEnumDefaultValue")
@Valid public OuterEnumDefaultValue getOuterEnumDefaultValue() {
return outerEnumDefaultValue;
}
@JsonProperty("outerEnumDefaultValue")
public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
}
/**
**/
public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("outerEnumIntegerDefaultValue")
@Valid public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() {
return outerEnumIntegerDefaultValue;
}
@JsonProperty("outerEnumIntegerDefaultValue")
public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
}
@Override
public boolean equals(Object o) {
@ -334,12 +401,15 @@ public class EnumTest implements Serializable {
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
Objects.equals(this.outerEnum, enumTest.outerEnum) &&
Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) &&
Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) &&
Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue);
}
@Override
public int hashCode() {
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum, outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue);
}
@Override
@ -352,6 +422,9 @@ public class EnumTest implements Serializable {
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n");
sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n");
sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n");
sb.append("}");
return sb.toString();
}
@ -391,6 +464,9 @@ public class EnumTest implements Serializable {
private EnumIntegerEnum enumInteger;
private EnumNumberEnum enumNumber;
private OuterEnum outerEnum;
private OuterEnumInteger outerEnumInteger;
private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED;
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0;
protected abstract B self();
public abstract C build();
@ -415,6 +491,18 @@ public class EnumTest implements Serializable {
this.outerEnum = outerEnum;
return self();
}
public B outerEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
return self();
}
public B outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
return self();
}
public B outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
return self();
}
}
}

View File

@ -0,0 +1,166 @@
package org.openapitools.model;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("fakeBigDecimalMap_200_response")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class FakeBigDecimalMap200Response implements Serializable {
private BigDecimal someId;
private @Valid Map<String, BigDecimal> someMap = new HashMap<>();
protected FakeBigDecimalMap200Response(FakeBigDecimalMap200ResponseBuilder<?, ?> b) {
this.someId = b.someId;
this.someMap = b.someMap;
}
public FakeBigDecimalMap200Response() {
}
/**
**/
public FakeBigDecimalMap200Response someId(BigDecimal someId) {
this.someId = someId;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("someId")
@Valid public BigDecimal getSomeId() {
return someId;
}
@JsonProperty("someId")
public void setSomeId(BigDecimal someId) {
this.someId = someId;
}
/**
**/
public FakeBigDecimalMap200Response someMap(Map<String, BigDecimal> someMap) {
this.someMap = someMap;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("someMap")
@Valid public Map<String, BigDecimal> getSomeMap() {
return someMap;
}
@JsonProperty("someMap")
public void setSomeMap(Map<String, BigDecimal> someMap) {
this.someMap = someMap;
}
public FakeBigDecimalMap200Response putSomeMapItem(String key, BigDecimal someMapItem) {
if (this.someMap == null) {
this.someMap = new HashMap<>();
}
this.someMap.put(key, someMapItem);
return this;
}
public FakeBigDecimalMap200Response removeSomeMapItem(String key) {
if (this.someMap != null) {
this.someMap.remove(key);
}
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o;
return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) &&
Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap);
}
@Override
public int hashCode() {
return Objects.hash(someId, someMap);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FakeBigDecimalMap200Response {\n");
sb.append(" someId: ").append(toIndentedString(someId)).append("\n");
sb.append(" someMap: ").append(toIndentedString(someMap)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static FakeBigDecimalMap200ResponseBuilder<?, ?> builder() {
return new FakeBigDecimalMap200ResponseBuilderImpl();
}
private static final class FakeBigDecimalMap200ResponseBuilderImpl extends FakeBigDecimalMap200ResponseBuilder<FakeBigDecimalMap200Response, FakeBigDecimalMap200ResponseBuilderImpl> {
@Override
protected FakeBigDecimalMap200ResponseBuilderImpl self() {
return this;
}
@Override
public FakeBigDecimalMap200Response build() {
return new FakeBigDecimalMap200Response(this);
}
}
public static abstract class FakeBigDecimalMap200ResponseBuilder<C extends FakeBigDecimalMap200Response, B extends FakeBigDecimalMap200ResponseBuilder<C, B>> {
private BigDecimal someId;
private Map<String, BigDecimal> someMap = new HashMap<>();
protected abstract B self();
public abstract C build();
public B someId(BigDecimal someId) {
this.someId = someId;
return self();
}
public B someMap(Map<String, BigDecimal> someMap) {
this.someMap = someMap;
return self();
}
}
}

View File

@ -2,8 +2,6 @@ package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
@ -17,28 +15,35 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesBoolean")
@JsonTypeName("Foo")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implements Serializable {
private String name;
public class Foo implements Serializable {
private String bar = "bar";
protected Foo(FooBuilder<?, ?> b) {
this.bar = b.bar;
}
public Foo() {
}
/**
**/
public AdditionalPropertiesBoolean name(String name) {
this.name = name;
public Foo bar(String bar) {
this.bar = bar;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("name")
public String getName() {
return name;
@JsonProperty("bar")
public String getBar() {
return bar;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
@JsonProperty("bar")
public void setBar(String bar) {
this.bar = bar;
}
@ -50,22 +55,21 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implem
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
super.equals(o);
Foo foo = (Foo) o;
return Objects.equals(this.bar, foo.bar);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
return Objects.hash(bar);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesBoolean {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("class Foo {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append("}");
return sb.toString();
}
@ -82,5 +86,33 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implem
}
public static FooBuilder<?, ?> builder() {
return new FooBuilderImpl();
}
private static final class FooBuilderImpl extends FooBuilder<Foo, FooBuilderImpl> {
@Override
protected FooBuilderImpl self() {
return this;
}
@Override
public Foo build() {
return new Foo(this);
}
}
public static abstract class FooBuilder<C extends Foo, B extends FooBuilder<C, B>> {
private String bar = "bar";
protected abstract B self();
public abstract C build();
public B bar(String bar) {
this.bar = bar;
return self();
}
}
}

View File

@ -0,0 +1,120 @@
package org.openapitools.model;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.Foo;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("_foo_get_default_response")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class FooGetDefaultResponse implements Serializable {
private Foo string;
protected FooGetDefaultResponse(FooGetDefaultResponseBuilder<?, ?> b) {
this.string = b.string;
}
public FooGetDefaultResponse() {
}
/**
**/
public FooGetDefaultResponse string(Foo string) {
this.string = string;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("string")
@Valid public Foo getString() {
return string;
}
@JsonProperty("string")
public void setString(Foo string) {
this.string = string;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o;
return Objects.equals(this.string, fooGetDefaultResponse.string);
}
@Override
public int hashCode() {
return Objects.hash(string);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FooGetDefaultResponse {\n");
sb.append(" string: ").append(toIndentedString(string)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static FooGetDefaultResponseBuilder<?, ?> builder() {
return new FooGetDefaultResponseBuilderImpl();
}
private static final class FooGetDefaultResponseBuilderImpl extends FooGetDefaultResponseBuilder<FooGetDefaultResponse, FooGetDefaultResponseBuilderImpl> {
@Override
protected FooGetDefaultResponseBuilderImpl self() {
return this;
}
@Override
public FooGetDefaultResponse build() {
return new FooGetDefaultResponse(this);
}
}
public static abstract class FooGetDefaultResponseBuilder<C extends FooGetDefaultResponse, B extends FooGetDefaultResponseBuilder<C, B>> {
private Foo string;
protected abstract B self();
public abstract C build();
public B string(Foo string) {
this.string = string;
return self();
}
}
}

View File

@ -31,6 +31,7 @@ public class FormatTest implements Serializable {
private BigDecimal number;
private Float _float;
private Double _double;
private BigDecimal decimal;
private String string;
private byte[] _byte;
private File binary;
@ -38,7 +39,8 @@ public class FormatTest implements Serializable {
private Date dateTime;
private UUID uuid;
private String password;
private BigDecimal bigDecimal;
private String patternWithDigits;
private String patternWithDigitsAndDelimiter;
protected FormatTest(FormatTestBuilder<?, ?> b) {
this.integer = b.integer;
@ -47,6 +49,7 @@ public class FormatTest implements Serializable {
this.number = b.number;
this._float = b._float;
this._double = b._double;
this.decimal = b.decimal;
this.string = b.string;
this._byte = b._byte;
this.binary = b.binary;
@ -54,7 +57,8 @@ public class FormatTest implements Serializable {
this.dateTime = b.dateTime;
this.uuid = b.uuid;
this.password = b.password;
this.bigDecimal = b.bigDecimal;
this.patternWithDigits = b.patternWithDigits;
this.patternWithDigitsAndDelimiter = b.patternWithDigitsAndDelimiter;
}
public FormatTest() {
@ -184,6 +188,25 @@ public class FormatTest implements Serializable {
this._double = _double;
}
/**
**/
public FormatTest decimal(BigDecimal decimal) {
this.decimal = decimal;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("decimal")
@Valid public BigDecimal getDecimal() {
return decimal;
}
@JsonProperty("decimal")
public void setDecimal(BigDecimal decimal) {
this.decimal = decimal;
}
/**
**/
public FormatTest string(String string) {
@ -213,7 +236,7 @@ public class FormatTest implements Serializable {
@ApiModelProperty(required = true, value = "")
@JsonProperty("byte")
@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")public byte[] getByte() {
@NotNull public byte[] getByte() {
return _byte;
}
@ -318,22 +341,43 @@ public class FormatTest implements Serializable {
}
/**
* A string that is a 10 digit number. Can have leading zeros.
**/
public FormatTest bigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
public FormatTest patternWithDigits(String patternWithDigits) {
this.patternWithDigits = patternWithDigits;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("BigDecimal")
@Valid public BigDecimal getBigDecimal() {
return bigDecimal;
@ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.")
@JsonProperty("pattern_with_digits")
@Pattern(regexp="^\\d{10}$")public String getPatternWithDigits() {
return patternWithDigits;
}
@JsonProperty("BigDecimal")
public void setBigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
@JsonProperty("pattern_with_digits")
public void setPatternWithDigits(String patternWithDigits) {
this.patternWithDigits = patternWithDigits;
}
/**
* A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01.
**/
public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
return this;
}
@ApiModelProperty(value = "A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
@JsonProperty("pattern_with_digits_and_delimiter")
@Pattern(regexp="/^image_\\d{1,3}$/i")public String getPatternWithDigitsAndDelimiter() {
return patternWithDigitsAndDelimiter;
}
@JsonProperty("pattern_with_digits_and_delimiter")
public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
}
@ -352,6 +396,7 @@ public class FormatTest implements Serializable {
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.decimal, formatTest.decimal) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
@ -359,12 +404,13 @@ public class FormatTest implements Serializable {
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password) &&
Objects.equals(this.bigDecimal, formatTest.bigDecimal);
Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) &&
Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal);
return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
}
@Override
@ -378,6 +424,7 @@ public class FormatTest implements Serializable {
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
@ -385,7 +432,8 @@ public class FormatTest implements Serializable {
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append("*").append("\n");
sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n");
sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n");
sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n");
sb.append("}");
return sb.toString();
}
@ -426,6 +474,7 @@ public class FormatTest implements Serializable {
private BigDecimal number;
private Float _float;
private Double _double;
private BigDecimal decimal;
private String string;
private byte[] _byte;
private File binary;
@ -433,7 +482,8 @@ public class FormatTest implements Serializable {
private Date dateTime;
private UUID uuid;
private String password;
private BigDecimal bigDecimal;
private String patternWithDigits;
private String patternWithDigitsAndDelimiter;
protected abstract B self();
public abstract C build();
@ -462,6 +512,10 @@ public class FormatTest implements Serializable {
this._double = _double;
return self();
}
public B decimal(BigDecimal decimal) {
this.decimal = decimal;
return self();
}
public B string(String string) {
this.string = string;
return self();
@ -490,8 +544,12 @@ public class FormatTest implements Serializable {
this.password = password;
return self();
}
public B bigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
public B patternWithDigits(String patternWithDigits) {
this.patternWithDigits = patternWithDigits;
return self();
}
public B patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
return self();
}
}

View File

@ -0,0 +1,121 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.jackson.nullable.JsonNullable;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
**/
@ApiModel(description = "Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.")
@JsonTypeName("HealthCheckResult")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class HealthCheckResult implements Serializable {
private String nullableMessage;
protected HealthCheckResult(HealthCheckResultBuilder<?, ?> b) {
this.nullableMessage = b.nullableMessage;
}
public HealthCheckResult() {
}
/**
**/
public HealthCheckResult nullableMessage(String nullableMessage) {
this.nullableMessage = nullableMessage;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("NullableMessage")
public String getNullableMessage() {
return nullableMessage;
}
@JsonProperty("NullableMessage")
public void setNullableMessage(String nullableMessage) {
this.nullableMessage = nullableMessage;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HealthCheckResult healthCheckResult = (HealthCheckResult) o;
return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage);
}
@Override
public int hashCode() {
return Objects.hash(nullableMessage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HealthCheckResult {\n");
sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static HealthCheckResultBuilder<?, ?> builder() {
return new HealthCheckResultBuilderImpl();
}
private static final class HealthCheckResultBuilderImpl extends HealthCheckResultBuilder<HealthCheckResult, HealthCheckResultBuilderImpl> {
@Override
protected HealthCheckResultBuilderImpl self() {
return this;
}
@Override
public HealthCheckResult build() {
return new HealthCheckResult(this);
}
}
public static abstract class HealthCheckResultBuilder<C extends HealthCheckResult, B extends HealthCheckResultBuilder<C, B>> {
private String nullableMessage;
protected abstract B self();
public abstract C build();
public B nullableMessage(String nullableMessage) {
this.nullableMessage = nullableMessage;
return self();
}
}
}

View File

@ -0,0 +1,431 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.joda.time.LocalDate;
import org.openapitools.jackson.nullable.JsonNullable;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("NullableClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class NullableClass extends HashMap<String, Object> implements Serializable {
private Integer integerProp;
private BigDecimal numberProp;
private Boolean booleanProp;
private String stringProp;
private LocalDate dateProp;
private Date datetimeProp;
private @Valid List<Object> arrayNullableProp;
private @Valid List<Object> arrayAndItemsNullableProp;
private @Valid List<Object> arrayItemsNullable = new ArrayList<>();
private @Valid Map<String, Object> objectNullableProp;
private @Valid Map<String, Object> objectAndItemsNullableProp;
private @Valid Map<String, Object> objectItemsNullable = new HashMap<>();
/**
**/
public NullableClass integerProp(Integer integerProp) {
this.integerProp = integerProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("integer_prop")
public Integer getIntegerProp() {
return integerProp;
}
@JsonProperty("integer_prop")
public void setIntegerProp(Integer integerProp) {
this.integerProp = integerProp;
}
/**
**/
public NullableClass numberProp(BigDecimal numberProp) {
this.numberProp = numberProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("number_prop")
@Valid public BigDecimal getNumberProp() {
return numberProp;
}
@JsonProperty("number_prop")
public void setNumberProp(BigDecimal numberProp) {
this.numberProp = numberProp;
}
/**
**/
public NullableClass booleanProp(Boolean booleanProp) {
this.booleanProp = booleanProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("boolean_prop")
public Boolean getBooleanProp() {
return booleanProp;
}
@JsonProperty("boolean_prop")
public void setBooleanProp(Boolean booleanProp) {
this.booleanProp = booleanProp;
}
/**
**/
public NullableClass stringProp(String stringProp) {
this.stringProp = stringProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("string_prop")
public String getStringProp() {
return stringProp;
}
@JsonProperty("string_prop")
public void setStringProp(String stringProp) {
this.stringProp = stringProp;
}
/**
**/
public NullableClass dateProp(LocalDate dateProp) {
this.dateProp = dateProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("date_prop")
@Valid public LocalDate getDateProp() {
return dateProp;
}
@JsonProperty("date_prop")
public void setDateProp(LocalDate dateProp) {
this.dateProp = dateProp;
}
/**
**/
public NullableClass datetimeProp(Date datetimeProp) {
this.datetimeProp = datetimeProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("datetime_prop")
@Valid public Date getDatetimeProp() {
return datetimeProp;
}
@JsonProperty("datetime_prop")
public void setDatetimeProp(Date datetimeProp) {
this.datetimeProp = datetimeProp;
}
/**
**/
public NullableClass arrayNullableProp(List<Object> arrayNullableProp) {
this.arrayNullableProp = arrayNullableProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("array_nullable_prop")
public List<Object> getArrayNullableProp() {
return arrayNullableProp;
}
@JsonProperty("array_nullable_prop")
public void setArrayNullableProp(List<Object> arrayNullableProp) {
this.arrayNullableProp = arrayNullableProp;
}
public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) {
if (this.arrayNullableProp == null) {
this.arrayNullableProp = new ArrayList<>();
}
this.arrayNullableProp.add(arrayNullablePropItem);
return this;
}
public NullableClass removeArrayNullablePropItem(Object arrayNullablePropItem) {
if (arrayNullablePropItem != null && this.arrayNullableProp != null) {
this.arrayNullableProp.remove(arrayNullablePropItem);
}
return this;
}
/**
**/
public NullableClass arrayAndItemsNullableProp(List<Object> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = arrayAndItemsNullableProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("array_and_items_nullable_prop")
public List<Object> getArrayAndItemsNullableProp() {
return arrayAndItemsNullableProp;
}
@JsonProperty("array_and_items_nullable_prop")
public void setArrayAndItemsNullableProp(List<Object> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = arrayAndItemsNullableProp;
}
public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) {
if (this.arrayAndItemsNullableProp == null) {
this.arrayAndItemsNullableProp = new ArrayList<>();
}
this.arrayAndItemsNullableProp.add(arrayAndItemsNullablePropItem);
return this;
}
public NullableClass removeArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) {
if (arrayAndItemsNullablePropItem != null && this.arrayAndItemsNullableProp != null) {
this.arrayAndItemsNullableProp.remove(arrayAndItemsNullablePropItem);
}
return this;
}
/**
**/
public NullableClass arrayItemsNullable(List<Object> arrayItemsNullable) {
this.arrayItemsNullable = arrayItemsNullable;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("array_items_nullable")
public List<Object> getArrayItemsNullable() {
return arrayItemsNullable;
}
@JsonProperty("array_items_nullable")
public void setArrayItemsNullable(List<Object> arrayItemsNullable) {
this.arrayItemsNullable = arrayItemsNullable;
}
public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) {
if (this.arrayItemsNullable == null) {
this.arrayItemsNullable = new ArrayList<>();
}
this.arrayItemsNullable.add(arrayItemsNullableItem);
return this;
}
public NullableClass removeArrayItemsNullableItem(Object arrayItemsNullableItem) {
if (arrayItemsNullableItem != null && this.arrayItemsNullable != null) {
this.arrayItemsNullable.remove(arrayItemsNullableItem);
}
return this;
}
/**
**/
public NullableClass objectNullableProp(Map<String, Object> objectNullableProp) {
this.objectNullableProp = objectNullableProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("object_nullable_prop")
public Map<String, Object> getObjectNullableProp() {
return objectNullableProp;
}
@JsonProperty("object_nullable_prop")
public void setObjectNullableProp(Map<String, Object> objectNullableProp) {
this.objectNullableProp = objectNullableProp;
}
public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) {
if (this.objectNullableProp == null) {
this.objectNullableProp = new HashMap<>();
}
this.objectNullableProp.put(key, objectNullablePropItem);
return this;
}
public NullableClass removeObjectNullablePropItem(String key) {
if (this.objectNullableProp != null) {
this.objectNullableProp.remove(key);
}
return this;
}
/**
**/
public NullableClass objectAndItemsNullableProp(Map<String, Object> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = objectAndItemsNullableProp;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("object_and_items_nullable_prop")
public Map<String, Object> getObjectAndItemsNullableProp() {
return objectAndItemsNullableProp;
}
@JsonProperty("object_and_items_nullable_prop")
public void setObjectAndItemsNullableProp(Map<String, Object> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = objectAndItemsNullableProp;
}
public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) {
if (this.objectAndItemsNullableProp == null) {
this.objectAndItemsNullableProp = new HashMap<>();
}
this.objectAndItemsNullableProp.put(key, objectAndItemsNullablePropItem);
return this;
}
public NullableClass removeObjectAndItemsNullablePropItem(String key) {
if (this.objectAndItemsNullableProp != null) {
this.objectAndItemsNullableProp.remove(key);
}
return this;
}
/**
**/
public NullableClass objectItemsNullable(Map<String, Object> objectItemsNullable) {
this.objectItemsNullable = objectItemsNullable;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("object_items_nullable")
public Map<String, Object> getObjectItemsNullable() {
return objectItemsNullable;
}
@JsonProperty("object_items_nullable")
public void setObjectItemsNullable(Map<String, Object> objectItemsNullable) {
this.objectItemsNullable = objectItemsNullable;
}
public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) {
if (this.objectItemsNullable == null) {
this.objectItemsNullable = new HashMap<>();
}
this.objectItemsNullable.put(key, objectItemsNullableItem);
return this;
}
public NullableClass removeObjectItemsNullableItem(String key) {
if (this.objectItemsNullable != null) {
this.objectItemsNullable.remove(key);
}
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NullableClass nullableClass = (NullableClass) o;
return Objects.equals(this.integerProp, nullableClass.integerProp) &&
Objects.equals(this.numberProp, nullableClass.numberProp) &&
Objects.equals(this.booleanProp, nullableClass.booleanProp) &&
Objects.equals(this.stringProp, nullableClass.stringProp) &&
Objects.equals(this.dateProp, nullableClass.dateProp) &&
Objects.equals(this.datetimeProp, nullableClass.datetimeProp) &&
Objects.equals(this.arrayNullableProp, nullableClass.arrayNullableProp) &&
Objects.equals(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) &&
Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) &&
Objects.equals(this.objectNullableProp, nullableClass.objectNullableProp) &&
Objects.equals(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) &&
Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(integerProp, numberProp, booleanProp, stringProp, dateProp, datetimeProp, arrayNullableProp, arrayAndItemsNullableProp, arrayItemsNullable, objectNullableProp, objectAndItemsNullableProp, objectItemsNullable, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NullableClass {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n");
sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n");
sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n");
sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n");
sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n");
sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n");
sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n");
sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n");
sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n");
sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n");
sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n");
sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,223 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.model.DeprecatedObject;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("ObjectWithDeprecatedFields")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class ObjectWithDeprecatedFields implements Serializable {
private String uuid;
private BigDecimal id;
private DeprecatedObject deprecatedRef;
private @Valid List<String> bars = new ArrayList<>();
protected ObjectWithDeprecatedFields(ObjectWithDeprecatedFieldsBuilder<?, ?> b) {
this.uuid = b.uuid;
this.id = b.id;
this.deprecatedRef = b.deprecatedRef;
this.bars = b.bars;
}
public ObjectWithDeprecatedFields() {
}
/**
**/
public ObjectWithDeprecatedFields uuid(String uuid) {
this.uuid = uuid;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("uuid")
public String getUuid() {
return uuid;
}
@JsonProperty("uuid")
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
**/
public ObjectWithDeprecatedFields id(BigDecimal id) {
this.id = id;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("id")
@Valid public BigDecimal getId() {
return id;
}
@JsonProperty("id")
public void setId(BigDecimal id) {
this.id = id;
}
/**
**/
public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("deprecatedRef")
@Valid public DeprecatedObject getDeprecatedRef() {
return deprecatedRef;
}
@JsonProperty("deprecatedRef")
public void setDeprecatedRef(DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
}
/**
**/
public ObjectWithDeprecatedFields bars(List<String> bars) {
this.bars = bars;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("bars")
public List<String> getBars() {
return bars;
}
@JsonProperty("bars")
public void setBars(List<String> bars) {
this.bars = bars;
}
public ObjectWithDeprecatedFields addBarsItem(String barsItem) {
if (this.bars == null) {
this.bars = new ArrayList<>();
}
this.bars.add(barsItem);
return this;
}
public ObjectWithDeprecatedFields removeBarsItem(String barsItem) {
if (barsItem != null && this.bars != null) {
this.bars.remove(barsItem);
}
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o;
return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) &&
Objects.equals(this.id, objectWithDeprecatedFields.id) &&
Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) &&
Objects.equals(this.bars, objectWithDeprecatedFields.bars);
}
@Override
public int hashCode() {
return Objects.hash(uuid, id, deprecatedRef, bars);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ObjectWithDeprecatedFields {\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n");
sb.append(" bars: ").append(toIndentedString(bars)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static ObjectWithDeprecatedFieldsBuilder<?, ?> builder() {
return new ObjectWithDeprecatedFieldsBuilderImpl();
}
private static final class ObjectWithDeprecatedFieldsBuilderImpl extends ObjectWithDeprecatedFieldsBuilder<ObjectWithDeprecatedFields, ObjectWithDeprecatedFieldsBuilderImpl> {
@Override
protected ObjectWithDeprecatedFieldsBuilderImpl self() {
return this;
}
@Override
public ObjectWithDeprecatedFields build() {
return new ObjectWithDeprecatedFields(this);
}
}
public static abstract class ObjectWithDeprecatedFieldsBuilder<C extends ObjectWithDeprecatedFields, B extends ObjectWithDeprecatedFieldsBuilder<C, B>> {
private String uuid;
private BigDecimal id;
private DeprecatedObject deprecatedRef;
private List<String> bars = new ArrayList<>();
protected abstract B self();
public abstract C build();
public B uuid(String uuid) {
this.uuid = uuid;
return self();
}
public B id(BigDecimal id) {
this.id = id;
return self();
}
public B deprecatedRef(DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
return self();
}
public B bars(List<String> bars) {
this.bars = bars;
return self();
}
}
}

View File

@ -36,7 +36,7 @@ public enum OuterEnum {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
return null;
}
@Override
@ -52,7 +52,7 @@ public enum OuterEnum {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
return null;
}
}

View File

@ -0,0 +1,59 @@
package org.openapitools.model;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumDefaultValue
*/
public enum OuterEnumDefaultValue {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
private String value;
OuterEnumDefaultValue(String value) {
this.value = value;
}
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static OuterEnumDefaultValue fromString(String s) {
for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumDefaultValue fromValue(String value) {
for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@ -0,0 +1,59 @@
package org.openapitools.model;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumInteger
*/
public enum OuterEnumInteger {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2);
private Integer value;
OuterEnumInteger(Integer value) {
this.value = value;
}
/**
* Convert a String into Integer, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static OuterEnumInteger fromString(String s) {
for (OuterEnumInteger b : OuterEnumInteger.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumInteger fromValue(Integer value) {
for (OuterEnumInteger b : OuterEnumInteger.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@ -0,0 +1,59 @@
package org.openapitools.model;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnumIntegerDefaultValue
*/
public enum OuterEnumIntegerDefaultValue {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2);
private Integer value;
OuterEnumIntegerDefaultValue(Integer value) {
this.value = value;
}
/**
* Convert a String into Integer, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static OuterEnumIntegerDefaultValue fromString(String s) {
for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumIntegerDefaultValue fromValue(Integer value) {
for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@ -0,0 +1,119 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.OuterEnumInteger;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("OuterObjectWithEnumProperty")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class OuterObjectWithEnumProperty implements Serializable {
private OuterEnumInteger value;
protected OuterObjectWithEnumProperty(OuterObjectWithEnumPropertyBuilder<?, ?> b) {
this.value = b.value;
}
public OuterObjectWithEnumProperty() {
}
/**
**/
public OuterObjectWithEnumProperty value(OuterEnumInteger value) {
this.value = value;
return this;
}
@ApiModelProperty(required = true, value = "")
@JsonProperty("value")
@NotNull @Valid public OuterEnumInteger getValue() {
return value;
}
@JsonProperty("value")
public void setValue(OuterEnumInteger value) {
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o;
return Objects.equals(this.value, outerObjectWithEnumProperty.value);
}
@Override
public int hashCode() {
return Objects.hash(value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterObjectWithEnumProperty {\n");
sb.append(" value: ").append(toIndentedString(value)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static OuterObjectWithEnumPropertyBuilder<?, ?> builder() {
return new OuterObjectWithEnumPropertyBuilderImpl();
}
private static final class OuterObjectWithEnumPropertyBuilderImpl extends OuterObjectWithEnumPropertyBuilder<OuterObjectWithEnumProperty, OuterObjectWithEnumPropertyBuilderImpl> {
@Override
protected OuterObjectWithEnumPropertyBuilderImpl self() {
return this;
}
@Override
public OuterObjectWithEnumProperty build() {
return new OuterObjectWithEnumProperty(this);
}
}
public static abstract class OuterObjectWithEnumPropertyBuilder<C extends OuterObjectWithEnumProperty, B extends OuterObjectWithEnumPropertyBuilder<C, B>> {
private OuterEnumInteger value;
protected abstract B self();
public abstract C build();
public B value(OuterEnumInteger value) {
this.value = value;
return self();
}
}
}

View File

@ -0,0 +1,201 @@
package org.openapitools.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.jackson.nullable.JsonNullable;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"),
})
@JsonTypeName("ParentWithNullable")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class ParentWithNullable implements Serializable {
public enum TypeEnum {
CHILDWITHNULLABLE(String.valueOf("ChildWithNullable"));
private String value;
TypeEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static TypeEnum fromString(String s) {
for (TypeEnum b : TypeEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private TypeEnum type;
private String nullableProperty;
protected ParentWithNullable(ParentWithNullableBuilder<?, ?> b) {
this.type = b.type;
this.nullableProperty = b.nullableProperty;
}
public ParentWithNullable() {
}
/**
**/
public ParentWithNullable type(TypeEnum type) {
this.type = type;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("type")
public TypeEnum getType() {
return type;
}
@JsonProperty("type")
public void setType(TypeEnum type) {
this.type = type;
}
/**
**/
public ParentWithNullable nullableProperty(String nullableProperty) {
this.nullableProperty = nullableProperty;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("nullableProperty")
public String getNullableProperty() {
return nullableProperty;
}
@JsonProperty("nullableProperty")
public void setNullableProperty(String nullableProperty) {
this.nullableProperty = nullableProperty;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ParentWithNullable parentWithNullable = (ParentWithNullable) o;
return Objects.equals(this.type, parentWithNullable.type) &&
Objects.equals(this.nullableProperty, parentWithNullable.nullableProperty);
}
@Override
public int hashCode() {
return Objects.hash(type, nullableProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ParentWithNullable {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static ParentWithNullableBuilder<?, ?> builder() {
return new ParentWithNullableBuilderImpl();
}
private static final class ParentWithNullableBuilderImpl extends ParentWithNullableBuilder<ParentWithNullable, ParentWithNullableBuilderImpl> {
@Override
protected ParentWithNullableBuilderImpl self() {
return this;
}
@Override
public ParentWithNullable build() {
return new ParentWithNullable(this);
}
}
public static abstract class ParentWithNullableBuilder<C extends ParentWithNullable, B extends ParentWithNullableBuilder<C, B>> {
private TypeEnum type;
private String nullableProperty;
protected abstract B self();
public abstract C build();
public B type(TypeEnum type) {
this.type = type;
return self();
}
public B nullableProperty(String nullableProperty) {
this.nullableProperty = nullableProperty;
return self();
}
}
}

View File

@ -0,0 +1,57 @@
package org.openapitools.model;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets SingleRefType
*/
public enum SingleRefType {
ADMIN("admin"),
USER("user");
private String value;
SingleRefType(String value) {
this.value = value;
}
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static SingleRefType fromString(String s) {
for (SingleRefType b : SingleRefType.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static SingleRefType fromValue(String value) {
for (SingleRefType b : SingleRefType.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("$special[model.name]")
@JsonTypeName("_special_model.name_")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class SpecialModelName implements Serializable {
private Long $specialPropertyName;
@ -56,8 +56,8 @@ public class SpecialModelName implements Serializable {
if (o == null || getClass() != o.getClass()) {
return false;
}
SpecialModelName $specialModelName = (SpecialModelName) o;
return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName);
SpecialModelName specialModelName = (SpecialModelName) o;
return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName);
}
@Override

View File

@ -1,5 +1,6 @@
package org.openapitools.model;
import com.fasterxml.jackson.annotation.JsonTypeName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
@ -17,28 +18,28 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("AdditionalPropertiesAnyType")
@JsonTypeName("testInlineFreeformAdditionalProperties_request")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class AdditionalPropertiesAnyType extends HashMap<String, Object> implements Serializable {
private String name;
public class TestInlineFreeformAdditionalPropertiesRequest extends HashMap<String, Object> implements Serializable {
private String someProperty;
/**
**/
public AdditionalPropertiesAnyType name(String name) {
this.name = name;
public TestInlineFreeformAdditionalPropertiesRequest someProperty(String someProperty) {
this.someProperty = someProperty;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("name")
public String getName() {
return name;
@JsonProperty("someProperty")
public String getSomeProperty() {
return someProperty;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
@JsonProperty("someProperty")
public void setSomeProperty(String someProperty) {
this.someProperty = someProperty;
}
@ -50,22 +51,22 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> impleme
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = (TestInlineFreeformAdditionalPropertiesRequest) o;
return Objects.equals(this.someProperty, testInlineFreeformAdditionalPropertiesRequest.someProperty) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
return Objects.hash(someProperty, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesAnyType {\n");
sb.append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" someProperty: ").append(toIndentedString(someProperty)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@ -1,250 +0,0 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("TypeHolderDefault")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class TypeHolderDefault implements Serializable {
private String stringItem = "what";
private BigDecimal numberItem;
private Integer integerItem;
private Boolean boolItem = true;
private @Valid List<Integer> arrayItem = new ArrayList<>();
protected TypeHolderDefault(TypeHolderDefaultBuilder<?, ?> b) {
this.stringItem = b.stringItem;
this.numberItem = b.numberItem;
this.integerItem = b.integerItem;
this.boolItem = b.boolItem;
this.arrayItem = b.arrayItem;
}
public TypeHolderDefault() {
}
/**
**/
public TypeHolderDefault stringItem(String stringItem) {
this.stringItem = stringItem;
return this;
}
@ApiModelProperty(required = true, value = "")
@JsonProperty("string_item")
@NotNull public String getStringItem() {
return stringItem;
}
@JsonProperty("string_item")
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
/**
**/
public TypeHolderDefault numberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
return this;
}
@ApiModelProperty(required = true, value = "")
@JsonProperty("number_item")
@NotNull @Valid public BigDecimal getNumberItem() {
return numberItem;
}
@JsonProperty("number_item")
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
/**
**/
public TypeHolderDefault integerItem(Integer integerItem) {
this.integerItem = integerItem;
return this;
}
@ApiModelProperty(required = true, value = "")
@JsonProperty("integer_item")
@NotNull public Integer getIntegerItem() {
return integerItem;
}
@JsonProperty("integer_item")
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
/**
**/
public TypeHolderDefault boolItem(Boolean boolItem) {
this.boolItem = boolItem;
return this;
}
@ApiModelProperty(required = true, value = "")
@JsonProperty("bool_item")
@NotNull public Boolean getBoolItem() {
return boolItem;
}
@JsonProperty("bool_item")
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
/**
**/
public TypeHolderDefault arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
return this;
}
@ApiModelProperty(required = true, value = "")
@JsonProperty("array_item")
@NotNull public List<Integer> getArrayItem() {
return arrayItem;
}
@JsonProperty("array_item")
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}
public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) {
if (this.arrayItem == null) {
this.arrayItem = new ArrayList<>();
}
this.arrayItem.add(arrayItemItem);
return this;
}
public TypeHolderDefault removeArrayItemItem(Integer arrayItemItem) {
if (arrayItemItem != null && this.arrayItem != null) {
this.arrayItem.remove(arrayItemItem);
}
return this;
}
@Override
public boolean equals(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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static TypeHolderDefaultBuilder<?, ?> builder() {
return new TypeHolderDefaultBuilderImpl();
}
private static final class TypeHolderDefaultBuilderImpl extends TypeHolderDefaultBuilder<TypeHolderDefault, TypeHolderDefaultBuilderImpl> {
@Override
protected TypeHolderDefaultBuilderImpl self() {
return this;
}
@Override
public TypeHolderDefault build() {
return new TypeHolderDefault(this);
}
}
public static abstract class TypeHolderDefaultBuilder<C extends TypeHolderDefault, B extends TypeHolderDefaultBuilder<C, B>> {
private String stringItem = "what";
private BigDecimal numberItem;
private Integer integerItem;
private Boolean boolItem = true;
private List<Integer> arrayItem = new ArrayList<>();
protected abstract B self();
public abstract C build();
public B stringItem(String stringItem) {
this.stringItem = stringItem;
return self();
}
public B numberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
return self();
}
public B integerItem(Integer integerItem) {
this.integerItem = integerItem;
return self();
}
public B boolItem(Boolean boolItem) {
this.boolItem = boolItem;
return self();
}
public B arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
return self();
}
}
}

View File

@ -1,278 +0,0 @@
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeName("TypeHolderExample")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class TypeHolderExample implements Serializable {
private String stringItem;
private BigDecimal numberItem;
private Float floatItem;
private Integer integerItem;
private Boolean boolItem;
private @Valid List<Integer> arrayItem = new ArrayList<>();
protected TypeHolderExample(TypeHolderExampleBuilder<?, ?> b) {
this.stringItem = b.stringItem;
this.numberItem = b.numberItem;
this.floatItem = b.floatItem;
this.integerItem = b.integerItem;
this.boolItem = b.boolItem;
this.arrayItem = b.arrayItem;
}
public TypeHolderExample() {
}
/**
**/
public TypeHolderExample stringItem(String stringItem) {
this.stringItem = stringItem;
return this;
}
@ApiModelProperty(example = "what", required = true, value = "")
@JsonProperty("string_item")
@NotNull public String getStringItem() {
return stringItem;
}
@JsonProperty("string_item")
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
/**
**/
public TypeHolderExample numberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
return this;
}
@ApiModelProperty(example = "1.234", required = true, value = "")
@JsonProperty("number_item")
@NotNull @Valid public BigDecimal getNumberItem() {
return numberItem;
}
@JsonProperty("number_item")
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
/**
**/
public TypeHolderExample floatItem(Float floatItem) {
this.floatItem = floatItem;
return this;
}
@ApiModelProperty(example = "1.234", required = true, value = "")
@JsonProperty("float_item")
@NotNull public Float getFloatItem() {
return floatItem;
}
@JsonProperty("float_item")
public void setFloatItem(Float floatItem) {
this.floatItem = floatItem;
}
/**
**/
public TypeHolderExample integerItem(Integer integerItem) {
this.integerItem = integerItem;
return this;
}
@ApiModelProperty(example = "-2", required = true, value = "")
@JsonProperty("integer_item")
@NotNull public Integer getIntegerItem() {
return integerItem;
}
@JsonProperty("integer_item")
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
/**
**/
public TypeHolderExample boolItem(Boolean boolItem) {
this.boolItem = boolItem;
return this;
}
@ApiModelProperty(example = "true", required = true, value = "")
@JsonProperty("bool_item")
@NotNull public Boolean getBoolItem() {
return boolItem;
}
@JsonProperty("bool_item")
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
/**
**/
public TypeHolderExample arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
return this;
}
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
@JsonProperty("array_item")
@NotNull public List<Integer> getArrayItem() {
return arrayItem;
}
@JsonProperty("array_item")
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}
public TypeHolderExample addArrayItemItem(Integer arrayItemItem) {
if (this.arrayItem == null) {
this.arrayItem = new ArrayList<>();
}
this.arrayItem.add(arrayItemItem);
return this;
}
public TypeHolderExample removeArrayItemItem(Integer arrayItemItem) {
if (arrayItemItem != null && this.arrayItem != null) {
this.arrayItem.remove(arrayItemItem);
}
return this;
}
@Override
public boolean equals(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.floatItem, typeHolderExample.floatItem) &&
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, floatItem, 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(" floatItem: ").append(toIndentedString(floatItem)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static TypeHolderExampleBuilder<?, ?> builder() {
return new TypeHolderExampleBuilderImpl();
}
private static final class TypeHolderExampleBuilderImpl extends TypeHolderExampleBuilder<TypeHolderExample, TypeHolderExampleBuilderImpl> {
@Override
protected TypeHolderExampleBuilderImpl self() {
return this;
}
@Override
public TypeHolderExample build() {
return new TypeHolderExample(this);
}
}
public static abstract class TypeHolderExampleBuilder<C extends TypeHolderExample, B extends TypeHolderExampleBuilder<C, B>> {
private String stringItem;
private BigDecimal numberItem;
private Float floatItem;
private Integer integerItem;
private Boolean boolItem;
private List<Integer> arrayItem = new ArrayList<>();
protected abstract B self();
public abstract C build();
public B stringItem(String stringItem) {
this.stringItem = stringItem;
return self();
}
public B numberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
return self();
}
public B floatItem(Float floatItem) {
this.floatItem = floatItem;
return self();
}
public B integerItem(Integer integerItem) {
this.integerItem = integerItem;
return self();
}
public B boolItem(Boolean boolItem) {
this.boolItem = boolItem;
return self();
}
public B arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
return self();
}
}
}