diff --git a/bin/configs/jaxrs-spec-interface-response.yaml b/bin/configs/jaxrs-spec-interface-response.yaml index 3e4b7edfb933..21aa2e13c16f 100644 --- a/bin/configs/jaxrs-spec-interface-response.yaml +++ b/bin/configs/jaxrs-spec-interface-response.yaml @@ -1,6 +1,6 @@ generatorName: jaxrs-spec outputDir: samples/server/petstore/jaxrs-spec-interface-response -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/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec additionalProperties: artifactId: jaxrs-spec-interface-response-petstore-server diff --git a/bin/configs/jaxrs-spec-interface.yaml b/bin/configs/jaxrs-spec-interface.yaml index 57a5034b273d..bb300f97e40c 100644 --- a/bin/configs/jaxrs-spec-interface.yaml +++ b/bin/configs/jaxrs-spec-interface.yaml @@ -1,6 +1,6 @@ generatorName: jaxrs-spec outputDir: samples/server/petstore/jaxrs-spec-interface -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/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec additionalProperties: artifactId: jaxrs-spec-interface-petstore-server diff --git a/bin/configs/jaxrs-spec-quarkus-microprofile-openapi-annotations.yaml b/bin/configs/jaxrs-spec-quarkus-microprofile-openapi-annotations.yaml index 2a52665ab94c..d74b3ebc407c 100644 --- a/bin/configs/jaxrs-spec-quarkus-microprofile-openapi-annotations.yaml +++ b/bin/configs/jaxrs-spec-quarkus-microprofile-openapi-annotations.yaml @@ -1,6 +1,6 @@ generatorName: jaxrs-spec outputDir: samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations -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/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec additionalProperties: artifactId: jaxrs-spec-petstore-server diff --git a/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/FILES b/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/FILES index 9884e5f9463b..dc165c9191f3 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-spec-interface-response/.openapi-generator/FILES @@ -1,54 +1,12 @@ README.md 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/PetApi.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/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/ClassModel.java -src/gen/java/org/openapitools/model/Client.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/FileSchemaTestClass.java -src/gen/java/org/openapitools/model/FormatTest.java -src/gen/java/org/openapitools/model/HasOnlyReadOnly.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 src/gen/java/org/openapitools/model/ModelApiResponse.java -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/NumberOnly.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/Pet.java -src/gen/java/org/openapitools/model/ReadOnlyFirst.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/User.java -src/gen/java/org/openapitools/model/XmlItem.java src/main/openapi/openapi.yaml diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/AnotherFakeApi.java deleted file mode 100644 index d65ee4b6b550..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; -import java.util.UUID; - -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("/another-fake/dummy") -@Api(description = "the another-fake API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public interface AnotherFakeApi { - - /** - * To test special tags and operation ID starting with number - * - * @param uuidTest to test uuid example value - * @param body client model - * @return successful operation - */ - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body); - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java deleted file mode 100644 index 4cb0e9ada443..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java +++ /dev/null @@ -1,298 +0,0 @@ -package org.openapitools.api; - -import java.math.BigDecimal; -import org.openapitools.model.Client; -import java.util.Date; -import java.io.File; -import org.openapitools.model.FileSchemaTestClass; -import org.joda.time.LocalDate; -import java.util.Map; -import org.openapitools.model.ModelApiResponse; -import org.openapitools.model.OuterComposite; -import org.openapitools.model.User; -import org.openapitools.model.XmlItem; - -import 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("/fake") -@Api(description = "the fake API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public interface FakeApi { - - /** - * this route creates an XmlItem - * - * @param xmlItem XmlItem Body - * @return successful operation - */ - @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", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createXmlItem(@Valid @NotNull XmlItem xmlItem); - - - /** - * Test serialization of outer boolean types - * - * @param body Input boolean as post body - * @return Output boolean - */ - @POST - @Path("/outer/boolean") - @Produces({ "*/*" }) - @ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - Response fakeOuterBooleanSerialize(@Valid Boolean body); - - - /** - * Test serialization of object with outer number type - * - * @param body Input composite as post body - * @return Output composite - */ - @POST - @Path("/outer/composite") - @Produces({ "*/*" }) - @ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - Response fakeOuterCompositeSerialize(@Valid OuterComposite body); - - - /** - * Test serialization of outer number types - * - * @param body Input number as post body - * @return Output number - */ - @POST - @Path("/outer/number") - @Produces({ "*/*" }) - @ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - Response fakeOuterNumberSerialize(@Valid BigDecimal body); - - - /** - * Test serialization of outer string types - * - * @param body Input string as post body - * @return Output string - */ - @POST - @Path("/outer/string") - @Produces({ "*/*" }) - @ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output string", response = String.class) }) - Response fakeOuterStringSerialize(@Valid String body); - - - /** - * For this test, the body for this request much reference a schema named `File`. - * - * @param body - * @return Success - */ - @PUT - @Path("/body-with-file-schema") - @Consumes({ "application/json" }) - @ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success", response = Void.class) }) - Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body); - - - /** - * - * - * @param query - * @param body - * @return Success - */ - @PUT - @Path("/body-with-query-params") - @Consumes({ "application/json" }) - @ApiOperation(value = "", notes = "", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success", response = Void.class) }) - Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body); - - - /** - * To test \"client\" model - * - * @param body client model - * @return successful operation - */ - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Response testClientModel(@Valid @NotNull Client body); - - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * @param number None - * @param _double None - * @param patternWithoutDelimiter None - * @param _byte None - * @param integer None - * @param int32 None - * @param int64 None - * @param _float None - * @param string None - * @param binary None - * @param date None - * @param dateTime None - * @param password None - * @param paramCallback None - * @return Invalid username supplied - * @return User not found - */ - @POST - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), - @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback); - - - /** - * To test enum parameters - * - * @param enumHeaderStringArray Header parameter enum test (string array) - * @param enumHeaderString Header parameter enum test (string) - * @param enumQueryStringArray Query parameter enum test (string array) - * @param enumQueryString Query parameter enum test (string) - * @param enumQueryInteger Query parameter enum test (double) - * @param enumQueryDouble Query parameter enum test (double) - * @param enumFormStringArray Form parameter enum test (string array) - * @param enumFormString Form parameter enum test (string) - * @return Invalid request - * @return Not found - */ - @GET - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid request", response = Void.class), - @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List 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 enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); - - - /** - * Fake endpoint to test group parameters (optional) - * - * @param requiredStringGroup Required String in group parameters - * @param requiredBooleanGroup Required Boolean in group parameters - * @param requiredInt64Group Required Integer in group parameters - * @param stringGroup String in group parameters - * @param booleanGroup Boolean in group parameters - * @param int64Group Integer in group parameters - * @return Something wrong - */ - @DELETE - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) - Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); - - - /** - * - * - * @param param request body - * @return successful operation - */ - @POST - @Path("/inline-additionalProperties") - @Consumes({ "application/json" }) - @ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response testInlineAdditionalProperties(@Valid @NotNull Map param); - - - /** - * - * - * @param param field1 - * @param param2 field2 - * @return successful operation - */ - @GET - @Path("/jsonFormData") - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2); - - - /** - * To test the collection format in query parameters - * - * @param pipe - * @param ioutil - * @param http - * @param url - * @param context - * @return Success - */ - @PUT - @Path("/test-query-parameters") - @ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success", response = Void.class) }) - Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context); - - - /** - * - * - * @param petId ID of pet to update - * @param requiredFile file to upload - * @param additionalMetadata Additional data to pass to server - * @return successful operation - */ - @POST - @Path("/{petId}/uploadImageWithRequiredFile") - @Consumes({ "multipart/form-data" }) - @Produces({ "application/json" }) - @ApiOperation(value = "uploads an image (required)", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata); - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java deleted file mode 100644 index ec63b076dc3d..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; - -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("/fake_classname_test") -@Api(description = "the fake_classname_test API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public interface FakeClassnameTestApi { - - /** - * To test class name in snake case - * - * @param body client model - * @return successful operation - */ - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Response testClassname(@Valid @NotNull Client body); - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java index f804752bf426..8923fb8451fa 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/PetApi.java @@ -3,7 +3,6 @@ import java.io.File; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import java.util.Set; import javax.ws.rs.*; import javax.ws.rs.core.Response; @@ -27,21 +26,22 @@ public interface PetApi { /** * * - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store * @return successful operation * @return Invalid input */ @POST @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Add a new pet to the store", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @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 = Pet.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - Response addPet(@Valid @NotNull Pet body); + Response addPet(@Valid @NotNull Pet pet); /** @@ -49,7 +49,6 @@ public interface PetApi { * * @param petId Pet id to delete * @param apiKey - * @return successful operation * @return Invalid pet value */ @DELETE @@ -60,7 +59,6 @@ public interface PetApi { @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey); @@ -77,7 +75,6 @@ public interface PetApi { @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", authorizations = { @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet" }) @ApiResponses(value = { @@ -98,13 +95,12 @@ public interface PetApi { @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", authorizations = { @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "Set") }) - Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags); + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "List") }) + Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") List tags); /** @@ -132,7 +128,7 @@ public interface PetApi { /** * * - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store * @return successful operation * @return Invalid ID supplied * @return Pet not found @@ -140,17 +136,18 @@ public interface PetApi { */ @PUT @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Update an existing pet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @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 = Pet.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) }) - Response updatePet(@Valid @NotNull Pet body); + Response updatePet(@Valid @NotNull Pet pet); /** diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/RestApplication.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/RestApplication.java deleted file mode 100644 index 7df2d0fe3334..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/RestApplication.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openapitools.api; - -import javax.ws.rs.ApplicationPath; -import javax.ws.rs.core.Application; - -@ApplicationPath(RestResourceRoot.APPLICATION_PATH) -public class RestApplication extends Application { - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/RestResourceRoot.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/RestResourceRoot.java deleted file mode 100644 index 96ba6c8d8e40..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/RestResourceRoot.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.openapitools.api; - -public class RestResourceRoot { - public static final String APPLICATION_PATH = "/v2"; -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java index 73997a38db06..b122ad2ab4ed 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java @@ -30,12 +30,12 @@ public interface StoreApi { * @return Order not found */ @DELETE - @Path("/order/{order_id}") + @Path("/order/{orderId}") @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - Response deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId); + Response deleteOrder(@PathParam("orderId") @ApiParam("ID of the order that needs to be deleted") String orderId); /** @@ -64,30 +64,31 @@ public interface StoreApi { * @return Order not found */ @GET - @Path("/order/{order_id}") + @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId); + Response getOrderById(@PathParam("orderId") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId); /** * * - * @param body order placed for purchasing the pet + * @param order order placed for purchasing the pet * @return successful operation * @return Invalid Order */ @POST @Path("/order") + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Place an order for a pet", notes = "", tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - Response placeOrder(@Valid @NotNull Order body); + Response placeOrder(@Valid @NotNull Order order); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java index 10e4e728c557..832c4ce83742 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/UserApi.java @@ -25,42 +25,54 @@ public interface UserApi { /** * This can only be done by the logged in user. * - * @param body Created user object + * @param user Created user object * @return successful operation */ @POST - @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" }) + @Consumes({ "application/json" }) + @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createUser(@Valid @NotNull User body); + Response createUser(@Valid @NotNull User user); /** * * - * @param body List of user object + * @param user List of user object * @return successful operation */ @POST @Path("/createWithArray") - @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) + @Consumes({ "application/json" }) + @ApiOperation(value = "Creates list of users with given input array", notes = "", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); + Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user); /** * * - * @param body List of user object + * @param user List of user object * @return successful operation */ @POST @Path("/createWithList") - @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) + @Consumes({ "application/json" }) + @ApiOperation(value = "Creates list of users with given input array", notes = "", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body); + Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user); /** @@ -72,7 +84,10 @@ public interface UserApi { */ @DELETE @Path("/{username}") - @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", tags={ "user" }) + @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) @@ -113,7 +128,7 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); + Response loginUser(@QueryParam("username") @NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); /** @@ -123,7 +138,10 @@ public interface UserApi { */ @GET @Path("/logout") - @ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ "user" }) + @ApiOperation(value = "Logs out current logged in user session", notes = "", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) Response logoutUser(); @@ -133,16 +151,20 @@ public interface UserApi { * This can only be done by the logged in user. * * @param username name that need to be deleted - * @param body Updated user object + * @param user Updated user object * @return Invalid user supplied * @return User not found */ @PUT @Path("/{username}") - @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", tags={ "user" }) + @Consumes({ "application/json" }) + @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User body); + Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User user); } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java deleted file mode 100644 index 4e5b3b4d13db..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesAnyType") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesAnyType extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesAnyType() { - } - - /** - **/ - public AdditionalPropertiesAnyType 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Object getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.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 AdditionalPropertiesAnyType {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java deleted file mode 100644 index bd20f8f9b3cb..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ /dev/null @@ -1,123 +0,0 @@ -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; - -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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesArray") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesArray extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesArray() { - } - - /** - **/ - public AdditionalPropertiesArray 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map> getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public List getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.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 AdditionalPropertiesArray {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java deleted file mode 100644 index c8f3e30b4a94..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesBoolean") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesBoolean extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesBoolean() { - } - - /** - **/ - public AdditionalPropertiesBoolean 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Boolean getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.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 AdditionalPropertiesBoolean {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java deleted file mode 100644 index 795366dffb10..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ /dev/null @@ -1,435 +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.List; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesClass implements Serializable { - private @Valid Map mapString = new HashMap<>(); - private @Valid Map mapNumber = new HashMap<>(); - private @Valid Map mapInteger = new HashMap<>(); - private @Valid Map mapBoolean = new HashMap<>(); - private @Valid Map> mapArrayInteger = new HashMap<>(); - private @Valid Map> mapArrayAnytype = new HashMap<>(); - private @Valid Map> mapMapString = new HashMap<>(); - private @Valid Map> mapMapAnytype = new HashMap<>(); - private Object anytype1; - private Object anytype2; - private Object anytype3; - - public AdditionalPropertiesClass() { - } - - /** - **/ - public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_string") - public Map getMapString() { - return mapString; - } - - @JsonProperty("map_string") - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); - } - - this.mapString.put(key, mapStringItem); - return this; - } - - public AdditionalPropertiesClass removeMapStringItem(String key) { - if (this.mapString != null) { - this.mapString.remove(key); - } - - return this; - } - /** - **/ - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_number") - @Valid public Map getMapNumber() { - return mapNumber; - } - - @JsonProperty("map_number") - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); - } - - this.mapNumber.put(key, mapNumberItem); - return this; - } - - public AdditionalPropertiesClass removeMapNumberItem(String key) { - if (this.mapNumber != null) { - this.mapNumber.remove(key); - } - - return this; - } - /** - **/ - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_integer") - public Map getMapInteger() { - return mapInteger; - } - - @JsonProperty("map_integer") - public void setMapInteger(Map 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 mapBoolean) { - this.mapBoolean = mapBoolean; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_boolean") - public Map getMapBoolean() { - return mapBoolean; - } - - @JsonProperty("map_boolean") - public void setMapBoolean(Map 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> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_array_integer") - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - @JsonProperty("map_array_integer") - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List 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> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_array_anytype") - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - @JsonProperty("map_array_anytype") - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List 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> mapMapString) { - this.mapMapString = mapMapString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_map_string") - public Map> getMapMapString() { - return mapMapString; - } - - @JsonProperty("map_map_string") - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map 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> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_map_anytype") - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - @JsonProperty("map_map_anytype") - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map 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) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - 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); - } - - @Override - public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); - } - - @Override - public String toString() { - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java deleted file mode 100644 index 11b46f581cfb..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesInteger") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesInteger extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesInteger() { - } - - /** - **/ - 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Integer getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java deleted file mode 100644 index 1a4c1aed481c..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ /dev/null @@ -1,123 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesNumber") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesNumber extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesNumber() { - } - - /** - **/ - 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public BigDecimal getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java deleted file mode 100644 index da4b3d6645b2..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesObject") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesObject extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesObject() { - } - - /** - **/ - 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map> getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Map getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java deleted file mode 100644 index 17ab53903a07..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesString") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesString extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesString() { - } - - /** - **/ - 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesString putAdditionalProperty(String key, String value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public String getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java deleted file mode 100644 index 619f7f9630ac..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Animal.java +++ /dev/null @@ -1,121 +0,0 @@ -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 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; -import org.openapitools.jackson.nullable.JsonNullable; - -@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"), -}) - - -@JsonTypeName("Animal") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Animal implements Serializable { - private String className; - private String color = "red"; - - public Animal() { - } - - @JsonCreator - public Animal( - @JsonProperty(required = true, value = "className") String className - ) { - this.className = className; - } - - /** - **/ - public Animal className(String className) { - this.className = className; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "className") - @NotNull public String getClassName() { - return className; - } - - @JsonProperty(required = true, value = "className") - public void setClassName(String className) { - this.className = className; - } - - /** - **/ - public Animal color(String color) { - this.color = color; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("color") - public String getColor() { - return color; - } - - @JsonProperty("color") - public void setColor(String color) { - this.color = color; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java deleted file mode 100644 index 46196f898a3b..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ /dev/null @@ -1,103 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("ArrayOfArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayOfArrayOfNumberOnly implements Serializable { - private @Valid List> arrayArrayNumber = new ArrayList<>(); - - public ArrayOfArrayOfNumberOnly() { - } - - /** - **/ - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("ArrayArrayNumber") - @Valid public List<@Valid List<@Valid BigDecimal>> getArrayArrayNumber() { - return arrayArrayNumber; - } - - @JsonProperty("ArrayArrayNumber") - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList<>(); - } - - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - public ArrayOfArrayOfNumberOnly removeArrayArrayNumberItem(List arrayArrayNumberItem) { - if (arrayArrayNumberItem != null && this.arrayArrayNumber != null) { - this.arrayArrayNumber.remove(arrayArrayNumberItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java deleted file mode 100644 index f60ffbd205a4..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ /dev/null @@ -1,103 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("ArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayOfNumberOnly implements Serializable { - private @Valid List arrayNumber = new ArrayList<>(); - - public ArrayOfNumberOnly() { - } - - /** - **/ - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("ArrayNumber") - @Valid public List<@Valid BigDecimal> getArrayNumber() { - return arrayNumber; - } - - @JsonProperty("ArrayNumber") - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } - - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList<>(); - } - - this.arrayNumber.add(arrayNumberItem); - return this; - } - - public ArrayOfNumberOnly removeArrayNumberItem(BigDecimal arrayNumberItem) { - if (arrayNumberItem != null && this.arrayNumber != null) { - this.arrayNumber.remove(arrayNumberItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java deleted file mode 100644 index 25cc5b61296b..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ArrayTest.java +++ /dev/null @@ -1,179 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.model.ReadOnlyFirst; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("ArrayTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayTest implements Serializable { - private @Valid List arrayOfString = new ArrayList<>(); - private @Valid List> arrayArrayOfInteger = new ArrayList<>(); - private @Valid List> arrayArrayOfModel = new ArrayList<>(); - - public ArrayTest() { - } - - /** - **/ - public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("array_of_string") - public List getArrayOfString() { - return arrayOfString; - } - - @JsonProperty("array_of_string") - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList<>(); - } - - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - public ArrayTest removeArrayOfStringItem(String arrayOfStringItem) { - if (arrayOfStringItem != null && this.arrayOfString != null) { - this.arrayOfString.remove(arrayOfStringItem); - } - - return this; - } - /** - **/ - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("array_array_of_integer") - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - @JsonProperty("array_array_of_integer") - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList<>(); - } - - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (arrayArrayOfIntegerItem != null && this.arrayArrayOfInteger != null) { - this.arrayArrayOfInteger.remove(arrayArrayOfIntegerItem); - } - - return this; - } - /** - **/ - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("array_array_of_model") - @Valid public List<@Valid List<@Valid ReadOnlyFirst>> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList<>(); - } - - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { - if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { - this.arrayArrayOfModel.remove(arrayArrayOfModelItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCat.java deleted file mode 100644 index a32529ed3473..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCat.java +++ /dev/null @@ -1,141 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("BigCat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - 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; - - public BigCat() { - } - - @JsonCreator - public BigCat( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Capitalization.java deleted file mode 100644 index f758db7def7a..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Capitalization.java +++ /dev/null @@ -1,194 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Capitalization") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Capitalization implements Serializable { - private String smallCamel; - private String capitalCamel; - private String smallSnake; - private String capitalSnake; - private String scAETHFlowPoints; - private String ATT_NAME; - - public Capitalization() { - } - - /** - **/ - public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("smallCamel") - public String getSmallCamel() { - return smallCamel; - } - - @JsonProperty("smallCamel") - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - /** - **/ - public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("CapitalCamel") - public String getCapitalCamel() { - return capitalCamel; - } - - @JsonProperty("CapitalCamel") - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - /** - **/ - public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("small_Snake") - public String getSmallSnake() { - return smallSnake; - } - - @JsonProperty("small_Snake") - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - /** - **/ - public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("Capital_Snake") - public String getCapitalSnake() { - return capitalSnake; - } - - @JsonProperty("Capital_Snake") - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - /** - **/ - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("SCA_ETH_Flow_Points") - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - @JsonProperty("SCA_ETH_Flow_Points") - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - /** - * Name of the pet - **/ - public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - return this; - } - - - @ApiModelProperty(value = "Name of the pet ") - @JsonProperty("ATT_NAME") - public String getATTNAME() { - return ATT_NAME; - } - - @JsonProperty("ATT_NAME") - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Cat.java deleted file mode 100644 index 17907ab9b630..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Cat.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.Animal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Cat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Cat extends Animal implements Serializable { - private Boolean declawed; - - public Cat() { - } - - @JsonCreator - public Cat( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - public Cat declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty("declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Category.java index f723fd424649..3af41d02e87e 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Category.java @@ -14,24 +14,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * A category for a pet + **/ +@ApiModel(description = "A category for a pet") @JsonTypeName("Category") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Category implements Serializable { private Long id; - private String name = "default-name"; + private String name; public Category() { } - @JsonCreator - public Category( - @JsonProperty(required = true, value = "name") String name - ) { - this.name = name; - } - /** **/ public Category id(Long id) { @@ -59,13 +54,13 @@ public Category name(String name) { } - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "name") - @NotNull public String getName() { + @ApiModelProperty(value = "") + @JsonProperty("name") + @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")public String getName() { return name; } - @JsonProperty(required = true, value = "name") + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ClassModel.java deleted file mode 100644 index a7baffc38ea1..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ClassModel.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model with \"_class\" property - **/ -@ApiModel(description = "Model for testing model with \"_class\" property") -@JsonTypeName("ClassModel") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ClassModel implements Serializable { - private String propertyClass; - - public ClassModel() { - } - - /** - **/ - public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("_class") - public String getPropertyClass() { - return propertyClass; - } - - @JsonProperty("_class") - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Client.java deleted file mode 100644 index 61d68eeaa884..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Client.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Client") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Client implements Serializable { - private String client; - - public Client() { - } - - /** - **/ - public Client client(String client) { - this.client = client; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("client") - public String getClient() { - return client; - } - - @JsonProperty("client") - public void setClient(String client) { - this.client = client; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); - } - - @Override - public int hashCode() { - return Objects.hash(client); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - - sb.append(" client: ").append(toIndentedString(client)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Dog.java deleted file mode 100644 index 0b7286493b6f..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Dog.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.Animal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Dog") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Dog extends Animal implements Serializable { - private String breed; - - public Dog() { - } - - @JsonCreator - public Dog( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - public Dog breed(String breed) { - this.breed = breed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - @JsonProperty("breed") - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumArrays.java deleted file mode 100644 index 17dd06454327..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumArrays.java +++ /dev/null @@ -1,218 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("EnumArrays") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class EnumArrays implements Serializable { - public enum JustSymbolEnum { - - GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$")); - - - private String value; - - JustSymbolEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static JustSymbolEnum fromString(String s) { - for (JustSymbolEnum b : JustSymbolEnum.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 JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private JustSymbolEnum justSymbol; - public enum ArrayEnumEnum { - - FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); - - - private String value; - - ArrayEnumEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static ArrayEnumEnum fromString(String s) { - for (ArrayEnumEnum b : ArrayEnumEnum.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 ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid List arrayEnum = new ArrayList<>(); - - public EnumArrays() { - } - - /** - **/ - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - @JsonProperty("just_symbol") - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - /** - **/ - public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("array_enum") - public List getArrayEnum() { - return arrayEnum; - } - - @JsonProperty("array_enum") - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList<>(); - } - - this.arrayEnum.add(arrayEnumItem); - return this; - } - - public EnumArrays removeArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (arrayEnumItem != null && this.arrayEnum != null) { - this.arrayEnum.remove(arrayEnumItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumClass.java deleted file mode 100644 index f4b14d298a7d..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumClass.java +++ /dev/null @@ -1,60 +0,0 @@ -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 EnumClass - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public enum EnumClass { - - _ABC("_abc"), - - _EFG("-efg"), - - _XYZ_("(xyz)"); - - private String value; - - EnumClass(String value) { - this.value = value; - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumClass fromString(String s) { - for (EnumClass b : EnumClass.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 EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumTest.java deleted file mode 100644 index e211347ac201..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/EnumTest.java +++ /dev/null @@ -1,368 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.OuterEnum; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Enum_Test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class EnumTest implements Serializable { - public enum EnumStringEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); - - - private String value; - - EnumStringEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumStringEnum fromString(String s) { - for (EnumStringEnum b : EnumStringEnum.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 EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumStringEnum enumString; - public enum EnumStringRequiredEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); - - - private String value; - - EnumStringRequiredEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumStringRequiredEnum fromString(String s) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.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 EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumStringRequiredEnum enumStringRequired; - public enum EnumIntegerEnum { - - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); - - - private Integer value; - - EnumIntegerEnum (Integer v) { - value = v; - } - - public Integer value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into Integer, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumIntegerEnum fromString(String s) { - for (EnumIntegerEnum b : EnumIntegerEnum.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 EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumIntegerEnum enumInteger; - public enum EnumNumberEnum { - - NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); - - - private Double value; - - EnumNumberEnum (Double v) { - value = v; - } - - public Double value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into Double, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumNumberEnum fromString(String s) { - for (EnumNumberEnum b : EnumNumberEnum.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 EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumNumberEnum enumNumber; - private OuterEnum outerEnum; - - public EnumTest() { - } - - @JsonCreator - public EnumTest( - @JsonProperty(required = true, value = "enum_string_required") EnumStringRequiredEnum enumStringRequired - ) { - this.enumStringRequired = enumStringRequired; - } - - /** - **/ - public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { - return enumString; - } - - @JsonProperty("enum_string") - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - /** - **/ - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "enum_string_required") - @NotNull public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - @JsonProperty(required = true, value = "enum_string_required") - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - /** - **/ - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - @JsonProperty("enum_integer") - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - /** - **/ - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - @JsonProperty("enum_number") - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - /** - **/ - public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("outerEnum") - public OuterEnum getOuterEnum() { - return outerEnum; - } - - @JsonProperty("outerEnum") - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java deleted file mode 100644 index 4d86d3e1483d..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.model.ModelFile; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("FileSchemaTestClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class FileSchemaTestClass implements Serializable { - private ModelFile _file; - private @Valid List<@Valid ModelFile> files = new ArrayList<>(); - - public FileSchemaTestClass() { - } - - /** - **/ - public FileSchemaTestClass _file(ModelFile _file) { - this._file = _file; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("file") - @Valid public ModelFile getFile() { - return _file; - } - - @JsonProperty("file") - public void setFile(ModelFile _file) { - this._file = _file; - } - - /** - **/ - public FileSchemaTestClass files(List<@Valid ModelFile> files) { - this.files = files; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("files") - @Valid public List<@Valid ModelFile> getFiles() { - return files; - } - - @JsonProperty("files") - public void setFiles(List<@Valid ModelFile> files) { - this.files = files; - } - - public FileSchemaTestClass addFilesItem(ModelFile filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - - this.files.add(filesItem); - return this; - } - - public FileSchemaTestClass removeFilesItem(ModelFile filesItem) { - if (filesItem != null && this.files != null) { - this.files.remove(filesItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(_file, files); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - - sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FormatTest.java deleted file mode 100644 index 4344f2930cef..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/FormatTest.java +++ /dev/null @@ -1,399 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.math.BigDecimal; -import java.util.Arrays; -import java.util.Date; -import java.util.UUID; -import org.joda.time.LocalDate; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("format_test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class FormatTest implements Serializable { - private Integer integer; - private Integer int32; - private Long int64; - private BigDecimal number; - private Float _float; - private Double _double; - private String string; - private byte[] _byte; - private File binary; - private LocalDate date; - private Date dateTime; - private UUID uuid; - private String password; - private BigDecimal bigDecimal; - - public FormatTest() { - } - - @JsonCreator - public FormatTest( - @JsonProperty(required = true, value = "number") BigDecimal number, - @JsonProperty(required = true, value = "byte") byte[] _byte, - @JsonProperty(required = true, value = "date") LocalDate date, - @JsonProperty(required = true, value = "password") String password - ) { - this.number = number; - this._byte = _byte; - this.date = date; - this.password = password; - } - - /** - * minimum: 10 - * maximum: 100 - **/ - public FormatTest integer(Integer integer) { - this.integer = integer; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("integer") - @Min(10) @Max(100)public Integer getInteger() { - return integer; - } - - @JsonProperty("integer") - public void setInteger(Integer integer) { - this.integer = integer; - } - - /** - * minimum: 20 - * maximum: 200 - **/ - public FormatTest int32(Integer int32) { - this.int32 = int32; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("int32") - @Min(20) @Max(200)public Integer getInt32() { - return int32; - } - - @JsonProperty("int32") - public void setInt32(Integer int32) { - this.int32 = int32; - } - - /** - **/ - public FormatTest int64(Long int64) { - this.int64 = int64; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("int64") - public Long getInt64() { - return int64; - } - - @JsonProperty("int64") - public void setInt64(Long int64) { - this.int64 = int64; - } - - /** - * minimum: 32.1 - * maximum: 543.2 - **/ - public FormatTest number(BigDecimal number) { - this.number = number; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "number") - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")public BigDecimal getNumber() { - return number; - } - - @JsonProperty(required = true, value = "number") - public void setNumber(BigDecimal number) { - this.number = number; - } - - /** - * minimum: 54.3 - * maximum: 987.6 - **/ - public FormatTest _float(Float _float) { - this._float = _float; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("float") - @DecimalMin("54.3") @DecimalMax("987.6")public Float getFloat() { - return _float; - } - - @JsonProperty("float") - public void setFloat(Float _float) { - this._float = _float; - } - - /** - * minimum: 67.8 - * maximum: 123.4 - **/ - public FormatTest _double(Double _double) { - this._double = _double; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("double") - @DecimalMin("67.8") @DecimalMax("123.4")public Double getDouble() { - return _double; - } - - @JsonProperty("double") - public void setDouble(Double _double) { - this._double = _double; - } - - /** - **/ - public FormatTest string(String string) { - this.string = string; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("string") - @Pattern(regexp="/[a-z]/i")public String getString() { - return string; - } - - @JsonProperty("string") - public void setString(String string) { - this.string = string; - } - - /** - **/ - public FormatTest _byte(byte[] _byte) { - this._byte = _byte; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "byte") - @NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")public byte[] getByte() { - return _byte; - } - - @JsonProperty(required = true, value = "byte") - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - /** - **/ - public FormatTest binary(File binary) { - this.binary = binary; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("binary") - public File getBinary() { - return binary; - } - - @JsonProperty("binary") - public void setBinary(File binary) { - this.binary = binary; - } - - /** - **/ - public FormatTest date(LocalDate date) { - this.date = date; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "date") - @NotNull public LocalDate getDate() { - return date; - } - - @JsonProperty(required = true, value = "date") - public void setDate(LocalDate date) { - this.date = date; - } - - /** - **/ - public FormatTest dateTime(Date dateTime) { - this.dateTime = dateTime; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("dateTime") - public Date getDateTime() { - return dateTime; - } - - @JsonProperty("dateTime") - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - /** - **/ - public FormatTest uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - @JsonProperty("uuid") - public UUID getUuid() { - return uuid; - } - - @JsonProperty("uuid") - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - /** - **/ - public FormatTest password(String password) { - this.password = password; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "password") - @NotNull @Size(min=10,max=64)public String getPassword() { - return password; - } - - @JsonProperty(required = true, value = "password") - public void setPassword(String password) { - this.password = password; - } - - /** - **/ - public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("BigDecimal") - @Valid public BigDecimal getBigDecimal() { - return bigDecimal; - } - - @JsonProperty("BigDecimal") - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - 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(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java deleted file mode 100644 index ca201184e676..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("hasOnlyReadOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class HasOnlyReadOnly implements Serializable { - private String bar; - private String foo; - - public HasOnlyReadOnly() { - } - - /** - **/ - public HasOnlyReadOnly bar(String bar) { - this.bar = bar; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("bar") - public void setBar(String bar) { - this.bar = bar; - } - - /** - **/ - public HasOnlyReadOnly foo(String foo) { - this.foo = foo; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("foo") - public void setFoo(String foo) { - this.foo = foo; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MapTest.java deleted file mode 100644 index 3e8a30971879..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MapTest.java +++ /dev/null @@ -1,262 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("MapTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class MapTest implements Serializable { - private @Valid Map> mapMapOfString = new HashMap<>(); - public enum InnerEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); - - - private String value; - - InnerEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static InnerEnum fromString(String s) { - for (InnerEnum b : InnerEnum.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 InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid Map mapOfEnumString = new HashMap<>(); - private @Valid Map directMap = new HashMap<>(); - private @Valid Map indirectMap = new HashMap<>(); - - public MapTest() { - } - - /** - **/ - public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_map_of_string") - public Map> getMapMapOfString() { - return mapMapOfString; - } - - @JsonProperty("map_map_of_string") - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap<>(); - } - - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - public MapTest removeMapMapOfStringItem(String key) { - if (this.mapMapOfString != null) { - this.mapMapOfString.remove(key); - } - - return this; - } - /** - **/ - public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - @JsonProperty("map_of_enum_string") - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap<>(); - } - - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - public MapTest removeMapOfEnumStringItem(String key) { - if (this.mapOfEnumString != null) { - this.mapOfEnumString.remove(key); - } - - return this; - } - /** - **/ - public MapTest directMap(Map directMap) { - this.directMap = directMap; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("direct_map") - public Map getDirectMap() { - return directMap; - } - - @JsonProperty("direct_map") - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap<>(); - } - - this.directMap.put(key, directMapItem); - return this; - } - - public MapTest removeDirectMapItem(String key) { - if (this.directMap != null) { - this.directMap.remove(key); - } - - return this; - } - /** - **/ - public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("indirect_map") - public Map getIndirectMap() { - return indirectMap; - } - - @JsonProperty("indirect_map") - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap<>(); - } - - this.indirectMap.put(key, indirectMapItem); - return this; - } - - public MapTest removeIndirectMapItem(String key) { - if (this.indirectMap != null) { - this.indirectMap.remove(key); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java deleted file mode 100644 index 6de660d6b1c0..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.openapitools.model.Animal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { - private UUID uuid; - private Date dateTime; - private @Valid Map map = new HashMap<>(); - - public MixedPropertiesAndAdditionalPropertiesClass() { - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("uuid") - public UUID getUuid() { - return uuid; - } - - @JsonProperty("uuid") - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { - this.dateTime = dateTime; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("dateTime") - public Date getDateTime() { - return dateTime; - } - - @JsonProperty("dateTime") - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map") - @Valid public Map getMap() { - return map; - } - - @JsonProperty("map") - public void setMap(Map map) { - this.map = map; - } - - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - if (this.map == null) { - this.map = new HashMap<>(); - } - - this.map.put(key, mapItem); - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) { - if (this.map != null) { - this.map.remove(key); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Model200Response.java deleted file mode 100644 index 19f13db7bc32..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Model200Response.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model name starting with number - **/ -@ApiModel(description = "Model for testing model name starting with number") -@JsonTypeName("200_response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Model200Response implements Serializable { - private Integer name; - private String propertyClass; - - public Model200Response() { - } - - /** - **/ - public Model200Response name(Integer name) { - this.name = name; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("name") - public Integer getName() { - return name; - } - - @JsonProperty("name") - public void setName(Integer name) { - this.name = name; - } - - /** - **/ - public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("class") - public String getPropertyClass() { - return propertyClass; - } - - @JsonProperty("class") - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelApiResponse.java index 863143d1f476..fae896776d1d 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -15,8 +15,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * Describes the result of uploading an image resource + **/ +@ApiModel(description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class ModelApiResponse implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelFile.java deleted file mode 100644 index ecb6dd451b22..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelFile.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Must be named `File` for test. - **/ -@ApiModel(description = "Must be named `File` for test.") -@JsonTypeName("File") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelFile implements Serializable { - private String sourceURI; - - public ModelFile() { - } - - /** - * Test capitalization - **/ - public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - - @ApiModelProperty(value = "Test capitalization") - @JsonProperty("sourceURI") - public String getSourceURI() { - return sourceURI; - } - - @JsonProperty("sourceURI") - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelFile {\n"); - - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelList.java deleted file mode 100644 index 4c6128e7cbb5..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelList.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("List") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelList implements Serializable { - private String _123list; - - public ModelList() { - } - - /** - **/ - public ModelList _123list(String _123list) { - this._123list = _123list; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("123-list") - public String get123list() { - return _123list; - } - - @JsonProperty("123-list") - public void set123list(String _123list) { - this._123list = _123list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); - } - - @Override - public int hashCode() { - return Objects.hash(_123list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelList {\n"); - - sb.append(" _123list: ").append(toIndentedString(_123list)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelReturn.java deleted file mode 100644 index edfaa2d4e5a5..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ModelReturn.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing reserved words - **/ -@ApiModel(description = "Model for testing reserved words") -@JsonTypeName("Return") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelReturn implements Serializable { - private Integer _return; - - public ModelReturn() { - } - - /** - **/ - public ModelReturn _return(Integer _return) { - this._return = _return; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("return") - public Integer getReturn() { - return _return; - } - - @JsonProperty("return") - public void setReturn(Integer _return) { - this._return = _return; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); - } - - @Override - public int hashCode() { - return Objects.hash(_return); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - - sb.append(" _return: ").append(toIndentedString(_return)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Name.java deleted file mode 100644 index e4fd151f23ee..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Name.java +++ /dev/null @@ -1,158 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model name same as property name - **/ -@ApiModel(description = "Model for testing model name same as property name") -@JsonTypeName("Name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Name implements Serializable { - private Integer name; - private Integer snakeCase; - private String property; - private Integer _123number; - - public Name() { - } - - @JsonCreator - public Name( - @JsonProperty(required = true, value = "name") Integer name - ) { - this.name = name; - } - - /** - **/ - public Name name(Integer name) { - this.name = name; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "name") - @NotNull public Integer getName() { - return name; - } - - @JsonProperty(required = true, value = "name") - public void setName(Integer name) { - this.name = name; - } - - /** - **/ - public Name snakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("snake_case") - public Integer getSnakeCase() { - return snakeCase; - } - - @JsonProperty("snake_case") - public void setSnakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - } - - /** - **/ - public Name property(String property) { - this.property = property; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("property") - public String getProperty() { - return property; - } - - @JsonProperty("property") - public void setProperty(String property) { - this.property = property; - } - - /** - **/ - public Name _123number(Integer _123number) { - this._123number = _123number; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("123Number") - public Integer get123number() { - return _123number; - } - - @JsonProperty("123Number") - public void set123number(Integer _123number) { - this._123number = _123number; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/NumberOnly.java deleted file mode 100644 index 3bb63dae1103..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/NumberOnly.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("NumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class NumberOnly implements Serializable { - private BigDecimal justNumber; - - public NumberOnly() { - } - - /** - **/ - public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("JustNumber") - @Valid public BigDecimal getJustNumber() { - return justNumber; - } - - @JsonProperty("JustNumber") - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - - @Override - public int hashCode() { - return Objects.hash(justNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - - sb.append(" justNumber: ").append(toIndentedString(justNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Order.java index 675c905d7ff9..894da5ddd0c6 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Order.java @@ -15,8 +15,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * An order for a pets from the pet store + **/ +@ApiModel(description = "An order for a pets from the pet store") @JsonTypeName("Order") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Order implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterComposite.java deleted file mode 100644 index fe7c98df317b..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterComposite.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("OuterComposite") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class OuterComposite implements Serializable { - private BigDecimal myNumber; - private String myString; - private Boolean myBoolean; - - public OuterComposite() { - } - - /** - **/ - public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("my_number") - @Valid public BigDecimal getMyNumber() { - return myNumber; - } - - @JsonProperty("my_number") - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - /** - **/ - public OuterComposite myString(String myString) { - this.myString = myString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("my_string") - public String getMyString() { - return myString; - } - - @JsonProperty("my_string") - public void setMyString(String myString) { - this.myString = myString; - } - - /** - **/ - public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("my_boolean") - public Boolean getMyBoolean() { - return myBoolean; - } - - @JsonProperty("my_boolean") - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterEnum.java deleted file mode 100644 index 02443e450059..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/OuterEnum.java +++ /dev/null @@ -1,60 +0,0 @@ -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 OuterEnum - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public enum OuterEnum { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static OuterEnum fromString(String s) { - for (OuterEnum b : OuterEnum.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 OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java index 8727e9328e64..14bf913ae99b 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Pet.java @@ -1,13 +1,10 @@ package org.openapitools.model; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedHashSet; import java.util.List; -import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import java.io.Serializable; @@ -22,15 +19,17 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * A pet for sale in the pet store + **/ +@ApiModel(description = "A pet for sale in the pet store") @JsonTypeName("Pet") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Pet implements Serializable { private Long id; private Category category; private String name; - private @Valid Set photoUrls = new LinkedHashSet<>(); + private @Valid List photoUrls = new ArrayList<>(); private @Valid List<@Valid Tag> tags = new ArrayList<>(); public enum StatusEnum { @@ -87,7 +86,7 @@ public Pet() { @JsonCreator public Pet( @JsonProperty(required = true, value = "name") String name, - @JsonProperty(required = true, value = "photoUrls") Set photoUrls + @JsonProperty(required = true, value = "photoUrls") List photoUrls ) { this.name = name; this.photoUrls = photoUrls; @@ -152,7 +151,7 @@ public void setName(String name) { /** **/ - public Pet photoUrls(Set photoUrls) { + public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; } @@ -160,19 +159,18 @@ public Pet photoUrls(Set photoUrls) { @ApiModelProperty(required = true, value = "") @JsonProperty(required = true, value = "photoUrls") - @NotNull public Set getPhotoUrls() { + @NotNull public List getPhotoUrls() { return photoUrls; } @JsonProperty(required = true, value = "photoUrls") - @JsonDeserialize(as = LinkedHashSet.class) - public void setPhotoUrls(Set photoUrls) { + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet addPhotoUrlsItem(String photoUrlsItem) { if (this.photoUrls == null) { - this.photoUrls = new LinkedHashSet<>(); + this.photoUrls = new ArrayList<>(); } this.photoUrls.add(photoUrlsItem); diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ReadOnlyFirst.java deleted file mode 100644 index 05453b41ab3f..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("ReadOnlyFirst") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ReadOnlyFirst implements Serializable { - private String bar; - private String baz; - - public ReadOnlyFirst() { - } - - /** - **/ - public ReadOnlyFirst bar(String bar) { - this.bar = bar; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("bar") - public void setBar(String bar) { - this.bar = bar; - } - - /** - **/ - public ReadOnlyFirst baz(String baz) { - this.baz = baz; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - @JsonProperty("baz") - public void setBaz(String baz) { - this.baz = baz; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); - } - - @Override - public int hashCode() { - return Objects.hash(bar, baz); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/SpecialModelName.java deleted file mode 100644 index b47a587e0db7..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/SpecialModelName.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("$special[model.name]") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class SpecialModelName implements Serializable { - private Long $specialPropertyName; - - public SpecialModelName() { - } - - /** - **/ - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("$special[property.name]") - public Long get$SpecialPropertyName() { - return $specialPropertyName; - } - - @JsonProperty("$special[property.name]") - public void set$SpecialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); - } - - @Override - public int hashCode() { - return Objects.hash($specialPropertyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Tag.java index 249cac6ac5fe..f881021581fc 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/Tag.java @@ -14,8 +14,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * A tag for a pet + **/ +@ApiModel(description = "A tag for a pet") @JsonTypeName("Tag") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Tag implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderDefault.java deleted file mode 100644 index 4a36b583c5f1..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ /dev/null @@ -1,206 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("TypeHolderDefault") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class TypeHolderDefault implements Serializable { - private String stringItem = "what"; - private BigDecimal numberItem; - private Integer integerItem; - private Boolean boolItem = true; - private @Valid List arrayItem = new ArrayList<>(); - - public TypeHolderDefault() { - } - - @JsonCreator - public TypeHolderDefault( - @JsonProperty(required = true, value = "string_item") String stringItem, - @JsonProperty(required = true, value = "number_item") BigDecimal numberItem, - @JsonProperty(required = true, value = "integer_item") Integer integerItem, - @JsonProperty(required = true, value = "bool_item") Boolean boolItem, - @JsonProperty(required = true, value = "array_item") List arrayItem - ) { - this.stringItem = stringItem; - this.numberItem = numberItem; - this.integerItem = integerItem; - this.boolItem = boolItem; - this.arrayItem = arrayItem; - } - - /** - **/ - public TypeHolderDefault stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "string_item") - @NotNull public String getStringItem() { - return stringItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "number_item") - @NotNull @Valid public BigDecimal getNumberItem() { - return numberItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "integer_item") - @NotNull public Integer getIntegerItem() { - return integerItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "bool_item") - @NotNull public Boolean getBoolItem() { - return boolItem; - } - - @JsonProperty(required = true, value = "bool_item") - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - /** - **/ - public TypeHolderDefault arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "array_item") - @NotNull public List getArrayItem() { - return arrayItem; - } - - @JsonProperty(required = true, value = "array_item") - public void setArrayItem(List 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java deleted file mode 100644 index e339aef3e3f2..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ /dev/null @@ -1,230 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("TypeHolderExample") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.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 arrayItem = new ArrayList<>(); - - public TypeHolderExample() { - } - - @JsonCreator - public TypeHolderExample( - @JsonProperty(required = true, value = "string_item") String stringItem, - @JsonProperty(required = true, value = "number_item") BigDecimal numberItem, - @JsonProperty(required = true, value = "float_item") Float floatItem, - @JsonProperty(required = true, value = "integer_item") Integer integerItem, - @JsonProperty(required = true, value = "bool_item") Boolean boolItem, - @JsonProperty(required = true, value = "array_item") List arrayItem - ) { - this.stringItem = stringItem; - this.numberItem = numberItem; - this.floatItem = floatItem; - this.integerItem = integerItem; - this.boolItem = boolItem; - this.arrayItem = arrayItem; - } - - /** - **/ - public TypeHolderExample stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - - @ApiModelProperty(example = "what", required = true, value = "") - @JsonProperty(required = true, value = "string_item") - @NotNull public String getStringItem() { - return stringItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "number_item") - @NotNull @Valid public BigDecimal getNumberItem() { - return numberItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "float_item") - @NotNull public Float getFloatItem() { - return floatItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "integer_item") - @NotNull public Integer getIntegerItem() { - return integerItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "bool_item") - @NotNull public Boolean getBoolItem() { - return boolItem; - } - - @JsonProperty(required = true, value = "bool_item") - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - /** - **/ - public TypeHolderExample arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @JsonProperty(required = true, value = "array_item") - @NotNull public List getArrayItem() { - return arrayItem; - } - - @JsonProperty(required = true, value = "array_item") - public void setArrayItem(List 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/User.java index 6c5f156b0f02..5dd60fab832f 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/User.java @@ -14,8 +14,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * A User who is purchasing from the pet store + **/ +@ApiModel(description = "A User who is purchasing from the pet store") @JsonTypeName("User") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class User implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java deleted file mode 100644 index b9419b3862e0..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/XmlItem.java +++ /dev/null @@ -1,847 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("XmlItem") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class XmlItem implements Serializable { - private String attributeString; - private BigDecimal attributeNumber; - private Integer attributeInteger; - private Boolean attributeBoolean; - private @Valid List wrappedArray = new ArrayList<>(); - private String nameString; - private BigDecimal nameNumber; - private Integer nameInteger; - private Boolean nameBoolean; - private @Valid List nameArray = new ArrayList<>(); - private @Valid List nameWrappedArray = new ArrayList<>(); - private String prefixString; - private BigDecimal prefixNumber; - private Integer prefixInteger; - private Boolean prefixBoolean; - private @Valid List prefixArray = new ArrayList<>(); - private @Valid List prefixWrappedArray = new ArrayList<>(); - private String namespaceString; - private BigDecimal namespaceNumber; - private Integer namespaceInteger; - private Boolean namespaceBoolean; - private @Valid List namespaceArray = new ArrayList<>(); - private @Valid List namespaceWrappedArray = new ArrayList<>(); - private String prefixNsString; - private BigDecimal prefixNsNumber; - private Integer prefixNsInteger; - private Boolean prefixNsBoolean; - private @Valid List prefixNsArray = new ArrayList<>(); - private @Valid List prefixNsWrappedArray = new ArrayList<>(); - - public XmlItem() { - } - - /** - **/ - public XmlItem attributeString(String attributeString) { - this.attributeString = attributeString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("attribute_string") - public String getAttributeString() { - return attributeString; - } - - @JsonProperty("attribute_string") - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - /** - **/ - public XmlItem attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("attribute_number") - @Valid public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - @JsonProperty("attribute_number") - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - /** - **/ - public XmlItem attributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("attribute_integer") - public Integer getAttributeInteger() { - return attributeInteger; - } - - @JsonProperty("attribute_integer") - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - /** - **/ - public XmlItem attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("attribute_boolean") - public Boolean getAttributeBoolean() { - return attributeBoolean; - } - - @JsonProperty("attribute_boolean") - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - /** - **/ - public XmlItem wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("wrapped_array") - public List getWrappedArray() { - return wrappedArray; - } - - @JsonProperty("wrapped_array") - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList<>(); - } - - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - public XmlItem removeWrappedArrayItem(Integer wrappedArrayItem) { - if (wrappedArrayItem != null && this.wrappedArray != null) { - this.wrappedArray.remove(wrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem nameString(String nameString) { - this.nameString = nameString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("name_string") - public String getNameString() { - return nameString; - } - - @JsonProperty("name_string") - public void setNameString(String nameString) { - this.nameString = nameString; - } - - /** - **/ - public XmlItem nameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("name_number") - @Valid public BigDecimal getNameNumber() { - return nameNumber; - } - - @JsonProperty("name_number") - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - /** - **/ - public XmlItem nameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("name_integer") - public Integer getNameInteger() { - return nameInteger; - } - - @JsonProperty("name_integer") - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - /** - **/ - public XmlItem nameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("name_boolean") - public Boolean getNameBoolean() { - return nameBoolean; - } - - @JsonProperty("name_boolean") - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - /** - **/ - public XmlItem nameArray(List nameArray) { - this.nameArray = nameArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("name_array") - public List getNameArray() { - return nameArray; - } - - @JsonProperty("name_array") - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList<>(); - } - - this.nameArray.add(nameArrayItem); - return this; - } - - public XmlItem removeNameArrayItem(Integer nameArrayItem) { - if (nameArrayItem != null && this.nameArray != null) { - this.nameArray.remove(nameArrayItem); - } - - return this; - } - /** - **/ - public XmlItem nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("name_wrapped_array") - public List getNameWrappedArray() { - return nameWrappedArray; - } - - @JsonProperty("name_wrapped_array") - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList<>(); - } - - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - public XmlItem removeNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (nameWrappedArrayItem != null && this.nameWrappedArray != null) { - this.nameWrappedArray.remove(nameWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixString(String prefixString) { - this.prefixString = prefixString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("prefix_string") - public String getPrefixString() { - return prefixString; - } - - @JsonProperty("prefix_string") - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - /** - **/ - public XmlItem prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("prefix_number") - @Valid public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - @JsonProperty("prefix_number") - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - /** - **/ - public XmlItem prefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("prefix_integer") - public Integer getPrefixInteger() { - return prefixInteger; - } - - @JsonProperty("prefix_integer") - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - /** - **/ - public XmlItem prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("prefix_boolean") - public Boolean getPrefixBoolean() { - return prefixBoolean; - } - - @JsonProperty("prefix_boolean") - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - /** - **/ - public XmlItem prefixArray(List prefixArray) { - this.prefixArray = prefixArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("prefix_array") - public List getPrefixArray() { - return prefixArray; - } - - @JsonProperty("prefix_array") - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList<>(); - } - - this.prefixArray.add(prefixArrayItem); - return this; - } - - public XmlItem removePrefixArrayItem(Integer prefixArrayItem) { - if (prefixArrayItem != null && this.prefixArray != null) { - this.prefixArray.remove(prefixArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("prefix_wrapped_array") - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - @JsonProperty("prefix_wrapped_array") - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList<>(); - } - - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - public XmlItem removePrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (prefixWrappedArrayItem != null && this.prefixWrappedArray != null) { - this.prefixWrappedArray.remove(prefixWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem namespaceString(String namespaceString) { - this.namespaceString = namespaceString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("namespace_string") - public String getNamespaceString() { - return namespaceString; - } - - @JsonProperty("namespace_string") - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - /** - **/ - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("namespace_number") - @Valid public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - @JsonProperty("namespace_number") - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - /** - **/ - public XmlItem namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("namespace_integer") - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - @JsonProperty("namespace_integer") - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - /** - **/ - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("namespace_boolean") - public Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - @JsonProperty("namespace_boolean") - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - /** - **/ - public XmlItem namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("namespace_array") - public List getNamespaceArray() { - return namespaceArray; - } - - @JsonProperty("namespace_array") - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList<>(); - } - - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - public XmlItem removeNamespaceArrayItem(Integer namespaceArrayItem) { - if (namespaceArrayItem != null && this.namespaceArray != null) { - this.namespaceArray.remove(namespaceArrayItem); - } - - return this; - } - /** - **/ - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("namespace_wrapped_array") - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - @JsonProperty("namespace_wrapped_array") - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList<>(); - } - - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - public XmlItem removeNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (namespaceWrappedArrayItem != null && this.namespaceWrappedArray != null) { - this.namespaceWrappedArray.remove(namespaceWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("prefix_ns_string") - public String getPrefixNsString() { - return prefixNsString; - } - - @JsonProperty("prefix_ns_string") - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - /** - **/ - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("prefix_ns_number") - @Valid public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - @JsonProperty("prefix_ns_number") - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - /** - **/ - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("prefix_ns_integer") - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - @JsonProperty("prefix_ns_integer") - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - /** - **/ - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("prefix_ns_boolean") - public Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - @JsonProperty("prefix_ns_boolean") - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - /** - **/ - public XmlItem prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("prefix_ns_array") - public List getPrefixNsArray() { - return prefixNsArray; - } - - @JsonProperty("prefix_ns_array") - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList<>(); - } - - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - public XmlItem removePrefixNsArrayItem(Integer prefixNsArrayItem) { - if (prefixNsArrayItem != null && this.prefixNsArray != null) { - this.prefixNsArray.remove(prefixNsArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("prefix_ns_wrapped_array") - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - @JsonProperty("prefix_ns_wrapped_array") - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList<>(); - } - - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - public XmlItem removePrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (prefixNsWrappedArrayItem != null && this.prefixNsWrappedArray != null) { - this.prefixNsWrappedArray.remove(prefixNsWrappedArrayItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index 0fe317558754..31074771d9fb 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -1,15 +1,17 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: - description: "This spec is mainly for testing Petstore server and contains fake\ - \ endpoints, models. Please do not use this for any other purpose. Special characters:\ - \ \" \\" + description: "This is a sample server Petstore server. For this sample, you can\ + \ use the api key `special-key` to test the authorization filters." license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: -- url: http://petstore.swagger.io:80/v2 +- url: http://petstore.swagger.io/v2 tags: - description: Everything about your Pets name: pet @@ -20,23 +22,21 @@ tags: paths: /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Pet" - application/xml: - schema: - $ref: "#/components/schemas/Pet" - description: Pet object that needs to be added to the store - required: true + $ref: "#/components/requestBodies/Pet" responses: "200": - content: {} + content: + application/xml: + schema: + $ref: "#/components/schemas/Pet" + application/json: + schema: + $ref: "#/components/schemas/Pet" description: successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,36 +45,35 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json + - application/xml x-tags: - tag: pet put: + description: "" + externalDocs: + description: API documentation for the updatePet operation + url: http://petstore.swagger.io/v2/doc/updatePet operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Pet" - application/xml: - schema: - $ref: "#/components/schemas/Pet" - description: Pet object that needs to be added to the store - required: true + $ref: "#/components/requestBodies/Pet" responses: "200": - content: {} + content: + application/xml: + schema: + $ref: "#/components/schemas/Pet" + application/json: + schema: + $ref: "#/components/schemas/Pet" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -83,10 +82,10 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json + - application/xml x-tags: - tag: pet /pet/findByStatus: @@ -94,7 +93,8 @@ paths: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -124,11 +124,9 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by status tags: @@ -154,7 +152,6 @@ paths: items: type: string type: array - uniqueItems: true style: form responses: "200": @@ -164,20 +161,16 @@ paths: items: $ref: "#/components/schemas/Pet" type: array - uniqueItems: true application/json: schema: items: $ref: "#/components/schemas/Pet" type: array - uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by tags tags: @@ -189,25 +182,27 @@ paths: - tag: pet /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: - "200": - content: {} - description: successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -225,12 +220,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -242,10 +239,8 @@ paths: $ref: "#/components/schemas/Pet" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] @@ -258,15 +253,18 @@ paths: x-tags: - tag: pet post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -274,7 +272,6 @@ paths: $ref: "#/components/schemas/updatePetWithForm_request" responses: "405": - content: {} description: Invalid input security: - petstore_auth: @@ -290,15 +287,18 @@ paths: - tag: pet /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -348,10 +348,11 @@ paths: - tag: store /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/Order" description: order placed for purchasing the pet @@ -367,36 +368,34 @@ paths: $ref: "#/components/schemas/Order" description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json - application/xml x-tags: - tag: store - /store/order/{order_id}: + /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path - name: order_id + name: orderId required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -411,14 +410,16 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path - name: order_id + name: orderId required: true schema: format: int64 maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -430,10 +431,8 @@ paths: $ref: "#/components/schemas/Order" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -449,90 +448,84 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/User" description: Created user object required: true responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: "#/components/schemas/User" - type: array - description: List of user object - required: true + $ref: "#/components/requestBodies/UserArray" responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: "#/components/schemas/User" - type: array - description: List of user object - required: true + $ref: "#/components/requestBodies/UserArray" responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: + pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -544,18 +537,29 @@ paths: type: string description: successful operation headers: + Set-Cookie: + description: Cookie authentication key for use with the `api_key` apiKey + authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -567,11 +571,13 @@ paths: - tag: user /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Logs out current logged in user session tags: - user @@ -585,18 +591,20 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Delete user tags: - user @@ -605,14 +613,17 @@ paths: x-tags: - tag: user get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -624,10 +635,8 @@ paths: $ref: "#/components/schemas/User" description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -642,1533 +651,230 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/User" description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - application/json - x-tags: - - tag: user - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - security: - - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json x-tags: - - tag: fake_classname_tags 123#$%^ - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - in: query - name: required_string_group - required: true - schema: + - tag: user +components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/User" + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + $ref: "#/components/schemas/Pet" + description: Pet object that needs to be added to the store + required: true + schemas: + Order: + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 type: integer - - description: Required Boolean in group parameters - in: header - name: required_boolean_group - required: true - schema: - type: boolean - - description: Required Integer in group parameters - in: query - name: required_int64_group - required: true - schema: + petId: format: int64 type: integer - - description: String in group parameters - in: query - name: string_group - schema: + quantity: + format: int32 type: integer - - description: Boolean in group parameters - in: header - name: boolean_group - schema: + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false type: boolean - - description: Integer in group parameters - in: query - name: int64_group - schema: + title: Pet Order + type: object + xml: + name: Order + Category: + description: A category for a pet + example: + name: name + id: 6 + properties: + id: format: int64 type: integer - responses: - "400": - content: {} - description: Something wrong - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - x-accepts: - - application/json - x-tags: - - tag: fake - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - in: header - name: enum_header_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) + name: + pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" type: string - - description: Query parameter enum test (string array) - explode: false - in: query - name: enum_query_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - in: query - name: enum_query_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) + title: Pet category + type: object + xml: + name: Category + User: + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + username: type: string - - description: Query parameter enum test (double) - in: query - name: enum_query_integer - schema: - enum: - - 1 - - -2 + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status format: int32 type: integer - - description: Query parameter enum test (double) - in: query - name: enum_query_double - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testEnumParameters_request" - responses: - "400": - content: {} - description: Invalid request - "404": - content: {} - description: Not found - summary: To test enum parameters - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - summary: To test "client" model - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - post: - description: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testEndpointParameters_request" - required: true - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - security: - - http_basic_test: [] - summary: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterNumber" - description: Input number as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterNumber" - description: Output number - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterString" - description: Input string as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterString" - description: Output string - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterBoolean" - description: Input boolean as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterBoolean" - description: Output boolean - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterComposite" - description: Input composite as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterComposite" - description: Output composite - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/jsonFormData: - get: - operationId: testJsonFormData - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testJsonFormData_request" - required: true - responses: - "200": - content: {} - description: successful operation - summary: test json serialization of form data - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/inline-additionalProperties: - post: - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - "200": - content: {} - description: successful operation - summary: test inline additionalProperties - tags: - - fake - x-codegen-request-body-name: param - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - in: query - name: query - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/User" - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: "#/components/schemas/XmlItem" - application/xml; charset=utf-8: - schema: - $ref: "#/components/schemas/XmlItem" - application/xml; charset=utf-16: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml; charset=utf-8: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml; charset=utf-16: - schema: - $ref: "#/components/schemas/XmlItem" - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: - - application/json - x-tags: - - tag: fake - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - parameters: - - description: to test uuid example value - in: header - name: uuid_test - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - summary: To test special tags - tags: - - $another-fake? - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: $another-fake? - /fake/body-with-file-schema: - put: - description: "For this test, the body for this request much reference a schema\ - \ named `File`." - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FileSchemaTestClass" - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/test-query-parameters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: false - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: form - - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: {} - description: Success - tags: - - fake - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - $ref: "#/components/schemas/uploadFileWithRequiredFile_request" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ApiResponse" - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - x-content-type: multipart/form-data - x-accepts: - - application/json - x-tags: - - tag: pet -components: - schemas: - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order - Category: - example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: default-name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: "#/components/schemas/Category" - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - uniqueItems: true - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: "#/components/schemas/Tag" - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - type: object - xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" - Return: - description: Model for testing reserved words - properties: - return: - format: int32 - type: integer - type: object - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - "123Number": - readOnly: true - type: integer - required: - - name - type: object - xml: - name: Name - "200_response": - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - type: object - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - type: object - Dog: - allOf: - - $ref: "#/components/schemas/Animal" - - properties: - breed: - type: string - type: object - Cat: - allOf: - - $ref: "#/components/schemas/Animal" - - properties: - declawed: - type: boolean - type: object - BigCat: - allOf: - - $ref: "#/components/schemas/Cat" - - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: "#/components/schemas/Animal" - type: array - format_test: - properties: - integer: - maximum: 100 - minimum: 10 - type: integer - int32: - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - pattern: "/[a-z]/i" - type: string - byte: - format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - BigDecimal: - format: number - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: "#/components/schemas/OuterEnum" - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_string: - additionalProperties: - type: string - type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: "#/components/schemas/Animal" - type: object - type: object - List: - properties: - "123-list": - type: string - type: object - Client: - example: - client: client - properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: "#/components/schemas/ReadOnlyFirst" - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array + title: a User type: object - OuterEnum: - enum: - - placed - - approved - - delivered - type: string - OuterComposite: + xml: + name: User + Tag: + description: A tag for a pet example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true + name: name + id: 1 properties: - my_number: - type: number - my_string: + id: + format: int64 + type: integer + name: type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: "#/components/schemas/File" - files: - items: - $ref: "#/components/schemas/File" - type: array + title: Pet Tag type: object - File: - description: Must be named `File` for test. + xml: + name: Tag + Pet: + description: A pet for sale in the pet store example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - TypeHolderDefault: - properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: - type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 + id: + format: int64 type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string + category: + $ref: "#/components/schemas/Category" + name: + example: doggie type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: + photoUrls: items: - type: integer + type: string type: array xml: + name: photoUrl wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: + tags: items: - type: integer - xml: - name: xml_name_wrapped_array_item + $ref: "#/components/schemas/Tag" type: array xml: - name: xml_name_wrapped_array + name: tag wrapped: true - prefix_string: - example: string + status: + deprecated: true + description: pet status in the store + enum: + - available + - pending + - sold type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 + required: + - name + - photoUrls + title: a Pet + type: object + xml: + name: Pet + ApiResponse: + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string + type: type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string + message: type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true + title: An uploaded response type: object - xml: - namespace: http://a.com/schema - prefix: pre updatePetWithForm_request: properties: name: @@ -2188,123 +894,6 @@ components: format: binary type: string type: object - testEnumParameters_request: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - testEndpointParameters_request: - properties: - integer: - description: None - format: int32 - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: "/[a-z]/i" - type: string - pattern_without_delimiter: - description: None - pattern: "^[A-Z].*" - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - type: object - testJsonFormData_request: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - uploadFileWithRequiredFile_request: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - type: object securitySchemes: petstore_auth: flows: @@ -2318,11 +907,3 @@ components: in: header name: api_key type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: - scheme: basic - type: http -x-original-swagger-version: "2.0" diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/FILES b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/FILES index 9884e5f9463b..dc165c9191f3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/FILES @@ -1,54 +1,12 @@ README.md 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/PetApi.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/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/ClassModel.java -src/gen/java/org/openapitools/model/Client.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/FileSchemaTestClass.java -src/gen/java/org/openapitools/model/FormatTest.java -src/gen/java/org/openapitools/model/HasOnlyReadOnly.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 src/gen/java/org/openapitools/model/ModelApiResponse.java -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/NumberOnly.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/Pet.java -src/gen/java/org/openapitools/model/ReadOnlyFirst.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/User.java -src/gen/java/org/openapitools/model/XmlItem.java src/main/openapi/openapi.yaml diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java deleted file mode 100644 index 4d245da07634..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; -import java.util.UUID; - -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("/another-fake/dummy") -@Api(description = "the another-fake API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public interface AnotherFakeApi { - - /** - * To test special tags and operation ID starting with number - * - * @param uuidTest to test uuid example value - * @param body client model - * @return successful operation - */ - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Client call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body); - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java deleted file mode 100644 index 1aa81479b11a..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java +++ /dev/null @@ -1,300 +0,0 @@ -package org.openapitools.api; - -import java.math.BigDecimal; -import org.openapitools.model.Client; -import java.util.Date; -import java.io.File; -import org.openapitools.model.FileSchemaTestClass; -import org.joda.time.LocalDate; -import java.util.Map; -import org.openapitools.model.ModelApiResponse; -import org.openapitools.model.OuterComposite; -import org.openapitools.model.User; -import org.openapitools.model.XmlItem; - -import 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("/fake") -@Api(description = "the fake API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public interface FakeApi { - - /** - * this route creates an XmlItem - * - * @param xmlItem XmlItem Body - * @return successful operation - */ - @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", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createXmlItem(@Valid @NotNull XmlItem xmlItem); - - - /** - * Test serialization of outer boolean types - * - * @param body Input boolean as post body - * @return Output boolean - */ - @POST - @Path("/outer/boolean") - @Produces({ "*/*" }) - @ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - Boolean fakeOuterBooleanSerialize(@Valid Boolean body); - - - /** - * Test serialization of object with outer number type - * - * @param body Input composite as post body - * @return Output composite - */ - @POST - @Path("/outer/composite") - @Produces({ "*/*" }) - @ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - OuterComposite fakeOuterCompositeSerialize(@Valid OuterComposite body); - - - /** - * Test serialization of outer number types - * - * @param body Input number as post body - * @return Output number - */ - @POST - @Path("/outer/number") - @Produces({ "*/*" }) - @ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - BigDecimal fakeOuterNumberSerialize(@Valid BigDecimal body); - - - /** - * Test serialization of outer string types - * - * @param body Input string as post body - * @return Output string - */ - @POST - @Path("/outer/string") - @Produces({ "*/*" }) - @ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output string", response = String.class) }) - String fakeOuterStringSerialize(@Valid String body); - - - /** - * For this test, the body for this request much reference a schema named `File`. - * - * @param body - * @return Success - */ - @PUT - @Path("/body-with-file-schema") - @Consumes({ "application/json" }) - @ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success", response = Void.class) }) - void testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body); - - - /** - * - * - * @param query - * @param body - * @return Success - */ - @PUT - @Path("/body-with-query-params") - @Consumes({ "application/json" }) - @ApiOperation(value = "", notes = "", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success", response = Void.class) }) - void testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body); - - - /** - * To test \"client\" model - * - * @param body client model - * @return successful operation - */ - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Client testClientModel(@Valid @NotNull Client body); - - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * @param number None - * @param _double None - * @param patternWithoutDelimiter None - * @param _byte None - * @param integer None - * @param int32 None - * @param int64 None - * @param _float None - * @param string None - * @param binary None - * @param date None - * @param dateTime None - * @param password None - * @param paramCallback None - * @return Invalid username supplied - * @return User not found - */ - @POST - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { - - @Authorization(value = "http_basic_test") - }, tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), - @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - void testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback); - - - /** - * To test enum parameters - * - * @param enumHeaderStringArray Header parameter enum test (string array) - * @param enumQueryStringArray Query parameter enum test (string array) - * @param enumQueryString Query parameter enum test (string) - * @param enumQueryInteger Query parameter enum test (double) - * @param enumQueryDouble Query parameter enum test (double) - * @param enumFormStringArray Form parameter enum test (string array) - * @param enumFormString Form parameter enum test (string) - * @return Invalid request - * @return Not found - */ - @GET - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", tags={ "fake" }) - @io.swagger.annotations.ApiImplicitParams({ - @io.swagger.annotations.ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header") - }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid request", response = Void.class), - @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - void testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List 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 enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); - - - /** - * Fake endpoint to test group parameters (optional) - * - * @param requiredStringGroup Required String in group parameters - * @param requiredBooleanGroup Required Boolean in group parameters - * @param requiredInt64Group Required Integer in group parameters - * @param stringGroup String in group parameters - * @param booleanGroup Boolean in group parameters - * @param int64Group Integer in group parameters - * @return Something wrong - */ - @DELETE - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) - void testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); - - - /** - * - * - * @param param request body - * @return successful operation - */ - @POST - @Path("/inline-additionalProperties") - @Consumes({ "application/json" }) - @ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void testInlineAdditionalProperties(@Valid @NotNull Map param); - - - /** - * - * - * @param param field1 - * @param param2 field2 - * @return successful operation - */ - @GET - @Path("/jsonFormData") - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2); - - - /** - * To test the collection format in query parameters - * - * @param pipe - * @param ioutil - * @param http - * @param url - * @param context - * @return Success - */ - @PUT - @Path("/test-query-parameters") - @ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success", response = Void.class) }) - void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context); - - - /** - * - * - * @param petId ID of pet to update - * @param requiredFile file to upload - * @param additionalMetadata Additional data to pass to server - * @return successful operation - */ - @POST - @Path("/{petId}/uploadImageWithRequiredFile") - @Consumes({ "multipart/form-data" }) - @Produces({ "application/json" }) - @ApiOperation(value = "uploads an image (required)", notes = "", authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") }) - }, tags={ "pet" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata); - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java deleted file mode 100644 index 5fd4287fa795..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; - -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("/fake_classname_test") -@Api(description = "the fake_classname_test API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public interface FakeClassnameTestApi { - - /** - * To test class name in snake case - * - * @param body client model - * @return successful operation - */ - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = { - - @Authorization(value = "api_key_query") - }, tags={ "fake_classname_tags 123#$%^" }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Client testClassname(@Valid @NotNull Client body); - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java index cf73d9d50164..fb0c0b5b6266 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java @@ -3,7 +3,6 @@ import java.io.File; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import java.util.Set; import javax.ws.rs.*; import javax.ws.rs.core.Response; @@ -27,28 +26,28 @@ public interface PetApi { /** * * - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store * @return successful operation * @return Invalid input */ @POST @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Add a new pet to the store", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @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 = Pet.class), @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - void addPet(@Valid @NotNull Pet body); + Pet addPet(@Valid @NotNull Pet pet); /** * * * @param petId Pet id to delete - * @return successful operation * @return Invalid pet value */ @DELETE @@ -62,7 +61,6 @@ public interface 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 = 400, message = "Invalid pet value", response = Void.class) }) void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId); @@ -79,7 +77,6 @@ public interface PetApi { @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", authorizations = { @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet" }) @ApiResponses(value = { @@ -100,13 +97,12 @@ public interface PetApi { @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", authorizations = { @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "Set") }) - Set findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set tags); + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "List") }) + List findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") List tags); /** @@ -134,7 +130,7 @@ public interface PetApi { /** * * - * @param body Pet object that needs to be added to the store + * @param pet Pet object that needs to be added to the store * @return successful operation * @return Invalid ID supplied * @return Pet not found @@ -142,17 +138,18 @@ public interface PetApi { */ @PUT @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Update an existing pet", notes = "", authorizations = { @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @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 = Pet.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) }) - void updatePet(@Valid @NotNull Pet body); + Pet updatePet(@Valid @NotNull Pet pet); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/RestApplication.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/RestApplication.java deleted file mode 100644 index 7df2d0fe3334..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/RestApplication.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openapitools.api; - -import javax.ws.rs.ApplicationPath; -import javax.ws.rs.core.Application; - -@ApplicationPath(RestResourceRoot.APPLICATION_PATH) -public class RestApplication extends Application { - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/RestResourceRoot.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/RestResourceRoot.java deleted file mode 100644 index 96ba6c8d8e40..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/RestResourceRoot.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.openapitools.api; - -public class RestResourceRoot { - public static final String APPLICATION_PATH = "/v2"; -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java index 81ce7ec46b90..1bfa1f9b1f88 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java @@ -30,12 +30,12 @@ public interface StoreApi { * @return Order not found */ @DELETE - @Path("/order/{order_id}") + @Path("/order/{orderId}") @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - void deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId); + void deleteOrder(@PathParam("orderId") @ApiParam("ID of the order that needs to be deleted") String orderId); /** @@ -64,30 +64,31 @@ public interface StoreApi { * @return Order not found */ @GET - @Path("/order/{order_id}") + @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - Order getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId); + Order getOrderById(@PathParam("orderId") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId); /** * * - * @param body order placed for purchasing the pet + * @param order order placed for purchasing the pet * @return successful operation * @return Invalid Order */ @POST @Path("/order") + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Place an order for a pet", notes = "", tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) - Order placeOrder(@Valid @NotNull Order body); + Order placeOrder(@Valid @NotNull Order order); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java index 179fa473acc2..409eeae6fbc6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java @@ -25,42 +25,54 @@ public interface UserApi { /** * This can only be done by the logged in user. * - * @param body Created user object + * @param user Created user object * @return successful operation */ @POST - @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" }) + @Consumes({ "application/json" }) + @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createUser(@Valid @NotNull User body); + void createUser(@Valid @NotNull User user); /** * * - * @param body List of user object + * @param user List of user object * @return successful operation */ @POST @Path("/createWithArray") - @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) + @Consumes({ "application/json" }) + @ApiOperation(value = "Creates list of users with given input array", notes = "", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body); + void createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user); /** * * - * @param body List of user object + * @param user List of user object * @return successful operation */ @POST @Path("/createWithList") - @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" }) + @Consumes({ "application/json" }) + @ApiOperation(value = "Creates list of users with given input array", notes = "", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - void createUsersWithListInput(@Valid @NotNull List<@Valid User> body); + void createUsersWithListInput(@Valid @NotNull List<@Valid User> user); /** @@ -72,7 +84,10 @@ public interface UserApi { */ @DELETE @Path("/{username}") - @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", tags={ "user" }) + @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) @@ -113,7 +128,7 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - String loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); + String loginUser(@QueryParam("username") @NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); /** @@ -123,7 +138,10 @@ public interface UserApi { */ @GET @Path("/logout") - @ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ "user" }) + @ApiOperation(value = "Logs out current logged in user session", notes = "", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) void logoutUser(); @@ -133,16 +151,20 @@ public interface UserApi { * This can only be done by the logged in user. * * @param username name that need to be deleted - * @param body Updated user object + * @param user Updated user object * @return Invalid user supplied * @return User not found */ @PUT @Path("/{username}") - @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", tags={ "user" }) + @Consumes({ "application/json" }) + @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", authorizations = { + + @Authorization(value = "api_key") + }, tags={ "user" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 404, message = "User not found", response = Void.class) }) - void updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User body); + void updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User user); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java deleted file mode 100644 index 4e5b3b4d13db..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesAnyType") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesAnyType extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesAnyType() { - } - - /** - **/ - public AdditionalPropertiesAnyType 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Object getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.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 AdditionalPropertiesAnyType {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java deleted file mode 100644 index bd20f8f9b3cb..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ /dev/null @@ -1,123 +0,0 @@ -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; - -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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesArray") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesArray extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesArray() { - } - - /** - **/ - public AdditionalPropertiesArray 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map> getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public List getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.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 AdditionalPropertiesArray {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java deleted file mode 100644 index c8f3e30b4a94..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesBoolean") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesBoolean extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesBoolean() { - } - - /** - **/ - public AdditionalPropertiesBoolean 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Boolean getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.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 AdditionalPropertiesBoolean {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java deleted file mode 100644 index 795366dffb10..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ /dev/null @@ -1,435 +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.List; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesClass implements Serializable { - private @Valid Map mapString = new HashMap<>(); - private @Valid Map mapNumber = new HashMap<>(); - private @Valid Map mapInteger = new HashMap<>(); - private @Valid Map mapBoolean = new HashMap<>(); - private @Valid Map> mapArrayInteger = new HashMap<>(); - private @Valid Map> mapArrayAnytype = new HashMap<>(); - private @Valid Map> mapMapString = new HashMap<>(); - private @Valid Map> mapMapAnytype = new HashMap<>(); - private Object anytype1; - private Object anytype2; - private Object anytype3; - - public AdditionalPropertiesClass() { - } - - /** - **/ - public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_string") - public Map getMapString() { - return mapString; - } - - @JsonProperty("map_string") - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); - } - - this.mapString.put(key, mapStringItem); - return this; - } - - public AdditionalPropertiesClass removeMapStringItem(String key) { - if (this.mapString != null) { - this.mapString.remove(key); - } - - return this; - } - /** - **/ - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_number") - @Valid public Map getMapNumber() { - return mapNumber; - } - - @JsonProperty("map_number") - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); - } - - this.mapNumber.put(key, mapNumberItem); - return this; - } - - public AdditionalPropertiesClass removeMapNumberItem(String key) { - if (this.mapNumber != null) { - this.mapNumber.remove(key); - } - - return this; - } - /** - **/ - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_integer") - public Map getMapInteger() { - return mapInteger; - } - - @JsonProperty("map_integer") - public void setMapInteger(Map 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 mapBoolean) { - this.mapBoolean = mapBoolean; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_boolean") - public Map getMapBoolean() { - return mapBoolean; - } - - @JsonProperty("map_boolean") - public void setMapBoolean(Map 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> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_array_integer") - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - @JsonProperty("map_array_integer") - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List 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> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_array_anytype") - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - @JsonProperty("map_array_anytype") - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List 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> mapMapString) { - this.mapMapString = mapMapString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_map_string") - public Map> getMapMapString() { - return mapMapString; - } - - @JsonProperty("map_map_string") - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map 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> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_map_anytype") - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - @JsonProperty("map_map_anytype") - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map 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) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - 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); - } - - @Override - public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); - } - - @Override - public String toString() { - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java deleted file mode 100644 index 11b46f581cfb..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesInteger") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesInteger extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesInteger() { - } - - /** - **/ - 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Integer getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java deleted file mode 100644 index 1a4c1aed481c..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ /dev/null @@ -1,123 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesNumber") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesNumber extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesNumber() { - } - - /** - **/ - 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public BigDecimal getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java deleted file mode 100644 index da4b3d6645b2..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesObject") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesObject extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesObject() { - } - - /** - **/ - 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map> getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Map getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java deleted file mode 100644 index 17ab53903a07..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ /dev/null @@ -1,122 +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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("AdditionalPropertiesString") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesString extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesString() { - } - - /** - **/ - 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; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesString putAdditionalProperty(String key, String value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public String getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java deleted file mode 100644 index 619f7f9630ac..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java +++ /dev/null @@ -1,121 +0,0 @@ -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 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; -import org.openapitools.jackson.nullable.JsonNullable; - -@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"), -}) - - -@JsonTypeName("Animal") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Animal implements Serializable { - private String className; - private String color = "red"; - - public Animal() { - } - - @JsonCreator - public Animal( - @JsonProperty(required = true, value = "className") String className - ) { - this.className = className; - } - - /** - **/ - public Animal className(String className) { - this.className = className; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "className") - @NotNull public String getClassName() { - return className; - } - - @JsonProperty(required = true, value = "className") - public void setClassName(String className) { - this.className = className; - } - - /** - **/ - public Animal color(String color) { - this.color = color; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("color") - public String getColor() { - return color; - } - - @JsonProperty("color") - public void setColor(String color) { - this.color = color; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java deleted file mode 100644 index 46196f898a3b..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ /dev/null @@ -1,103 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("ArrayOfArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayOfArrayOfNumberOnly implements Serializable { - private @Valid List> arrayArrayNumber = new ArrayList<>(); - - public ArrayOfArrayOfNumberOnly() { - } - - /** - **/ - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("ArrayArrayNumber") - @Valid public List<@Valid List<@Valid BigDecimal>> getArrayArrayNumber() { - return arrayArrayNumber; - } - - @JsonProperty("ArrayArrayNumber") - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList<>(); - } - - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - public ArrayOfArrayOfNumberOnly removeArrayArrayNumberItem(List arrayArrayNumberItem) { - if (arrayArrayNumberItem != null && this.arrayArrayNumber != null) { - this.arrayArrayNumber.remove(arrayArrayNumberItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java deleted file mode 100644 index f60ffbd205a4..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ /dev/null @@ -1,103 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("ArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayOfNumberOnly implements Serializable { - private @Valid List arrayNumber = new ArrayList<>(); - - public ArrayOfNumberOnly() { - } - - /** - **/ - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("ArrayNumber") - @Valid public List<@Valid BigDecimal> getArrayNumber() { - return arrayNumber; - } - - @JsonProperty("ArrayNumber") - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } - - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList<>(); - } - - this.arrayNumber.add(arrayNumberItem); - return this; - } - - public ArrayOfNumberOnly removeArrayNumberItem(BigDecimal arrayNumberItem) { - if (arrayNumberItem != null && this.arrayNumber != null) { - this.arrayNumber.remove(arrayNumberItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java deleted file mode 100644 index 25cc5b61296b..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java +++ /dev/null @@ -1,179 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.model.ReadOnlyFirst; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("ArrayTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayTest implements Serializable { - private @Valid List arrayOfString = new ArrayList<>(); - private @Valid List> arrayArrayOfInteger = new ArrayList<>(); - private @Valid List> arrayArrayOfModel = new ArrayList<>(); - - public ArrayTest() { - } - - /** - **/ - public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("array_of_string") - public List getArrayOfString() { - return arrayOfString; - } - - @JsonProperty("array_of_string") - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList<>(); - } - - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - public ArrayTest removeArrayOfStringItem(String arrayOfStringItem) { - if (arrayOfStringItem != null && this.arrayOfString != null) { - this.arrayOfString.remove(arrayOfStringItem); - } - - return this; - } - /** - **/ - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("array_array_of_integer") - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - @JsonProperty("array_array_of_integer") - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList<>(); - } - - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (arrayArrayOfIntegerItem != null && this.arrayArrayOfInteger != null) { - this.arrayArrayOfInteger.remove(arrayArrayOfIntegerItem); - } - - return this; - } - /** - **/ - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("array_array_of_model") - @Valid public List<@Valid List<@Valid ReadOnlyFirst>> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList<>(); - } - - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { - if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { - this.arrayArrayOfModel.remove(arrayArrayOfModelItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java deleted file mode 100644 index a32529ed3473..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java +++ /dev/null @@ -1,141 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("BigCat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - 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; - - public BigCat() { - } - - @JsonCreator - public BigCat( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java deleted file mode 100644 index f758db7def7a..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java +++ /dev/null @@ -1,194 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Capitalization") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Capitalization implements Serializable { - private String smallCamel; - private String capitalCamel; - private String smallSnake; - private String capitalSnake; - private String scAETHFlowPoints; - private String ATT_NAME; - - public Capitalization() { - } - - /** - **/ - public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("smallCamel") - public String getSmallCamel() { - return smallCamel; - } - - @JsonProperty("smallCamel") - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - /** - **/ - public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("CapitalCamel") - public String getCapitalCamel() { - return capitalCamel; - } - - @JsonProperty("CapitalCamel") - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - /** - **/ - public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("small_Snake") - public String getSmallSnake() { - return smallSnake; - } - - @JsonProperty("small_Snake") - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - /** - **/ - public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("Capital_Snake") - public String getCapitalSnake() { - return capitalSnake; - } - - @JsonProperty("Capital_Snake") - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - /** - **/ - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("SCA_ETH_Flow_Points") - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - @JsonProperty("SCA_ETH_Flow_Points") - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - /** - * Name of the pet - **/ - public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - return this; - } - - - @ApiModelProperty(value = "Name of the pet ") - @JsonProperty("ATT_NAME") - public String getATTNAME() { - return ATT_NAME; - } - - @JsonProperty("ATT_NAME") - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java deleted file mode 100644 index 17907ab9b630..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.Animal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Cat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Cat extends Animal implements Serializable { - private Boolean declawed; - - public Cat() { - } - - @JsonCreator - public Cat( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - public Cat declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty("declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java index f723fd424649..3af41d02e87e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java @@ -14,24 +14,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * A category for a pet + **/ +@ApiModel(description = "A category for a pet") @JsonTypeName("Category") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Category implements Serializable { private Long id; - private String name = "default-name"; + private String name; public Category() { } - @JsonCreator - public Category( - @JsonProperty(required = true, value = "name") String name - ) { - this.name = name; - } - /** **/ public Category id(Long id) { @@ -59,13 +54,13 @@ public Category name(String name) { } - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "name") - @NotNull public String getName() { + @ApiModelProperty(value = "") + @JsonProperty("name") + @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")public String getName() { return name; } - @JsonProperty(required = true, value = "name") + @JsonProperty("name") public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java deleted file mode 100644 index a7baffc38ea1..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model with \"_class\" property - **/ -@ApiModel(description = "Model for testing model with \"_class\" property") -@JsonTypeName("ClassModel") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ClassModel implements Serializable { - private String propertyClass; - - public ClassModel() { - } - - /** - **/ - public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("_class") - public String getPropertyClass() { - return propertyClass; - } - - @JsonProperty("_class") - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java deleted file mode 100644 index 61d68eeaa884..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Client") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Client implements Serializable { - private String client; - - public Client() { - } - - /** - **/ - public Client client(String client) { - this.client = client; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("client") - public String getClient() { - return client; - } - - @JsonProperty("client") - public void setClient(String client) { - this.client = client; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); - } - - @Override - public int hashCode() { - return Objects.hash(client); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - - sb.append(" client: ").append(toIndentedString(client)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java deleted file mode 100644 index 0b7286493b6f..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.Animal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Dog") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Dog extends Animal implements Serializable { - private String breed; - - public Dog() { - } - - @JsonCreator - public Dog( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - public Dog breed(String breed) { - this.breed = breed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - @JsonProperty("breed") - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java deleted file mode 100644 index 17dd06454327..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java +++ /dev/null @@ -1,218 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("EnumArrays") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class EnumArrays implements Serializable { - public enum JustSymbolEnum { - - GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$")); - - - private String value; - - JustSymbolEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static JustSymbolEnum fromString(String s) { - for (JustSymbolEnum b : JustSymbolEnum.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 JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private JustSymbolEnum justSymbol; - public enum ArrayEnumEnum { - - FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); - - - private String value; - - ArrayEnumEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static ArrayEnumEnum fromString(String s) { - for (ArrayEnumEnum b : ArrayEnumEnum.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 ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid List arrayEnum = new ArrayList<>(); - - public EnumArrays() { - } - - /** - **/ - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - @JsonProperty("just_symbol") - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - /** - **/ - public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("array_enum") - public List getArrayEnum() { - return arrayEnum; - } - - @JsonProperty("array_enum") - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList<>(); - } - - this.arrayEnum.add(arrayEnumItem); - return this; - } - - public EnumArrays removeArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (arrayEnumItem != null && this.arrayEnum != null) { - this.arrayEnum.remove(arrayEnumItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumClass.java deleted file mode 100644 index f4b14d298a7d..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumClass.java +++ /dev/null @@ -1,60 +0,0 @@ -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 EnumClass - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public enum EnumClass { - - _ABC("_abc"), - - _EFG("-efg"), - - _XYZ_("(xyz)"); - - private String value; - - EnumClass(String value) { - this.value = value; - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumClass fromString(String s) { - for (EnumClass b : EnumClass.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 EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java deleted file mode 100644 index e211347ac201..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java +++ /dev/null @@ -1,368 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.OuterEnum; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("Enum_Test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class EnumTest implements Serializable { - public enum EnumStringEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); - - - private String value; - - EnumStringEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumStringEnum fromString(String s) { - for (EnumStringEnum b : EnumStringEnum.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 EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumStringEnum enumString; - public enum EnumStringRequiredEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); - - - private String value; - - EnumStringRequiredEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumStringRequiredEnum fromString(String s) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.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 EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumStringRequiredEnum enumStringRequired; - public enum EnumIntegerEnum { - - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); - - - private Integer value; - - EnumIntegerEnum (Integer v) { - value = v; - } - - public Integer value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into Integer, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumIntegerEnum fromString(String s) { - for (EnumIntegerEnum b : EnumIntegerEnum.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 EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumIntegerEnum enumInteger; - public enum EnumNumberEnum { - - NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); - - - private Double value; - - EnumNumberEnum (Double v) { - value = v; - } - - public Double value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into Double, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumNumberEnum fromString(String s) { - for (EnumNumberEnum b : EnumNumberEnum.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 EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumNumberEnum enumNumber; - private OuterEnum outerEnum; - - public EnumTest() { - } - - @JsonCreator - public EnumTest( - @JsonProperty(required = true, value = "enum_string_required") EnumStringRequiredEnum enumStringRequired - ) { - this.enumStringRequired = enumStringRequired; - } - - /** - **/ - public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { - return enumString; - } - - @JsonProperty("enum_string") - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - /** - **/ - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "enum_string_required") - @NotNull public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - @JsonProperty(required = true, value = "enum_string_required") - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - /** - **/ - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - @JsonProperty("enum_integer") - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - /** - **/ - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - @JsonProperty("enum_number") - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - /** - **/ - public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("outerEnum") - public OuterEnum getOuterEnum() { - return outerEnum; - } - - @JsonProperty("outerEnum") - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java deleted file mode 100644 index 4d86d3e1483d..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.model.ModelFile; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("FileSchemaTestClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class FileSchemaTestClass implements Serializable { - private ModelFile _file; - private @Valid List<@Valid ModelFile> files = new ArrayList<>(); - - public FileSchemaTestClass() { - } - - /** - **/ - public FileSchemaTestClass _file(ModelFile _file) { - this._file = _file; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("file") - @Valid public ModelFile getFile() { - return _file; - } - - @JsonProperty("file") - public void setFile(ModelFile _file) { - this._file = _file; - } - - /** - **/ - public FileSchemaTestClass files(List<@Valid ModelFile> files) { - this.files = files; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("files") - @Valid public List<@Valid ModelFile> getFiles() { - return files; - } - - @JsonProperty("files") - public void setFiles(List<@Valid ModelFile> files) { - this.files = files; - } - - public FileSchemaTestClass addFilesItem(ModelFile filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - - this.files.add(filesItem); - return this; - } - - public FileSchemaTestClass removeFilesItem(ModelFile filesItem) { - if (filesItem != null && this.files != null) { - this.files.remove(filesItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(_file, files); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - - sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java deleted file mode 100644 index 4344f2930cef..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java +++ /dev/null @@ -1,399 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.math.BigDecimal; -import java.util.Arrays; -import java.util.Date; -import java.util.UUID; -import org.joda.time.LocalDate; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("format_test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class FormatTest implements Serializable { - private Integer integer; - private Integer int32; - private Long int64; - private BigDecimal number; - private Float _float; - private Double _double; - private String string; - private byte[] _byte; - private File binary; - private LocalDate date; - private Date dateTime; - private UUID uuid; - private String password; - private BigDecimal bigDecimal; - - public FormatTest() { - } - - @JsonCreator - public FormatTest( - @JsonProperty(required = true, value = "number") BigDecimal number, - @JsonProperty(required = true, value = "byte") byte[] _byte, - @JsonProperty(required = true, value = "date") LocalDate date, - @JsonProperty(required = true, value = "password") String password - ) { - this.number = number; - this._byte = _byte; - this.date = date; - this.password = password; - } - - /** - * minimum: 10 - * maximum: 100 - **/ - public FormatTest integer(Integer integer) { - this.integer = integer; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("integer") - @Min(10) @Max(100)public Integer getInteger() { - return integer; - } - - @JsonProperty("integer") - public void setInteger(Integer integer) { - this.integer = integer; - } - - /** - * minimum: 20 - * maximum: 200 - **/ - public FormatTest int32(Integer int32) { - this.int32 = int32; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("int32") - @Min(20) @Max(200)public Integer getInt32() { - return int32; - } - - @JsonProperty("int32") - public void setInt32(Integer int32) { - this.int32 = int32; - } - - /** - **/ - public FormatTest int64(Long int64) { - this.int64 = int64; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("int64") - public Long getInt64() { - return int64; - } - - @JsonProperty("int64") - public void setInt64(Long int64) { - this.int64 = int64; - } - - /** - * minimum: 32.1 - * maximum: 543.2 - **/ - public FormatTest number(BigDecimal number) { - this.number = number; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "number") - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")public BigDecimal getNumber() { - return number; - } - - @JsonProperty(required = true, value = "number") - public void setNumber(BigDecimal number) { - this.number = number; - } - - /** - * minimum: 54.3 - * maximum: 987.6 - **/ - public FormatTest _float(Float _float) { - this._float = _float; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("float") - @DecimalMin("54.3") @DecimalMax("987.6")public Float getFloat() { - return _float; - } - - @JsonProperty("float") - public void setFloat(Float _float) { - this._float = _float; - } - - /** - * minimum: 67.8 - * maximum: 123.4 - **/ - public FormatTest _double(Double _double) { - this._double = _double; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("double") - @DecimalMin("67.8") @DecimalMax("123.4")public Double getDouble() { - return _double; - } - - @JsonProperty("double") - public void setDouble(Double _double) { - this._double = _double; - } - - /** - **/ - public FormatTest string(String string) { - this.string = string; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("string") - @Pattern(regexp="/[a-z]/i")public String getString() { - return string; - } - - @JsonProperty("string") - public void setString(String string) { - this.string = string; - } - - /** - **/ - public FormatTest _byte(byte[] _byte) { - this._byte = _byte; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "byte") - @NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")public byte[] getByte() { - return _byte; - } - - @JsonProperty(required = true, value = "byte") - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - /** - **/ - public FormatTest binary(File binary) { - this.binary = binary; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("binary") - public File getBinary() { - return binary; - } - - @JsonProperty("binary") - public void setBinary(File binary) { - this.binary = binary; - } - - /** - **/ - public FormatTest date(LocalDate date) { - this.date = date; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "date") - @NotNull public LocalDate getDate() { - return date; - } - - @JsonProperty(required = true, value = "date") - public void setDate(LocalDate date) { - this.date = date; - } - - /** - **/ - public FormatTest dateTime(Date dateTime) { - this.dateTime = dateTime; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("dateTime") - public Date getDateTime() { - return dateTime; - } - - @JsonProperty("dateTime") - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - /** - **/ - public FormatTest uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - @JsonProperty("uuid") - public UUID getUuid() { - return uuid; - } - - @JsonProperty("uuid") - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - /** - **/ - public FormatTest password(String password) { - this.password = password; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "password") - @NotNull @Size(min=10,max=64)public String getPassword() { - return password; - } - - @JsonProperty(required = true, value = "password") - public void setPassword(String password) { - this.password = password; - } - - /** - **/ - public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("BigDecimal") - @Valid public BigDecimal getBigDecimal() { - return bigDecimal; - } - - @JsonProperty("BigDecimal") - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - 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(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java deleted file mode 100644 index ca201184e676..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("hasOnlyReadOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class HasOnlyReadOnly implements Serializable { - private String bar; - private String foo; - - public HasOnlyReadOnly() { - } - - /** - **/ - public HasOnlyReadOnly bar(String bar) { - this.bar = bar; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("bar") - public void setBar(String bar) { - this.bar = bar; - } - - /** - **/ - public HasOnlyReadOnly foo(String foo) { - this.foo = foo; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("foo") - public void setFoo(String foo) { - this.foo = foo; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java deleted file mode 100644 index 3e8a30971879..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ /dev/null @@ -1,262 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("MapTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class MapTest implements Serializable { - private @Valid Map> mapMapOfString = new HashMap<>(); - public enum InnerEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); - - - private String value; - - InnerEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static InnerEnum fromString(String s) { - for (InnerEnum b : InnerEnum.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 InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid Map mapOfEnumString = new HashMap<>(); - private @Valid Map directMap = new HashMap<>(); - private @Valid Map indirectMap = new HashMap<>(); - - public MapTest() { - } - - /** - **/ - public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_map_of_string") - public Map> getMapMapOfString() { - return mapMapOfString; - } - - @JsonProperty("map_map_of_string") - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap<>(); - } - - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - public MapTest removeMapMapOfStringItem(String key) { - if (this.mapMapOfString != null) { - this.mapMapOfString.remove(key); - } - - return this; - } - /** - **/ - public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - @JsonProperty("map_of_enum_string") - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap<>(); - } - - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - public MapTest removeMapOfEnumStringItem(String key) { - if (this.mapOfEnumString != null) { - this.mapOfEnumString.remove(key); - } - - return this; - } - /** - **/ - public MapTest directMap(Map directMap) { - this.directMap = directMap; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("direct_map") - public Map getDirectMap() { - return directMap; - } - - @JsonProperty("direct_map") - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap<>(); - } - - this.directMap.put(key, directMapItem); - return this; - } - - public MapTest removeDirectMapItem(String key) { - if (this.directMap != null) { - this.directMap.remove(key); - } - - return this; - } - /** - **/ - public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("indirect_map") - public Map getIndirectMap() { - return indirectMap; - } - - @JsonProperty("indirect_map") - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap<>(); - } - - this.indirectMap.put(key, indirectMapItem); - return this; - } - - public MapTest removeIndirectMapItem(String key) { - if (this.indirectMap != null) { - this.indirectMap.remove(key); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java deleted file mode 100644 index 6de660d6b1c0..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.openapitools.model.Animal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { - private UUID uuid; - private Date dateTime; - private @Valid Map map = new HashMap<>(); - - public MixedPropertiesAndAdditionalPropertiesClass() { - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("uuid") - public UUID getUuid() { - return uuid; - } - - @JsonProperty("uuid") - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { - this.dateTime = dateTime; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("dateTime") - public Date getDateTime() { - return dateTime; - } - - @JsonProperty("dateTime") - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("map") - @Valid public Map getMap() { - return map; - } - - @JsonProperty("map") - public void setMap(Map map) { - this.map = map; - } - - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - if (this.map == null) { - this.map = new HashMap<>(); - } - - this.map.put(key, mapItem); - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) { - if (this.map != null) { - this.map.remove(key); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java deleted file mode 100644 index 19f13db7bc32..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model name starting with number - **/ -@ApiModel(description = "Model for testing model name starting with number") -@JsonTypeName("200_response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Model200Response implements Serializable { - private Integer name; - private String propertyClass; - - public Model200Response() { - } - - /** - **/ - public Model200Response name(Integer name) { - this.name = name; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("name") - public Integer getName() { - return name; - } - - @JsonProperty("name") - public void setName(Integer name) { - this.name = name; - } - - /** - **/ - public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("class") - public String getPropertyClass() { - return propertyClass; - } - - @JsonProperty("class") - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java index 863143d1f476..fae896776d1d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -15,8 +15,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * Describes the result of uploading an image resource + **/ +@ApiModel(description = "Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class ModelApiResponse implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java deleted file mode 100644 index ecb6dd451b22..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Must be named `File` for test. - **/ -@ApiModel(description = "Must be named `File` for test.") -@JsonTypeName("File") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelFile implements Serializable { - private String sourceURI; - - public ModelFile() { - } - - /** - * Test capitalization - **/ - public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - - @ApiModelProperty(value = "Test capitalization") - @JsonProperty("sourceURI") - public String getSourceURI() { - return sourceURI; - } - - @JsonProperty("sourceURI") - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelFile {\n"); - - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java deleted file mode 100644 index 4c6128e7cbb5..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("List") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelList implements Serializable { - private String _123list; - - public ModelList() { - } - - /** - **/ - public ModelList _123list(String _123list) { - this._123list = _123list; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("123-list") - public String get123list() { - return _123list; - } - - @JsonProperty("123-list") - public void set123list(String _123list) { - this._123list = _123list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); - } - - @Override - public int hashCode() { - return Objects.hash(_123list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelList {\n"); - - sb.append(" _123list: ").append(toIndentedString(_123list)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java deleted file mode 100644 index edfaa2d4e5a5..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing reserved words - **/ -@ApiModel(description = "Model for testing reserved words") -@JsonTypeName("Return") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelReturn implements Serializable { - private Integer _return; - - public ModelReturn() { - } - - /** - **/ - public ModelReturn _return(Integer _return) { - this._return = _return; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("return") - public Integer getReturn() { - return _return; - } - - @JsonProperty("return") - public void setReturn(Integer _return) { - this._return = _return; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); - } - - @Override - public int hashCode() { - return Objects.hash(_return); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - - sb.append(" _return: ").append(toIndentedString(_return)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java deleted file mode 100644 index e4fd151f23ee..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java +++ /dev/null @@ -1,158 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model name same as property name - **/ -@ApiModel(description = "Model for testing model name same as property name") -@JsonTypeName("Name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Name implements Serializable { - private Integer name; - private Integer snakeCase; - private String property; - private Integer _123number; - - public Name() { - } - - @JsonCreator - public Name( - @JsonProperty(required = true, value = "name") Integer name - ) { - this.name = name; - } - - /** - **/ - public Name name(Integer name) { - this.name = name; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "name") - @NotNull public Integer getName() { - return name; - } - - @JsonProperty(required = true, value = "name") - public void setName(Integer name) { - this.name = name; - } - - /** - **/ - public Name snakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("snake_case") - public Integer getSnakeCase() { - return snakeCase; - } - - @JsonProperty("snake_case") - public void setSnakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - } - - /** - **/ - public Name property(String property) { - this.property = property; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("property") - public String getProperty() { - return property; - } - - @JsonProperty("property") - public void setProperty(String property) { - this.property = property; - } - - /** - **/ - public Name _123number(Integer _123number) { - this._123number = _123number; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("123Number") - public Integer get123number() { - return _123number; - } - - @JsonProperty("123Number") - public void set123number(Integer _123number) { - this._123number = _123number; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java deleted file mode 100644 index 3bb63dae1103..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("NumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class NumberOnly implements Serializable { - private BigDecimal justNumber; - - public NumberOnly() { - } - - /** - **/ - public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("JustNumber") - @Valid public BigDecimal getJustNumber() { - return justNumber; - } - - @JsonProperty("JustNumber") - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - - @Override - public int hashCode() { - return Objects.hash(justNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - - sb.append(" justNumber: ").append(toIndentedString(justNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java index 675c905d7ff9..894da5ddd0c6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java @@ -15,8 +15,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * An order for a pets from the pet store + **/ +@ApiModel(description = "An order for a pets from the pet store") @JsonTypeName("Order") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Order implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java deleted file mode 100644 index fe7c98df317b..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("OuterComposite") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class OuterComposite implements Serializable { - private BigDecimal myNumber; - private String myString; - private Boolean myBoolean; - - public OuterComposite() { - } - - /** - **/ - public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("my_number") - @Valid public BigDecimal getMyNumber() { - return myNumber; - } - - @JsonProperty("my_number") - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - /** - **/ - public OuterComposite myString(String myString) { - this.myString = myString; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("my_string") - public String getMyString() { - return myString; - } - - @JsonProperty("my_string") - public void setMyString(String myString) { - this.myString = myString; - } - - /** - **/ - public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("my_boolean") - public Boolean getMyBoolean() { - return myBoolean; - } - - @JsonProperty("my_boolean") - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterEnum.java deleted file mode 100644 index 02443e450059..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterEnum.java +++ /dev/null @@ -1,60 +0,0 @@ -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 OuterEnum - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public enum OuterEnum { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static OuterEnum fromString(String s) { - for (OuterEnum b : OuterEnum.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 OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java index 8727e9328e64..14bf913ae99b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java @@ -1,13 +1,10 @@ package org.openapitools.model; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedHashSet; import java.util.List; -import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import java.io.Serializable; @@ -22,15 +19,17 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * A pet for sale in the pet store + **/ +@ApiModel(description = "A pet for sale in the pet store") @JsonTypeName("Pet") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Pet implements Serializable { private Long id; private Category category; private String name; - private @Valid Set photoUrls = new LinkedHashSet<>(); + private @Valid List photoUrls = new ArrayList<>(); private @Valid List<@Valid Tag> tags = new ArrayList<>(); public enum StatusEnum { @@ -87,7 +86,7 @@ public Pet() { @JsonCreator public Pet( @JsonProperty(required = true, value = "name") String name, - @JsonProperty(required = true, value = "photoUrls") Set photoUrls + @JsonProperty(required = true, value = "photoUrls") List photoUrls ) { this.name = name; this.photoUrls = photoUrls; @@ -152,7 +151,7 @@ public void setName(String name) { /** **/ - public Pet photoUrls(Set photoUrls) { + public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; } @@ -160,19 +159,18 @@ public Pet photoUrls(Set photoUrls) { @ApiModelProperty(required = true, value = "") @JsonProperty(required = true, value = "photoUrls") - @NotNull public Set getPhotoUrls() { + @NotNull public List getPhotoUrls() { return photoUrls; } @JsonProperty(required = true, value = "photoUrls") - @JsonDeserialize(as = LinkedHashSet.class) - public void setPhotoUrls(Set photoUrls) { + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet addPhotoUrlsItem(String photoUrlsItem) { if (this.photoUrls == null) { - this.photoUrls = new LinkedHashSet<>(); + this.photoUrls = new ArrayList<>(); } this.photoUrls.add(photoUrlsItem); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java deleted file mode 100644 index 05453b41ab3f..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("ReadOnlyFirst") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ReadOnlyFirst implements Serializable { - private String bar; - private String baz; - - public ReadOnlyFirst() { - } - - /** - **/ - public ReadOnlyFirst bar(String bar) { - this.bar = bar; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("bar") - public void setBar(String bar) { - this.bar = bar; - } - - /** - **/ - public ReadOnlyFirst baz(String baz) { - this.baz = baz; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - @JsonProperty("baz") - public void setBaz(String baz) { - this.baz = baz; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); - } - - @Override - public int hashCode() { - return Objects.hash(bar, baz); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java deleted file mode 100644 index b47a587e0db7..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("$special[model.name]") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class SpecialModelName implements Serializable { - private Long $specialPropertyName; - - public SpecialModelName() { - } - - /** - **/ - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("$special[property.name]") - public Long get$SpecialPropertyName() { - return $specialPropertyName; - } - - @JsonProperty("$special[property.name]") - public void set$SpecialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); - } - - @Override - public int hashCode() { - return Objects.hash($specialPropertyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java index 249cac6ac5fe..f881021581fc 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java @@ -14,8 +14,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * A tag for a pet + **/ +@ApiModel(description = "A tag for a pet") @JsonTypeName("Tag") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Tag implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java deleted file mode 100644 index 4a36b583c5f1..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ /dev/null @@ -1,206 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("TypeHolderDefault") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class TypeHolderDefault implements Serializable { - private String stringItem = "what"; - private BigDecimal numberItem; - private Integer integerItem; - private Boolean boolItem = true; - private @Valid List arrayItem = new ArrayList<>(); - - public TypeHolderDefault() { - } - - @JsonCreator - public TypeHolderDefault( - @JsonProperty(required = true, value = "string_item") String stringItem, - @JsonProperty(required = true, value = "number_item") BigDecimal numberItem, - @JsonProperty(required = true, value = "integer_item") Integer integerItem, - @JsonProperty(required = true, value = "bool_item") Boolean boolItem, - @JsonProperty(required = true, value = "array_item") List arrayItem - ) { - this.stringItem = stringItem; - this.numberItem = numberItem; - this.integerItem = integerItem; - this.boolItem = boolItem; - this.arrayItem = arrayItem; - } - - /** - **/ - public TypeHolderDefault stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "string_item") - @NotNull public String getStringItem() { - return stringItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "number_item") - @NotNull @Valid public BigDecimal getNumberItem() { - return numberItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "integer_item") - @NotNull public Integer getIntegerItem() { - return integerItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "bool_item") - @NotNull public Boolean getBoolItem() { - return boolItem; - } - - @JsonProperty(required = true, value = "bool_item") - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - /** - **/ - public TypeHolderDefault arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - - @ApiModelProperty(required = true, value = "") - @JsonProperty(required = true, value = "array_item") - @NotNull public List getArrayItem() { - return arrayItem; - } - - @JsonProperty(required = true, value = "array_item") - public void setArrayItem(List 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java deleted file mode 100644 index e339aef3e3f2..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ /dev/null @@ -1,230 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("TypeHolderExample") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.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 arrayItem = new ArrayList<>(); - - public TypeHolderExample() { - } - - @JsonCreator - public TypeHolderExample( - @JsonProperty(required = true, value = "string_item") String stringItem, - @JsonProperty(required = true, value = "number_item") BigDecimal numberItem, - @JsonProperty(required = true, value = "float_item") Float floatItem, - @JsonProperty(required = true, value = "integer_item") Integer integerItem, - @JsonProperty(required = true, value = "bool_item") Boolean boolItem, - @JsonProperty(required = true, value = "array_item") List arrayItem - ) { - this.stringItem = stringItem; - this.numberItem = numberItem; - this.floatItem = floatItem; - this.integerItem = integerItem; - this.boolItem = boolItem; - this.arrayItem = arrayItem; - } - - /** - **/ - public TypeHolderExample stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - - @ApiModelProperty(example = "what", required = true, value = "") - @JsonProperty(required = true, value = "string_item") - @NotNull public String getStringItem() { - return stringItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "number_item") - @NotNull @Valid public BigDecimal getNumberItem() { - return numberItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "float_item") - @NotNull public Float getFloatItem() { - return floatItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "integer_item") - @NotNull public Integer getIntegerItem() { - return integerItem; - } - - @JsonProperty(required = true, value = "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(required = true, value = "bool_item") - @NotNull public Boolean getBoolItem() { - return boolItem; - } - - @JsonProperty(required = true, value = "bool_item") - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - /** - **/ - public TypeHolderExample arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @JsonProperty(required = true, value = "array_item") - @NotNull public List getArrayItem() { - return arrayItem; - } - - @JsonProperty(required = true, value = "array_item") - public void setArrayItem(List 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java index 6c5f156b0f02..5dd60fab832f 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java @@ -14,8 +14,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; - - +/** + * A User who is purchasing from the pet store + **/ +@ApiModel(description = "A User who is purchasing from the pet store") @JsonTypeName("User") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class User implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java deleted file mode 100644 index b9419b3862e0..000000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java +++ /dev/null @@ -1,847 +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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@JsonTypeName("XmlItem") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class XmlItem implements Serializable { - private String attributeString; - private BigDecimal attributeNumber; - private Integer attributeInteger; - private Boolean attributeBoolean; - private @Valid List wrappedArray = new ArrayList<>(); - private String nameString; - private BigDecimal nameNumber; - private Integer nameInteger; - private Boolean nameBoolean; - private @Valid List nameArray = new ArrayList<>(); - private @Valid List nameWrappedArray = new ArrayList<>(); - private String prefixString; - private BigDecimal prefixNumber; - private Integer prefixInteger; - private Boolean prefixBoolean; - private @Valid List prefixArray = new ArrayList<>(); - private @Valid List prefixWrappedArray = new ArrayList<>(); - private String namespaceString; - private BigDecimal namespaceNumber; - private Integer namespaceInteger; - private Boolean namespaceBoolean; - private @Valid List namespaceArray = new ArrayList<>(); - private @Valid List namespaceWrappedArray = new ArrayList<>(); - private String prefixNsString; - private BigDecimal prefixNsNumber; - private Integer prefixNsInteger; - private Boolean prefixNsBoolean; - private @Valid List prefixNsArray = new ArrayList<>(); - private @Valid List prefixNsWrappedArray = new ArrayList<>(); - - public XmlItem() { - } - - /** - **/ - public XmlItem attributeString(String attributeString) { - this.attributeString = attributeString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("attribute_string") - public String getAttributeString() { - return attributeString; - } - - @JsonProperty("attribute_string") - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - /** - **/ - public XmlItem attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("attribute_number") - @Valid public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - @JsonProperty("attribute_number") - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - /** - **/ - public XmlItem attributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("attribute_integer") - public Integer getAttributeInteger() { - return attributeInteger; - } - - @JsonProperty("attribute_integer") - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - /** - **/ - public XmlItem attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("attribute_boolean") - public Boolean getAttributeBoolean() { - return attributeBoolean; - } - - @JsonProperty("attribute_boolean") - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - /** - **/ - public XmlItem wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("wrapped_array") - public List getWrappedArray() { - return wrappedArray; - } - - @JsonProperty("wrapped_array") - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList<>(); - } - - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - public XmlItem removeWrappedArrayItem(Integer wrappedArrayItem) { - if (wrappedArrayItem != null && this.wrappedArray != null) { - this.wrappedArray.remove(wrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem nameString(String nameString) { - this.nameString = nameString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("name_string") - public String getNameString() { - return nameString; - } - - @JsonProperty("name_string") - public void setNameString(String nameString) { - this.nameString = nameString; - } - - /** - **/ - public XmlItem nameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("name_number") - @Valid public BigDecimal getNameNumber() { - return nameNumber; - } - - @JsonProperty("name_number") - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - /** - **/ - public XmlItem nameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("name_integer") - public Integer getNameInteger() { - return nameInteger; - } - - @JsonProperty("name_integer") - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - /** - **/ - public XmlItem nameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("name_boolean") - public Boolean getNameBoolean() { - return nameBoolean; - } - - @JsonProperty("name_boolean") - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - /** - **/ - public XmlItem nameArray(List nameArray) { - this.nameArray = nameArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("name_array") - public List getNameArray() { - return nameArray; - } - - @JsonProperty("name_array") - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList<>(); - } - - this.nameArray.add(nameArrayItem); - return this; - } - - public XmlItem removeNameArrayItem(Integer nameArrayItem) { - if (nameArrayItem != null && this.nameArray != null) { - this.nameArray.remove(nameArrayItem); - } - - return this; - } - /** - **/ - public XmlItem nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("name_wrapped_array") - public List getNameWrappedArray() { - return nameWrappedArray; - } - - @JsonProperty("name_wrapped_array") - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList<>(); - } - - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - public XmlItem removeNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (nameWrappedArrayItem != null && this.nameWrappedArray != null) { - this.nameWrappedArray.remove(nameWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixString(String prefixString) { - this.prefixString = prefixString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("prefix_string") - public String getPrefixString() { - return prefixString; - } - - @JsonProperty("prefix_string") - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - /** - **/ - public XmlItem prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("prefix_number") - @Valid public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - @JsonProperty("prefix_number") - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - /** - **/ - public XmlItem prefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("prefix_integer") - public Integer getPrefixInteger() { - return prefixInteger; - } - - @JsonProperty("prefix_integer") - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - /** - **/ - public XmlItem prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("prefix_boolean") - public Boolean getPrefixBoolean() { - return prefixBoolean; - } - - @JsonProperty("prefix_boolean") - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - /** - **/ - public XmlItem prefixArray(List prefixArray) { - this.prefixArray = prefixArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("prefix_array") - public List getPrefixArray() { - return prefixArray; - } - - @JsonProperty("prefix_array") - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList<>(); - } - - this.prefixArray.add(prefixArrayItem); - return this; - } - - public XmlItem removePrefixArrayItem(Integer prefixArrayItem) { - if (prefixArrayItem != null && this.prefixArray != null) { - this.prefixArray.remove(prefixArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("prefix_wrapped_array") - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - @JsonProperty("prefix_wrapped_array") - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList<>(); - } - - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - public XmlItem removePrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (prefixWrappedArrayItem != null && this.prefixWrappedArray != null) { - this.prefixWrappedArray.remove(prefixWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem namespaceString(String namespaceString) { - this.namespaceString = namespaceString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("namespace_string") - public String getNamespaceString() { - return namespaceString; - } - - @JsonProperty("namespace_string") - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - /** - **/ - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("namespace_number") - @Valid public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - @JsonProperty("namespace_number") - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - /** - **/ - public XmlItem namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("namespace_integer") - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - @JsonProperty("namespace_integer") - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - /** - **/ - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("namespace_boolean") - public Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - @JsonProperty("namespace_boolean") - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - /** - **/ - public XmlItem namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("namespace_array") - public List getNamespaceArray() { - return namespaceArray; - } - - @JsonProperty("namespace_array") - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList<>(); - } - - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - public XmlItem removeNamespaceArrayItem(Integer namespaceArrayItem) { - if (namespaceArrayItem != null && this.namespaceArray != null) { - this.namespaceArray.remove(namespaceArrayItem); - } - - return this; - } - /** - **/ - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("namespace_wrapped_array") - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - @JsonProperty("namespace_wrapped_array") - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList<>(); - } - - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - public XmlItem removeNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (namespaceWrappedArrayItem != null && this.namespaceWrappedArray != null) { - this.namespaceWrappedArray.remove(namespaceWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - return this; - } - - - @ApiModelProperty(example = "string", value = "") - @JsonProperty("prefix_ns_string") - public String getPrefixNsString() { - return prefixNsString; - } - - @JsonProperty("prefix_ns_string") - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - /** - **/ - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - return this; - } - - - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty("prefix_ns_number") - @Valid public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - @JsonProperty("prefix_ns_number") - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - /** - **/ - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - return this; - } - - - @ApiModelProperty(example = "-2", value = "") - @JsonProperty("prefix_ns_integer") - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - @JsonProperty("prefix_ns_integer") - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - /** - **/ - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - - @ApiModelProperty(example = "true", value = "") - @JsonProperty("prefix_ns_boolean") - public Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - @JsonProperty("prefix_ns_boolean") - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - /** - **/ - public XmlItem prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("prefix_ns_array") - public List getPrefixNsArray() { - return prefixNsArray; - } - - @JsonProperty("prefix_ns_array") - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList<>(); - } - - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - public XmlItem removePrefixNsArrayItem(Integer prefixNsArrayItem) { - if (prefixNsArrayItem != null && this.prefixNsArray != null) { - this.prefixNsArray.remove(prefixNsArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("prefix_ns_wrapped_array") - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - @JsonProperty("prefix_ns_wrapped_array") - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList<>(); - } - - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - public XmlItem removePrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (prefixNsWrappedArrayItem != null && this.prefixNsWrappedArray != null) { - this.prefixNsWrappedArray.remove(prefixNsWrappedArrayItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 0fe317558754..31074771d9fb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -1,15 +1,17 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: - description: "This spec is mainly for testing Petstore server and contains fake\ - \ endpoints, models. Please do not use this for any other purpose. Special characters:\ - \ \" \\" + description: "This is a sample server Petstore server. For this sample, you can\ + \ use the api key `special-key` to test the authorization filters." license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: -- url: http://petstore.swagger.io:80/v2 +- url: http://petstore.swagger.io/v2 tags: - description: Everything about your Pets name: pet @@ -20,23 +22,21 @@ tags: paths: /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Pet" - application/xml: - schema: - $ref: "#/components/schemas/Pet" - description: Pet object that needs to be added to the store - required: true + $ref: "#/components/requestBodies/Pet" responses: "200": - content: {} + content: + application/xml: + schema: + $ref: "#/components/schemas/Pet" + application/json: + schema: + $ref: "#/components/schemas/Pet" description: successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,36 +45,35 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json + - application/xml x-tags: - tag: pet put: + description: "" + externalDocs: + description: API documentation for the updatePet operation + url: http://petstore.swagger.io/v2/doc/updatePet operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Pet" - application/xml: - schema: - $ref: "#/components/schemas/Pet" - description: Pet object that needs to be added to the store - required: true + $ref: "#/components/requestBodies/Pet" responses: "200": - content: {} + content: + application/xml: + schema: + $ref: "#/components/schemas/Pet" + application/json: + schema: + $ref: "#/components/schemas/Pet" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -83,10 +82,10 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json + - application/xml x-tags: - tag: pet /pet/findByStatus: @@ -94,7 +93,8 @@ paths: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -124,11 +124,9 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by status tags: @@ -154,7 +152,6 @@ paths: items: type: string type: array - uniqueItems: true style: form responses: "200": @@ -164,20 +161,16 @@ paths: items: $ref: "#/components/schemas/Pet" type: array - uniqueItems: true application/json: schema: items: $ref: "#/components/schemas/Pet" type: array - uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by tags tags: @@ -189,25 +182,27 @@ paths: - tag: pet /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: - "200": - content: {} - description: successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -225,12 +220,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -242,10 +239,8 @@ paths: $ref: "#/components/schemas/Pet" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] @@ -258,15 +253,18 @@ paths: x-tags: - tag: pet post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -274,7 +272,6 @@ paths: $ref: "#/components/schemas/updatePetWithForm_request" responses: "405": - content: {} description: Invalid input security: - petstore_auth: @@ -290,15 +287,18 @@ paths: - tag: pet /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -348,10 +348,11 @@ paths: - tag: store /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/Order" description: order placed for purchasing the pet @@ -367,36 +368,34 @@ paths: $ref: "#/components/schemas/Order" description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json - application/xml x-tags: - tag: store - /store/order/{order_id}: + /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path - name: order_id + name: orderId required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -411,14 +410,16 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path - name: order_id + name: orderId required: true schema: format: int64 maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -430,10 +431,8 @@ paths: $ref: "#/components/schemas/Order" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -449,90 +448,84 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/User" description: Created user object required: true responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: "#/components/schemas/User" - type: array - description: List of user object - required: true + $ref: "#/components/requestBodies/UserArray" responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: "#/components/schemas/User" - type: array - description: List of user object - required: true + $ref: "#/components/requestBodies/UserArray" responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: + pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -544,18 +537,29 @@ paths: type: string description: successful operation headers: + Set-Cookie: + description: Cookie authentication key for use with the `api_key` apiKey + authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -567,11 +571,13 @@ paths: - tag: user /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Logs out current logged in user session tags: - user @@ -585,18 +591,20 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Delete user tags: - user @@ -605,14 +613,17 @@ paths: x-tags: - tag: user get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -624,10 +635,8 @@ paths: $ref: "#/components/schemas/User" description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -642,1533 +651,230 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/User" description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - application/json - x-tags: - - tag: user - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - security: - - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json x-tags: - - tag: fake_classname_tags 123#$%^ - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - in: query - name: required_string_group - required: true - schema: + - tag: user +components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/User" + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + $ref: "#/components/schemas/Pet" + description: Pet object that needs to be added to the store + required: true + schemas: + Order: + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 type: integer - - description: Required Boolean in group parameters - in: header - name: required_boolean_group - required: true - schema: - type: boolean - - description: Required Integer in group parameters - in: query - name: required_int64_group - required: true - schema: + petId: format: int64 type: integer - - description: String in group parameters - in: query - name: string_group - schema: + quantity: + format: int32 type: integer - - description: Boolean in group parameters - in: header - name: boolean_group - schema: + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false type: boolean - - description: Integer in group parameters - in: query - name: int64_group - schema: + title: Pet Order + type: object + xml: + name: Order + Category: + description: A category for a pet + example: + name: name + id: 6 + properties: + id: format: int64 type: integer - responses: - "400": - content: {} - description: Something wrong - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - x-accepts: - - application/json - x-tags: - - tag: fake - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - in: header - name: enum_header_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) + name: + pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" type: string - - description: Query parameter enum test (string array) - explode: false - in: query - name: enum_query_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - in: query - name: enum_query_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) + title: Pet category + type: object + xml: + name: Category + User: + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + username: type: string - - description: Query parameter enum test (double) - in: query - name: enum_query_integer - schema: - enum: - - 1 - - -2 + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status format: int32 type: integer - - description: Query parameter enum test (double) - in: query - name: enum_query_double - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testEnumParameters_request" - responses: - "400": - content: {} - description: Invalid request - "404": - content: {} - description: Not found - summary: To test enum parameters - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - summary: To test "client" model - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - post: - description: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testEndpointParameters_request" - required: true - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - security: - - http_basic_test: [] - summary: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterNumber" - description: Input number as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterNumber" - description: Output number - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterString" - description: Input string as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterString" - description: Output string - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterBoolean" - description: Input boolean as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterBoolean" - description: Output boolean - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterComposite" - description: Input composite as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterComposite" - description: Output composite - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/jsonFormData: - get: - operationId: testJsonFormData - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testJsonFormData_request" - required: true - responses: - "200": - content: {} - description: successful operation - summary: test json serialization of form data - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/inline-additionalProperties: - post: - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - "200": - content: {} - description: successful operation - summary: test inline additionalProperties - tags: - - fake - x-codegen-request-body-name: param - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - in: query - name: query - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/User" - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: "#/components/schemas/XmlItem" - application/xml; charset=utf-8: - schema: - $ref: "#/components/schemas/XmlItem" - application/xml; charset=utf-16: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml; charset=utf-8: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml; charset=utf-16: - schema: - $ref: "#/components/schemas/XmlItem" - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: - - application/json - x-tags: - - tag: fake - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - parameters: - - description: to test uuid example value - in: header - name: uuid_test - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - summary: To test special tags - tags: - - $another-fake? - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: $another-fake? - /fake/body-with-file-schema: - put: - description: "For this test, the body for this request much reference a schema\ - \ named `File`." - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FileSchemaTestClass" - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/test-query-parameters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: false - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: form - - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: {} - description: Success - tags: - - fake - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - $ref: "#/components/schemas/uploadFileWithRequiredFile_request" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ApiResponse" - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - x-content-type: multipart/form-data - x-accepts: - - application/json - x-tags: - - tag: pet -components: - schemas: - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order - Category: - example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: default-name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: "#/components/schemas/Category" - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - uniqueItems: true - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: "#/components/schemas/Tag" - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - type: object - xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" - Return: - description: Model for testing reserved words - properties: - return: - format: int32 - type: integer - type: object - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - "123Number": - readOnly: true - type: integer - required: - - name - type: object - xml: - name: Name - "200_response": - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - type: object - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - type: object - Dog: - allOf: - - $ref: "#/components/schemas/Animal" - - properties: - breed: - type: string - type: object - Cat: - allOf: - - $ref: "#/components/schemas/Animal" - - properties: - declawed: - type: boolean - type: object - BigCat: - allOf: - - $ref: "#/components/schemas/Cat" - - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: "#/components/schemas/Animal" - type: array - format_test: - properties: - integer: - maximum: 100 - minimum: 10 - type: integer - int32: - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - pattern: "/[a-z]/i" - type: string - byte: - format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - BigDecimal: - format: number - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: "#/components/schemas/OuterEnum" - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_string: - additionalProperties: - type: string - type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: "#/components/schemas/Animal" - type: object - type: object - List: - properties: - "123-list": - type: string - type: object - Client: - example: - client: client - properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: "#/components/schemas/ReadOnlyFirst" - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array + title: a User type: object - OuterEnum: - enum: - - placed - - approved - - delivered - type: string - OuterComposite: + xml: + name: User + Tag: + description: A tag for a pet example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true + name: name + id: 1 properties: - my_number: - type: number - my_string: + id: + format: int64 + type: integer + name: type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: "#/components/schemas/File" - files: - items: - $ref: "#/components/schemas/File" - type: array + title: Pet Tag type: object - File: - description: Must be named `File` for test. + xml: + name: Tag + Pet: + description: A pet for sale in the pet store example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - TypeHolderDefault: - properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: - type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 + id: + format: int64 type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string + category: + $ref: "#/components/schemas/Category" + name: + example: doggie type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: + photoUrls: items: - type: integer + type: string type: array xml: + name: photoUrl wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: + tags: items: - type: integer - xml: - name: xml_name_wrapped_array_item + $ref: "#/components/schemas/Tag" type: array xml: - name: xml_name_wrapped_array + name: tag wrapped: true - prefix_string: - example: string + status: + deprecated: true + description: pet status in the store + enum: + - available + - pending + - sold type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 + required: + - name + - photoUrls + title: a Pet + type: object + xml: + name: Pet + ApiResponse: + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string + type: type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string + message: type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true + title: An uploaded response type: object - xml: - namespace: http://a.com/schema - prefix: pre updatePetWithForm_request: properties: name: @@ -2188,123 +894,6 @@ components: format: binary type: string type: object - testEnumParameters_request: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - testEndpointParameters_request: - properties: - integer: - description: None - format: int32 - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: "/[a-z]/i" - type: string - pattern_without_delimiter: - description: None - pattern: "^[A-Z].*" - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - type: object - testJsonFormData_request: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - uploadFileWithRequiredFile_request: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - type: object securitySchemes: petstore_auth: flows: @@ -2318,11 +907,3 @@ components: in: header name: api_key type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: - scheme: basic - type: http -x-original-swagger-version: "2.0" diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator-ignore b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator-ignore index 5a9f4cf07bc2..7484ee590a38 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator-ignore @@ -21,7 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md -# -# -# -# diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES index 038f8f765497..58cacfd4a89c 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES @@ -1,59 +1,17 @@ .dockerignore README.md 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/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/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/ClassModel.java -src/gen/java/org/openapitools/model/Client.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/FileSchemaTestClass.java -src/gen/java/org/openapitools/model/FormatTest.java -src/gen/java/org/openapitools/model/HasOnlyReadOnly.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 src/gen/java/org/openapitools/model/ModelApiResponse.java -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/NumberOnly.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/Pet.java -src/gen/java/org/openapitools/model/ReadOnlyFirst.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/User.java -src/gen/java/org/openapitools/model/XmlItem.java src/main/docker/Dockerfile.jvm src/main/docker/Dockerfile.native src/main/resources/META-INF/openapi.yaml diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java deleted file mode 100644 index f661212eb520..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; -import java.util.UUID; - -import javax.ws.rs.*; -import javax.ws.rs.core.Response; - - - - - -import java.io.InputStream; -import java.util.Map; -import java.util.List; -import javax.validation.constraints.*; -import javax.validation.Valid; - -@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition( - info = @org.eclipse.microprofile.openapi.annotations.info.Info( - title = "", version="1.0.0", description="", - license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html") - ), - tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="") -) -@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="") -@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = { - @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "petstore_auth", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2, - description = "", - flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows( - implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog", - tokenUrl = "", - refreshUrl = "", - scopes = { - @org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"), - @org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets") - })) - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key_query", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key_query", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "http_basic_test", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP, - description = "", - scheme = "basic" - ) -}) -@Path("/another-fake/dummy") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AnotherFakeApi { - - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "call123testSpecialTags", summary = "To test special tags", description = "To test special tags and operation ID starting with number") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="$another-fake?") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) - }) - }) - public Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="to test uuid example value") UUID uuidTest,@Valid @NotNull Client body) { - return Response.ok().entity("magic!").build(); - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeApi.java deleted file mode 100644 index 8fb0a6705156..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeApi.java +++ /dev/null @@ -1,302 +0,0 @@ -package org.openapitools.api; - -import java.math.BigDecimal; -import org.openapitools.model.Client; -import java.io.File; -import org.openapitools.model.FileSchemaTestClass; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.Map; -import org.openapitools.model.ModelApiResponse; -import org.openapitools.model.OuterComposite; -import org.openapitools.model.User; -import org.openapitools.model.XmlItem; - -import javax.ws.rs.*; -import javax.ws.rs.core.Response; - - - - - -import java.io.InputStream; -import java.util.Map; -import java.util.List; -import javax.validation.constraints.*; -import javax.validation.Valid; - -@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition( - info = @org.eclipse.microprofile.openapi.annotations.info.Info( - title = "", version="1.0.0", description="", - license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html") - ), - tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="") -) -@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="") -@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = { - @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "petstore_auth", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2, - description = "", - flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows( - implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog", - tokenUrl = "", - refreshUrl = "", - scopes = { - @org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"), - @org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets") - })) - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key_query", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key_query", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "http_basic_test", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP, - description = "", - scheme = "basic" - ) -}) -@Path("/fake") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.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" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "createXmlItem", summary = "creates an XmlItem", description = "this route creates an XmlItem") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - - }) - }) - public Response createXmlItem(@Valid @NotNull XmlItem xmlItem) { - return Response.ok().entity("magic!").build(); - } - - @POST - @Path("/outer/boolean") - @Produces({ "*/*" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeOuterBooleanSerialize", summary = "", description = "Test serialization of outer boolean types") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output boolean", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Boolean.class)) - }) - }) - public Response fakeOuterBooleanSerialize(@Valid Boolean body) { - return Response.ok().entity("magic!").build(); - } - - @POST - @Path("/outer/composite") - @Produces({ "*/*" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeOuterCompositeSerialize", summary = "", description = "Test serialization of object with outer number type") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output composite", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = OuterComposite.class)) - }) - }) - public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) { - return Response.ok().entity("magic!").build(); - } - - @POST - @Path("/outer/number") - @Produces({ "*/*" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeOuterNumberSerialize", summary = "", description = "Test serialization of outer number types") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output number", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = BigDecimal.class)) - }) - }) - public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { - return Response.ok().entity("magic!").build(); - } - - @POST - @Path("/outer/string") - @Produces({ "*/*" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeOuterStringSerialize", summary = "", description = "Test serialization of outer string types") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output string", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = String.class)) - }) - }) - public Response fakeOuterStringSerialize(@Valid String body) { - return Response.ok().entity("magic!").build(); - } - - @PUT - @Path("/body-with-file-schema") - @Consumes({ "application/json" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testBodyWithFileSchema", summary = "", description = "For this test, the body for this request much reference a schema named `File`.") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Success", content = { - - }) - }) - public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body) { - return Response.ok().entity("magic!").build(); - } - - @PUT - @Path("/body-with-query-params") - @Consumes({ "application/json" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testBodyWithQueryParams", summary = "", description = "") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Success", content = { - - }) - }) - public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body) { - return Response.ok().entity("magic!").build(); - } - - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testClientModel", summary = "To test \"client\" model", description = "To test \"client\" model") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) - }) - }) - public Response testClientModel(@Valid @NotNull Client body) { - return Response.ok().entity("magic!").build(); - } - - @POST - @Consumes({ "application/x-www-form-urlencoded" }) - @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ - @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "http_basic_test") - }) - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid username supplied", content = { - - }), - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "User not found", content = { - - }) - }) - public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") LocalDateTime dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) { - return Response.ok().entity("magic!").build(); - } - - @GET - @Consumes({ "application/x-www-form-urlencoded" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testEnumParameters", summary = "To test enum parameters", description = "To test enum parameters") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid request", content = { - - }), - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "Not found", content = { - - }) - }) - public Response testEnumParameters(@HeaderParam("enum_header_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Header parameter enum test (string array)") List enumHeaderStringArray,@QueryParam("enum_query_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { - return Response.ok().entity("magic!").build(); - } - - @DELETE - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", description = "Fake endpoint to test group parameters (optional)") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Something wrong", content = { - - }) - }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Integer in group parameters") Long int64Group) { - return Response.ok().entity("magic!").build(); - } - - @POST - @Path("/inline-additionalProperties") - @Consumes({ "application/json" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", description = "") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - - }) - }) - public Response testInlineAdditionalProperties(@Valid @NotNull Map param) { - return Response.ok().entity("magic!").build(); - } - - @GET - @Path("/jsonFormData") - @Consumes({ "application/x-www-form-urlencoded" }) - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testJsonFormData", summary = "test json serialization of form data", description = "") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - - }) - }) - public Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) { - return Response.ok().entity("magic!").build(); - } - - @PUT - @Path("/test-query-parameters") - - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testQueryParameterCollectionFormat", summary = "", description = "To test the collection format in query parameters") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Success", content = { - - }) - }) - public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context) { - return Response.ok().entity("magic!").build(); - } - - @POST - @Path("/{petId}/uploadImageWithRequiredFile") - @Consumes({ "multipart/form-data" }) - @Produces({ "application/json" }) - @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ - @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) - }) - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", description = "") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = ModelApiResponse.class)) - }) - }) - public Response uploadFileWithRequiredFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) { - return Response.ok().entity("magic!").build(); - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java deleted file mode 100644 index 3f9a7ed53529..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; - -import javax.ws.rs.*; -import javax.ws.rs.core.Response; - - - - - -import java.io.InputStream; -import java.util.Map; -import java.util.List; -import javax.validation.constraints.*; -import javax.validation.Valid; - -@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition( - info = @org.eclipse.microprofile.openapi.annotations.info.Info( - title = "", version="1.0.0", description="", - license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html") - ), - tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="") -) -@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="") -@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = { - @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "petstore_auth", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2, - description = "", - flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows( - implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog", - tokenUrl = "", - refreshUrl = "", - scopes = { - @org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"), - @org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets") - })) - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key_query", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key_query", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "http_basic_test", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP, - description = "", - scheme = "basic" - ) -}) -@Path("/fake_classname_test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class FakeClassnameTestApi { - - @PATCH - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ - @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key_query") - }) - @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testClassname", summary = "To test class name in snake case", description = "To test class name in snake case") - @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake_classname_tags 123#$%^") - @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) - }) - }) - public Response testClassname(@Valid @NotNull Client body) { - return Response.ok().entity("magic!").build(); - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java index 5f8d5f48bb94..8e0d877c7062 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java @@ -3,7 +3,6 @@ import java.io.File; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; -import java.util.Set; import javax.ws.rs.*; import javax.ws.rs.core.Response; @@ -45,17 +44,6 @@ description = "", apiKeyName = "api_key", in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key_query", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key_query", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "http_basic_test", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP, - description = "", - scheme = "basic" ) }) @Path("/pet") @@ -64,20 +52,23 @@ public class PetApi { @POST @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "addPet", summary = "Add a new pet to the store", description = "") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - + @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class)), + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class)) }), - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "405", description = "Invalid input", content = { - + @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "405", description = "Invalid input", content = { + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"), + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response addPet(@Valid @NotNull Pet body) { + public Response addPet(@Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } @@ -89,9 +80,6 @@ public Response addPet(@Valid @NotNull Pet body) { @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "deletePet", summary = "Deletes a pet", description = "") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - - }), @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid pet value", content = { }) @@ -104,7 +92,7 @@ public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi. @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ - @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "read:pets" }) }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "findPetsByStatus", summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet") @@ -126,21 +114,21 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.mi @Path("/findByTags") @Produces({ "application/xml", "application/json" }) @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ - @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "read:pets" }) }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "findPetsByTags", summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class, type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.ARRAY , uniqueItems = true )), - @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class, type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.ARRAY , uniqueItems = true )) + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class, type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.ARRAY )), + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class, type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.ARRAY )) }), @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid tag value", content = { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"), @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") Set tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") List tags) { return Response.ok().entity("magic!").build(); } @@ -172,26 +160,31 @@ public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi @PUT @Consumes({ "application/json", "application/xml" }) + @Produces({ "application/xml", "application/json" }) @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "updatePet", summary = "Update an existing pet", description = "") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { - + @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = { + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class)), + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class)) }), - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid ID supplied", content = { - + @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid ID supplied", content = { + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"), + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }), - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "Pet not found", content = { - + @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "Pet not found", content = { + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"), + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }), - @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "405", description = "Validation exception", content = { - + @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "405", description = "Validation exception", content = { + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"), + @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response updatePet(@Valid @NotNull Pet body) { + public Response updatePet(@Valid @NotNull Pet pet) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/RestApplication.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/RestApplication.java index a0a2d08f9640..b1e246b2d1bc 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/RestApplication.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/RestApplication.java @@ -7,7 +7,7 @@ info = @org.eclipse.microprofile.openapi.annotations.info.Info( version="1.0.0" ,title = "OpenAPI Petstore" - ,description = "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\" + ,description = "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters." ,license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html") )) diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java index 8525bb57a437..d4fccc64ef6d 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java @@ -43,17 +43,6 @@ description = "", apiKeyName = "api_key", in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key_query", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key_query", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "http_basic_test", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP, - description = "", - scheme = "basic" ) }) @Path("/store") @@ -61,7 +50,7 @@ public class StoreApi { @DELETE - @Path("/order/{order_id}") + @Path("/order/{orderId}") @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "deleteOrder", summary = "Delete purchase order by ID", description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="store") @@ -73,7 +62,7 @@ public class StoreApi { }) }) - public Response deleteOrder(@PathParam("order_id") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId) { + public Response deleteOrder(@PathParam("orderId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId) { return Response.ok().entity("magic!").build(); } @@ -95,7 +84,7 @@ public Response getInventory() { } @GET - @Path("/order/{order_id}") + @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "getOrderById", summary = "Find purchase order by ID", description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions") @@ -114,12 +103,13 @@ public Response getInventory() { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId) { + public Response getOrderById(@PathParam("orderId") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId) { return Response.ok().entity("magic!").build(); } @POST @Path("/order") + @Consumes({ "application/json" }) @Produces({ "application/xml", "application/json" }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "placeOrder", summary = "Place an order for a pet", description = "") @@ -134,7 +124,7 @@ public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @org.eclip @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response placeOrder(@Valid @NotNull Order body) { + public Response placeOrder(@Valid @NotNull Order order) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java index 283308f09fbc..a82d5b29f9bb 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java @@ -43,17 +43,6 @@ description = "", apiKeyName = "api_key", in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "api_key_query", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY, - description = "", - apiKeyName = "api_key_query", - in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY - ), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme( - securitySchemeName = "http_basic_test", - type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP, - description = "", - scheme = "basic" ) }) @Path("/user") @@ -61,7 +50,10 @@ public class UserApi { @POST - + @Consumes({ "application/json" }) + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key") + }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "createUser", summary = "Create user", description = "This can only be done by the logged in user.") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { @@ -69,13 +61,16 @@ public class UserApi { }) }) - 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" }) + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key") + }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", description = "") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { @@ -83,13 +78,16 @@ public Response createUser(@Valid @NotNull User body) { }) }) - 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" }) + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key") + }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", description = "") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { @@ -97,13 +95,15 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> body }) }) - public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> body) { + public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) { return Response.ok().entity("magic!").build(); } @DELETE @Path("/{username}") - + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key") + }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "deleteUser", summary = "Delete user", description = "This can only be done by the logged in user.") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { @@ -150,6 +150,7 @@ public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.o @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { @org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", headers = { + @org.eclipse.microprofile.openapi.annotations.headers.Header(name = "Set-Cookie", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.STRING), description = "Cookie authentication key for use with the `api_key` apiKey authentication."), @org.eclipse.microprofile.openapi.annotations.headers.Header(name = "X-Rate-Limit", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.INTEGER), description = "calls per hour allowed by the user"), @org.eclipse.microprofile.openapi.annotations.headers.Header(name = "X-Expires-After", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.STRING), description = "date in UTC when token expires") }, content = { @@ -161,13 +162,15 @@ public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.o @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json") }) }) - public Response loginUser(@QueryParam("username") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password) { + public Response loginUser(@QueryParam("username") @NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password) { return Response.ok().entity("magic!").build(); } @GET @Path("/logout") - + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key") + }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "logoutUser", summary = "Logs out current logged in user session", description = "") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { @@ -181,7 +184,10 @@ public Response logoutUser() { @PUT @Path("/{username}") - + @Consumes({ "application/json" }) + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={ + @org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key") + }) @org.eclipse.microprofile.openapi.annotations.Operation(operationId = "updateUser", summary = "Updated user", description = "This can only be done by the logged in user.") @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user") @org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = { @@ -192,7 +198,7 @@ public Response logoutUser() { }) }) - public Response updateUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="name that need to be deleted") String username,@Valid @NotNull User body) { + public Response updateUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="name that need to be deleted") String username,@Valid @NotNull User user) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java deleted file mode 100644 index 6a78770dbb81..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("AdditionalPropertiesAnyType") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesAnyType extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesAnyType() { - } - - /** - **/ - public AdditionalPropertiesAnyType name(String name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Object getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.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 AdditionalPropertiesAnyType {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java deleted file mode 100644 index 480e872eabb8..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("AdditionalPropertiesArray") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesArray extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesArray() { - } - - /** - **/ - public AdditionalPropertiesArray name(String name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesArray putAdditionalProperty(String key, List value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map> getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public List getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.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 AdditionalPropertiesArray {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java deleted file mode 100644 index 2ee01f18130e..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("AdditionalPropertiesBoolean") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesBoolean extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesBoolean() { - } - - /** - **/ - public AdditionalPropertiesBoolean name(String name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Boolean getAdditionalProperty(String key) { - return this.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.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 AdditionalPropertiesBoolean {\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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java deleted file mode 100644 index 779601dd98ca..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ /dev/null @@ -1,525 +0,0 @@ -package org.openapitools.model; - -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("AdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesClass implements Serializable { - private @Valid Map mapString = new HashMap<>(); - private @Valid Map mapNumber = new HashMap<>(); - private @Valid Map mapInteger = new HashMap<>(); - private @Valid Map mapBoolean = new HashMap<>(); - private @Valid Map> mapArrayInteger = new HashMap<>(); - private @Valid Map> mapArrayAnytype = new HashMap<>(); - private @Valid Map> mapMapString = new HashMap<>(); - private @Valid Map> mapMapAnytype = new HashMap<>(); - private Object anytype1; - private Object anytype2; - private Object anytype3; - - 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; - } - - public AdditionalPropertiesClass() { - } - - /** - **/ - public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_string") - public Map getMapString() { - return mapString; - } - - @JsonProperty("map_string") - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); - } - - this.mapString.put(key, mapStringItem); - return this; - } - - public AdditionalPropertiesClass removeMapStringItem(String key) { - if (this.mapString != null) { - this.mapString.remove(key); - } - - return this; - } - /** - **/ - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_number") - @Valid public Map getMapNumber() { - return mapNumber; - } - - @JsonProperty("map_number") - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); - } - - this.mapNumber.put(key, mapNumberItem); - return this; - } - - public AdditionalPropertiesClass removeMapNumberItem(String key) { - if (this.mapNumber != null) { - this.mapNumber.remove(key); - } - - return this; - } - /** - **/ - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_integer") - public Map getMapInteger() { - return mapInteger; - } - - @JsonProperty("map_integer") - public void setMapInteger(Map 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 mapBoolean) { - this.mapBoolean = mapBoolean; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_boolean") - public Map getMapBoolean() { - return mapBoolean; - } - - @JsonProperty("map_boolean") - public void setMapBoolean(Map 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> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_array_integer") - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - @JsonProperty("map_array_integer") - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List 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> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_array_anytype") - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - @JsonProperty("map_array_anytype") - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List 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> mapMapString) { - this.mapMapString = mapMapString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_map_string") - public Map> getMapMapString() { - return mapMapString; - } - - @JsonProperty("map_map_string") - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map 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> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_map_anytype") - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - @JsonProperty("map_map_anytype") - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map 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; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @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; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @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; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @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) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - 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); - } - - @Override - public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); - } - - @Override - public String toString() { - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static AdditionalPropertiesClassBuilder builder() { - return new AdditionalPropertiesClassBuilderImpl(); - } - - private static final class AdditionalPropertiesClassBuilderImpl extends AdditionalPropertiesClassBuilder { - - @Override - protected AdditionalPropertiesClassBuilderImpl self() { - return this; - } - - @Override - public AdditionalPropertiesClass build() { - return new AdditionalPropertiesClass(this); - } - } - - public static abstract class AdditionalPropertiesClassBuilder> { - private Map mapString = new HashMap<>(); - private Map mapNumber = new HashMap<>(); - private Map mapInteger = new HashMap<>(); - private Map mapBoolean = new HashMap<>(); - private Map> mapArrayInteger = new HashMap<>(); - private Map> mapArrayAnytype = new HashMap<>(); - private Map> mapMapString = new HashMap<>(); - private Map> mapMapAnytype = new HashMap<>(); - private Object anytype1; - private Object anytype2; - private Object anytype3; - protected abstract B self(); - - public abstract C build(); - - public B mapString(Map mapString) { - this.mapString = mapString; - return self(); - } - public B mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - return self(); - } - public B mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - return self(); - } - public B mapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - return self(); - } - public B mapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return self(); - } - public B mapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return self(); - } - public B mapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - return self(); - } - public B mapMapAnytype(Map> 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; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java deleted file mode 100644 index f31e8e23b696..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("AdditionalPropertiesInteger") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesInteger extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesInteger() { - } - - /** - **/ - public AdditionalPropertiesInteger name(String name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Integer getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java deleted file mode 100644 index 5f474ec9396f..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.openapitools.model; - -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 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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("AdditionalPropertiesNumber") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesNumber extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesNumber() { - } - - /** - **/ - public AdditionalPropertiesNumber name(String name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public BigDecimal getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java deleted file mode 100644 index 4d7d70554390..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("AdditionalPropertiesObject") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesObject extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesObject() { - } - - /** - **/ - public AdditionalPropertiesObject name(String name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map> getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public Map getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java deleted file mode 100644 index 4f6409b0e009..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("AdditionalPropertiesString") -@JsonFormat(shape=JsonFormat.Shape.OBJECT) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class AdditionalPropertiesString extends HashMap implements Serializable { - private String name; - - public AdditionalPropertiesString() { - } - - /** - **/ - public AdditionalPropertiesString name(String name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * Set the additional (undeclared) property with the specified name and value. - * Creates the property if it does not already exist, otherwise replaces it. - * @param key the name of the property - * @param value the value of the property - * @return self reference - */ - @JsonAnySetter - public AdditionalPropertiesString putAdditionalProperty(String key, String value) { - this.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) properties. - * @return the additional (undeclared) properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this; - } - - /** - * Return the additional (undeclared) property with the specified name. - * @param key the name of the property - * @return the additional (undeclared) property with the specified name - */ - public String getAdditionalProperty(String key) { - return this.get(key); - } - - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Animal.java deleted file mode 100644 index 68f418e0774a..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Animal.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - -@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"), -}) - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("Animal") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Animal implements Serializable { - private String className; - private String color = "red"; - - protected Animal(AnimalBuilder b) { - this.className = b.className; - this.color = b.color; - } - - public Animal() { - } - - @JsonCreator - public Animal( - @JsonProperty(required = true, value = "className") String className - ) { - this.className = className; - } - - /** - **/ - public Animal className(String className) { - this.className = className; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "className") - @NotNull public String getClassName() { - return className; - } - - @JsonProperty(required = true, value = "className") - public void setClassName(String className) { - this.className = className; - } - - /** - **/ - public Animal color(String color) { - this.color = color; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("color") - public String getColor() { - return color; - } - - @JsonProperty("color") - public void setColor(String color) { - this.color = color; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static AnimalBuilder builder() { - return new AnimalBuilderImpl(); - } - - private static final class AnimalBuilderImpl extends AnimalBuilder { - - @Override - protected AnimalBuilderImpl self() { - return this; - } - - @Override - public Animal build() { - return new Animal(this); - } - } - - public static abstract class AnimalBuilder> { - private String className; - private String color = "red"; - protected abstract B self(); - - public abstract C build(); - - public B className(String className) { - this.className = className; - return self(); - } - public B color(String color) { - this.color = color; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java deleted file mode 100644 index ed131a46cab1..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.openapitools.model; - -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 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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("ArrayOfArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayOfArrayOfNumberOnly implements Serializable { - private @Valid List> arrayArrayNumber = new ArrayList<>(); - - protected ArrayOfArrayOfNumberOnly(ArrayOfArrayOfNumberOnlyBuilder b) { - this.arrayArrayNumber = b.arrayArrayNumber; - } - - public ArrayOfArrayOfNumberOnly() { - } - - /** - **/ - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("ArrayArrayNumber") - @Valid public List<@Valid List<@Valid BigDecimal>> getArrayArrayNumber() { - return arrayArrayNumber; - } - - @JsonProperty("ArrayArrayNumber") - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList<>(); - } - - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - public ArrayOfArrayOfNumberOnly removeArrayArrayNumberItem(List arrayArrayNumberItem) { - if (arrayArrayNumberItem != null && this.arrayArrayNumber != null) { - this.arrayArrayNumber.remove(arrayArrayNumberItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ArrayOfArrayOfNumberOnlyBuilder builder() { - return new ArrayOfArrayOfNumberOnlyBuilderImpl(); - } - - private static final class ArrayOfArrayOfNumberOnlyBuilderImpl extends ArrayOfArrayOfNumberOnlyBuilder { - - @Override - protected ArrayOfArrayOfNumberOnlyBuilderImpl self() { - return this; - } - - @Override - public ArrayOfArrayOfNumberOnly build() { - return new ArrayOfArrayOfNumberOnly(this); - } - } - - public static abstract class ArrayOfArrayOfNumberOnlyBuilder> { - private List> arrayArrayNumber = new ArrayList<>(); - protected abstract B self(); - - public abstract C build(); - - public B arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java deleted file mode 100644 index 09b3fd5d257d..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.openapitools.model; - -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 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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("ArrayOfNumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayOfNumberOnly implements Serializable { - private @Valid List arrayNumber = new ArrayList<>(); - - protected ArrayOfNumberOnly(ArrayOfNumberOnlyBuilder b) { - this.arrayNumber = b.arrayNumber; - } - - public ArrayOfNumberOnly() { - } - - /** - **/ - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("ArrayNumber") - @Valid public List<@Valid BigDecimal> getArrayNumber() { - return arrayNumber; - } - - @JsonProperty("ArrayNumber") - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } - - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList<>(); - } - - this.arrayNumber.add(arrayNumberItem); - return this; - } - - public ArrayOfNumberOnly removeArrayNumberItem(BigDecimal arrayNumberItem) { - if (arrayNumberItem != null && this.arrayNumber != null) { - this.arrayNumber.remove(arrayNumberItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ArrayOfNumberOnlyBuilder builder() { - return new ArrayOfNumberOnlyBuilderImpl(); - } - - private static final class ArrayOfNumberOnlyBuilderImpl extends ArrayOfNumberOnlyBuilder { - - @Override - protected ArrayOfNumberOnlyBuilderImpl self() { - return this; - } - - @Override - public ArrayOfNumberOnly build() { - return new ArrayOfNumberOnly(this); - } - } - - public static abstract class ArrayOfNumberOnlyBuilder> { - private List arrayNumber = new ArrayList<>(); - protected abstract B self(); - - public abstract C build(); - - public B arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayTest.java deleted file mode 100644 index 73329c54b409..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ArrayTest.java +++ /dev/null @@ -1,221 +0,0 @@ -package org.openapitools.model; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.model.ReadOnlyFirst; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("ArrayTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ArrayTest implements Serializable { - private @Valid List arrayOfString = new ArrayList<>(); - private @Valid List> arrayArrayOfInteger = new ArrayList<>(); - private @Valid List> arrayArrayOfModel = new ArrayList<>(); - - protected ArrayTest(ArrayTestBuilder b) { - this.arrayOfString = b.arrayOfString; - this.arrayArrayOfInteger = b.arrayArrayOfInteger; - this.arrayArrayOfModel = b.arrayArrayOfModel; - } - - public ArrayTest() { - } - - /** - **/ - public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("array_of_string") - public List getArrayOfString() { - return arrayOfString; - } - - @JsonProperty("array_of_string") - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList<>(); - } - - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - public ArrayTest removeArrayOfStringItem(String arrayOfStringItem) { - if (arrayOfStringItem != null && this.arrayOfString != null) { - this.arrayOfString.remove(arrayOfStringItem); - } - - return this; - } - /** - **/ - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("array_array_of_integer") - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - @JsonProperty("array_array_of_integer") - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList<>(); - } - - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - public ArrayTest removeArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (arrayArrayOfIntegerItem != null && this.arrayArrayOfInteger != null) { - this.arrayArrayOfInteger.remove(arrayArrayOfIntegerItem); - } - - return this; - } - /** - **/ - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("array_array_of_model") - @Valid public List<@Valid List<@Valid ReadOnlyFirst>> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - @JsonProperty("array_array_of_model") - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList<>(); - } - - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) { - if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) { - this.arrayArrayOfModel.remove(arrayArrayOfModelItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ArrayTestBuilder builder() { - return new ArrayTestBuilderImpl(); - } - - private static final class ArrayTestBuilderImpl extends ArrayTestBuilder { - - @Override - protected ArrayTestBuilderImpl self() { - return this; - } - - @Override - public ArrayTest build() { - return new ArrayTest(this); - } - } - - public static abstract class ArrayTestBuilder> { - private List arrayOfString = new ArrayList<>(); - private List> arrayArrayOfInteger = new ArrayList<>(); - private List> arrayArrayOfModel = new ArrayList<>(); - protected abstract B self(); - - public abstract C build(); - - public B arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - return self(); - } - public B arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - return self(); - } - public B arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/BigCat.java deleted file mode 100644 index b16e4344cbd5..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/BigCat.java +++ /dev/null @@ -1,169 +0,0 @@ -package org.openapitools.model; - -import org.openapitools.model.Cat; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("BigCat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - 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() { - } - - @JsonCreator - public BigCat( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - public BigCat kind(KindEnum kind) { - this.kind = kind; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static BigCatBuilder builder() { - return new BigCatBuilderImpl(); - } - - private static final class BigCatBuilderImpl extends BigCatBuilder { - - @Override - protected BigCatBuilderImpl self() { - return this; - } - - @Override - public BigCat build() { - return new BigCat(this); - } - } - - public static abstract class BigCatBuilder> extends CatBuilder { - private KindEnum kind; - - public B kind(KindEnum kind) { - this.kind = kind; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Capitalization.java deleted file mode 100644 index 471d885ad378..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Capitalization.java +++ /dev/null @@ -1,254 +0,0 @@ -package org.openapitools.model; - -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("Capitalization") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Capitalization implements Serializable { - private String smallCamel; - private String capitalCamel; - private String smallSnake; - private String capitalSnake; - private String scAETHFlowPoints; - private String ATT_NAME; - - protected Capitalization(CapitalizationBuilder b) { - this.smallCamel = b.smallCamel; - this.capitalCamel = b.capitalCamel; - this.smallSnake = b.smallSnake; - this.capitalSnake = b.capitalSnake; - this.scAETHFlowPoints = b.scAETHFlowPoints; - this.ATT_NAME = b.ATT_NAME; - } - - public Capitalization() { - } - - /** - **/ - public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("smallCamel") - public String getSmallCamel() { - return smallCamel; - } - - @JsonProperty("smallCamel") - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - /** - **/ - public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("CapitalCamel") - public String getCapitalCamel() { - return capitalCamel; - } - - @JsonProperty("CapitalCamel") - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - /** - **/ - public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("small_Snake") - public String getSmallSnake() { - return smallSnake; - } - - @JsonProperty("small_Snake") - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - /** - **/ - public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("Capital_Snake") - public String getCapitalSnake() { - return capitalSnake; - } - - @JsonProperty("Capital_Snake") - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - /** - **/ - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("SCA_ETH_Flow_Points") - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - @JsonProperty("SCA_ETH_Flow_Points") - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - /** - * Name of the pet - **/ - public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "Name of the pet ") - @JsonProperty("ATT_NAME") - public String getATTNAME() { - return ATT_NAME; - } - - @JsonProperty("ATT_NAME") - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static CapitalizationBuilder builder() { - return new CapitalizationBuilderImpl(); - } - - private static final class CapitalizationBuilderImpl extends CapitalizationBuilder { - - @Override - protected CapitalizationBuilderImpl self() { - return this; - } - - @Override - public Capitalization build() { - return new Capitalization(this); - } - } - - public static abstract class CapitalizationBuilder> { - private String smallCamel; - private String capitalCamel; - private String smallSnake; - private String capitalSnake; - private String scAETHFlowPoints; - private String ATT_NAME; - protected abstract B self(); - - public abstract C build(); - - public B smallCamel(String smallCamel) { - this.smallCamel = smallCamel; - return self(); - } - public B capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - return self(); - } - public B smallSnake(String smallSnake) { - this.smallSnake = smallSnake; - return self(); - } - public B capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - return self(); - } - public B scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - return self(); - } - public B ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Cat.java deleted file mode 100644 index 8cf339ab4504..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Cat.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.openapitools.model; - -import org.openapitools.model.Animal; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("Cat") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Cat extends Animal implements Serializable { - private Boolean declawed; - - protected Cat(CatBuilder b) { - super(b); - this.declawed = b.declawed; - } - - public Cat() { - } - - @JsonCreator - public Cat( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - public Cat declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty("declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static CatBuilder builder() { - return new CatBuilderImpl(); - } - - private static final class CatBuilderImpl extends CatBuilder { - - @Override - protected CatBuilderImpl self() { - return this; - } - - @Override - public Cat build() { - return new Cat(this); - } - } - - public static abstract class CatBuilder> extends AnimalBuilder { - private Boolean declawed; - - public B declawed(Boolean declawed) { - this.declawed = declawed; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Category.java index e16c8904e0c1..bc3c118f141b 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Category.java @@ -11,14 +11,16 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; +/** + * A category for a pet + **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") +@org.eclipse.microprofile.openapi.annotations.media.Schema(title="Pet category", description="A category for a pet") @JsonTypeName("Category") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Category implements Serializable { private Long id; - private String name = "default-name"; + private String name; protected Category(CategoryBuilder b) { this.id = b.id; @@ -28,13 +30,6 @@ protected Category(CategoryBuilder b) { public Category() { } - @JsonCreator - public Category( - @JsonProperty(required = true, value = "name") String name - ) { - this.name = name; - } - /** **/ public Category id(Long id) { @@ -62,13 +57,13 @@ public Category name(String name) { } - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "name") - @NotNull public String getName() { + @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") + @JsonProperty("name") + @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")public String getName() { return name; } - @JsonProperty(required = true, value = "name") + @JsonProperty("name") public void setName(String name) { this.name = name; } @@ -131,7 +126,7 @@ public Category build() { public static abstract class CategoryBuilder> { private Long id; - private String name = "default-name"; + private String name; protected abstract B self(); public abstract C build(); diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ClassModel.java deleted file mode 100644 index d83c0ca48c1d..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ClassModel.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.openapitools.model; - -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model with \"_class\" property - **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="Model for testing model with \"_class\" property") -@JsonTypeName("ClassModel") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ClassModel implements Serializable { - private String propertyClass; - - protected ClassModel(ClassModelBuilder b) { - this.propertyClass = b.propertyClass; - } - - public ClassModel() { - } - - /** - **/ - public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("_class") - public String getPropertyClass() { - return propertyClass; - } - - @JsonProperty("_class") - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ClassModelBuilder builder() { - return new ClassModelBuilderImpl(); - } - - private static final class ClassModelBuilderImpl extends ClassModelBuilder { - - @Override - protected ClassModelBuilderImpl self() { - return this; - } - - @Override - public ClassModel build() { - return new ClassModel(this); - } - } - - public static abstract class ClassModelBuilder> { - private String propertyClass; - protected abstract B self(); - - public abstract C build(); - - public B propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Client.java deleted file mode 100644 index 166e7c27026e..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Client.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.openapitools.model; - -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("Client") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Client implements Serializable { - private String client; - - protected Client(ClientBuilder b) { - this.client = b.client; - } - - public Client() { - } - - /** - **/ - public Client client(String client) { - this.client = client; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("client") - public String getClient() { - return client; - } - - @JsonProperty("client") - public void setClient(String client) { - this.client = client; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); - } - - @Override - public int hashCode() { - return Objects.hash(client); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - - sb.append(" client: ").append(toIndentedString(client)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ClientBuilder builder() { - return new ClientBuilderImpl(); - } - - private static final class ClientBuilderImpl extends ClientBuilder { - - @Override - protected ClientBuilderImpl self() { - return this; - } - - @Override - public Client build() { - return new Client(this); - } - } - - public static abstract class ClientBuilder> { - private String client; - protected abstract B self(); - - public abstract C build(); - - public B client(String client) { - this.client = client; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Dog.java deleted file mode 100644 index c5eb8135f064..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Dog.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.openapitools.model; - -import org.openapitools.model.Animal; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("Dog") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Dog extends Animal implements Serializable { - private String breed; - - protected Dog(DogBuilder b) { - super(b); - this.breed = b.breed; - } - - public Dog() { - } - - @JsonCreator - public Dog( - @JsonProperty(required = true, value = "className") String className - ) { - super( - className - ); - } - - /** - **/ - public Dog breed(String breed) { - this.breed = breed; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - @JsonProperty("breed") - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static DogBuilder builder() { - return new DogBuilderImpl(); - } - - private static final class DogBuilderImpl extends DogBuilder { - - @Override - protected DogBuilderImpl self() { - return this; - } - - @Override - public Dog build() { - return new Dog(this); - } - } - - public static abstract class DogBuilder> extends AnimalBuilder { - private String breed; - - public B breed(String breed) { - this.breed = breed; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumArrays.java deleted file mode 100644 index 5e0cf4557376..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumArrays.java +++ /dev/null @@ -1,254 +0,0 @@ -package org.openapitools.model; - -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 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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("EnumArrays") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class EnumArrays implements Serializable { - public enum JustSymbolEnum { - - GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$")); - - - private String value; - - JustSymbolEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static JustSymbolEnum fromString(String s) { - for (JustSymbolEnum b : JustSymbolEnum.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 JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private JustSymbolEnum justSymbol; - public enum ArrayEnumEnum { - - FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); - - - private String value; - - ArrayEnumEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static ArrayEnumEnum fromString(String s) { - for (ArrayEnumEnum b : ArrayEnumEnum.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 ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid List arrayEnum = new ArrayList<>(); - - protected EnumArrays(EnumArraysBuilder b) { - this.justSymbol = b.justSymbol; - this.arrayEnum = b.arrayEnum; - } - - public EnumArrays() { - } - - /** - **/ - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("just_symbol") - public JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - @JsonProperty("just_symbol") - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - /** - **/ - public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("array_enum") - public List getArrayEnum() { - return arrayEnum; - } - - @JsonProperty("array_enum") - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList<>(); - } - - this.arrayEnum.add(arrayEnumItem); - return this; - } - - public EnumArrays removeArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (arrayEnumItem != null && this.arrayEnum != null) { - this.arrayEnum.remove(arrayEnumItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static EnumArraysBuilder builder() { - return new EnumArraysBuilderImpl(); - } - - private static final class EnumArraysBuilderImpl extends EnumArraysBuilder { - - @Override - protected EnumArraysBuilderImpl self() { - return this; - } - - @Override - public EnumArrays build() { - return new EnumArrays(this); - } - } - - public static abstract class EnumArraysBuilder> { - private JustSymbolEnum justSymbol; - private List arrayEnum = new ArrayList<>(); - protected abstract B self(); - - public abstract C build(); - - public B justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - return self(); - } - public B arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumClass.java deleted file mode 100644 index f4b14d298a7d..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumClass.java +++ /dev/null @@ -1,60 +0,0 @@ -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 EnumClass - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public enum EnumClass { - - _ABC("_abc"), - - _EFG("-efg"), - - _XYZ_("(xyz)"); - - private String value; - - EnumClass(String value) { - this.value = value; - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumClass fromString(String s) { - for (EnumClass b : EnumClass.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 EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumTest.java deleted file mode 100644 index 5adc224226ff..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/EnumTest.java +++ /dev/null @@ -1,422 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.model.OuterEnum; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("Enum_Test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class EnumTest implements Serializable { - public enum EnumStringEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); - - - private String value; - - EnumStringEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumStringEnum fromString(String s) { - for (EnumStringEnum b : EnumStringEnum.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 EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumStringEnum enumString; - public enum EnumStringRequiredEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); - - - private String value; - - EnumStringRequiredEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumStringRequiredEnum fromString(String s) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.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 EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumStringRequiredEnum enumStringRequired; - public enum EnumIntegerEnum { - - NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); - - - private Integer value; - - EnumIntegerEnum (Integer v) { - value = v; - } - - public Integer value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into Integer, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumIntegerEnum fromString(String s) { - for (EnumIntegerEnum b : EnumIntegerEnum.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 EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumIntegerEnum enumInteger; - public enum EnumNumberEnum { - - NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); - - - private Double value; - - EnumNumberEnum (Double v) { - value = v; - } - - public Double value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into Double, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static EnumNumberEnum fromString(String s) { - for (EnumNumberEnum b : EnumNumberEnum.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 EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private EnumNumberEnum enumNumber; - private OuterEnum outerEnum; - - protected EnumTest(EnumTestBuilder b) { - this.enumString = b.enumString; - this.enumStringRequired = b.enumStringRequired; - this.enumInteger = b.enumInteger; - this.enumNumber = b.enumNumber; - this.outerEnum = b.outerEnum; - } - - public EnumTest() { - } - - @JsonCreator - public EnumTest( - @JsonProperty(required = true, value = "enum_string_required") EnumStringRequiredEnum enumStringRequired - ) { - this.enumStringRequired = enumStringRequired; - } - - /** - **/ - public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("enum_string") - public EnumStringEnum getEnumString() { - return enumString; - } - - @JsonProperty("enum_string") - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - /** - **/ - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "enum_string_required") - @NotNull public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - @JsonProperty(required = true, value = "enum_string_required") - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - /** - **/ - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("enum_integer") - public EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - @JsonProperty("enum_integer") - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - /** - **/ - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("enum_number") - public EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - @JsonProperty("enum_number") - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - /** - **/ - public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("outerEnum") - public OuterEnum getOuterEnum() { - return outerEnum; - } - - @JsonProperty("outerEnum") - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static EnumTestBuilder builder() { - return new EnumTestBuilderImpl(); - } - - private static final class EnumTestBuilderImpl extends EnumTestBuilder { - - @Override - protected EnumTestBuilderImpl self() { - return this; - } - - @Override - public EnumTest build() { - return new EnumTest(this); - } - } - - public static abstract class EnumTestBuilder> { - private EnumStringEnum enumString; - private EnumStringRequiredEnum enumStringRequired; - private EnumIntegerEnum enumInteger; - private EnumNumberEnum enumNumber; - private OuterEnum outerEnum; - protected abstract B self(); - - public abstract C build(); - - public B enumString(EnumStringEnum enumString) { - this.enumString = enumString; - return self(); - } - public B enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - return self(); - } - public B enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - return self(); - } - public B enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - return self(); - } - public B outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FileSchemaTestClass.java deleted file mode 100644 index 468a2a49004a..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.openapitools.model; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.model.ModelFile; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("FileSchemaTestClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class FileSchemaTestClass implements Serializable { - private ModelFile _file; - private @Valid List<@Valid ModelFile> files = new ArrayList<>(); - - protected FileSchemaTestClass(FileSchemaTestClassBuilder b) { - this._file = b._file; - this.files = b.files; - } - - public FileSchemaTestClass() { - } - - /** - **/ - public FileSchemaTestClass _file(ModelFile _file) { - this._file = _file; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("file") - @Valid public ModelFile getFile() { - return _file; - } - - @JsonProperty("file") - public void setFile(ModelFile _file) { - this._file = _file; - } - - /** - **/ - public FileSchemaTestClass files(List<@Valid ModelFile> files) { - this.files = files; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("files") - @Valid public List<@Valid ModelFile> getFiles() { - return files; - } - - @JsonProperty("files") - public void setFiles(List<@Valid ModelFile> files) { - this.files = files; - } - - public FileSchemaTestClass addFilesItem(ModelFile filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - - this.files.add(filesItem); - return this; - } - - public FileSchemaTestClass removeFilesItem(ModelFile filesItem) { - if (filesItem != null && this.files != null) { - this.files.remove(filesItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(_file, files); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - - sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static FileSchemaTestClassBuilder builder() { - return new FileSchemaTestClassBuilderImpl(); - } - - private static final class FileSchemaTestClassBuilderImpl extends FileSchemaTestClassBuilder { - - @Override - protected FileSchemaTestClassBuilderImpl self() { - return this; - } - - @Override - public FileSchemaTestClass build() { - return new FileSchemaTestClass(this); - } - } - - public static abstract class FileSchemaTestClassBuilder> { - private ModelFile _file; - private List files = new ArrayList<>(); - protected abstract B self(); - - public abstract C build(); - - public B _file(ModelFile _file) { - this._file = _file; - return self(); - } - public B files(List files) { - this.files = files; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FormatTest.java deleted file mode 100644 index 37e43f78e3e1..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/FormatTest.java +++ /dev/null @@ -1,507 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.File; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.Arrays; -import java.util.UUID; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("format_test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class FormatTest implements Serializable { - private Integer integer; - private Integer int32; - private Long int64; - private BigDecimal number; - private Float _float; - private Double _double; - private String string; - private byte[] _byte; - private File binary; - private LocalDate date; - private LocalDateTime dateTime; - private UUID uuid; - private String password; - private BigDecimal bigDecimal; - - protected FormatTest(FormatTestBuilder b) { - this.integer = b.integer; - this.int32 = b.int32; - this.int64 = b.int64; - this.number = b.number; - this._float = b._float; - this._double = b._double; - this.string = b.string; - this._byte = b._byte; - this.binary = b.binary; - this.date = b.date; - this.dateTime = b.dateTime; - this.uuid = b.uuid; - this.password = b.password; - this.bigDecimal = b.bigDecimal; - } - - public FormatTest() { - } - - @JsonCreator - public FormatTest( - @JsonProperty(required = true, value = "number") BigDecimal number, - @JsonProperty(required = true, value = "byte") byte[] _byte, - @JsonProperty(required = true, value = "date") LocalDate date, - @JsonProperty(required = true, value = "password") String password - ) { - this.number = number; - this._byte = _byte; - this.date = date; - this.password = password; - } - - /** - * minimum: 10 - * maximum: 100 - **/ - public FormatTest integer(Integer integer) { - this.integer = integer; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("integer") - @Min(10) @Max(100)public Integer getInteger() { - return integer; - } - - @JsonProperty("integer") - public void setInteger(Integer integer) { - this.integer = integer; - } - - /** - * minimum: 20 - * maximum: 200 - **/ - public FormatTest int32(Integer int32) { - this.int32 = int32; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("int32") - @Min(20) @Max(200)public Integer getInt32() { - return int32; - } - - @JsonProperty("int32") - public void setInt32(Integer int32) { - this.int32 = int32; - } - - /** - **/ - public FormatTest int64(Long int64) { - this.int64 = int64; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("int64") - public Long getInt64() { - return int64; - } - - @JsonProperty("int64") - public void setInt64(Long int64) { - this.int64 = int64; - } - - /** - * minimum: 32.1 - * maximum: 543.2 - **/ - public FormatTest number(BigDecimal number) { - this.number = number; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "number") - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")public BigDecimal getNumber() { - return number; - } - - @JsonProperty(required = true, value = "number") - public void setNumber(BigDecimal number) { - this.number = number; - } - - /** - * minimum: 54.3 - * maximum: 987.6 - **/ - public FormatTest _float(Float _float) { - this._float = _float; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("float") - @DecimalMin("54.3") @DecimalMax("987.6")public Float getFloat() { - return _float; - } - - @JsonProperty("float") - public void setFloat(Float _float) { - this._float = _float; - } - - /** - * minimum: 67.8 - * maximum: 123.4 - **/ - public FormatTest _double(Double _double) { - this._double = _double; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("double") - @DecimalMin("67.8") @DecimalMax("123.4")public Double getDouble() { - return _double; - } - - @JsonProperty("double") - public void setDouble(Double _double) { - this._double = _double; - } - - /** - **/ - public FormatTest string(String string) { - this.string = string; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("string") - @Pattern(regexp="/[a-z]/i")public String getString() { - return string; - } - - @JsonProperty("string") - public void setString(String string) { - this.string = string; - } - - /** - **/ - public FormatTest _byte(byte[] _byte) { - this._byte = _byte; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "byte") - @NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")public byte[] getByte() { - return _byte; - } - - @JsonProperty(required = true, value = "byte") - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - /** - **/ - public FormatTest binary(File binary) { - this.binary = binary; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("binary") - public File getBinary() { - return binary; - } - - @JsonProperty("binary") - public void setBinary(File binary) { - this.binary = binary; - } - - /** - **/ - public FormatTest date(LocalDate date) { - this.date = date; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "date") - @NotNull public LocalDate getDate() { - return date; - } - - @JsonProperty(required = true, value = "date") - public void setDate(LocalDate date) { - this.date = date; - } - - /** - **/ - public FormatTest dateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("dateTime") - public LocalDateTime getDateTime() { - return dateTime; - } - - @JsonProperty("dateTime") - public void setDateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - } - - /** - **/ - public FormatTest uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", description = "") - @JsonProperty("uuid") - public UUID getUuid() { - return uuid; - } - - @JsonProperty("uuid") - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - /** - **/ - public FormatTest password(String password) { - this.password = password; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "password") - @NotNull @Size(min=10,max=64)public String getPassword() { - return password; - } - - @JsonProperty(required = true, value = "password") - public void setPassword(String password) { - this.password = password; - } - - /** - **/ - public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("BigDecimal") - @Valid public BigDecimal getBigDecimal() { - return bigDecimal; - } - - @JsonProperty("BigDecimal") - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - 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(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - 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("}"); - 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static FormatTestBuilder builder() { - return new FormatTestBuilderImpl(); - } - - private static final class FormatTestBuilderImpl extends FormatTestBuilder { - - @Override - protected FormatTestBuilderImpl self() { - return this; - } - - @Override - public FormatTest build() { - return new FormatTest(this); - } - } - - public static abstract class FormatTestBuilder> { - private Integer integer; - private Integer int32; - private Long int64; - private BigDecimal number; - private Float _float; - private Double _double; - private String string; - private byte[] _byte; - private File binary; - private LocalDate date; - private LocalDateTime dateTime; - private UUID uuid; - private String password; - private BigDecimal bigDecimal; - protected abstract B self(); - - public abstract C build(); - - public B integer(Integer integer) { - this.integer = integer; - return self(); - } - public B int32(Integer int32) { - this.int32 = int32; - return self(); - } - public B int64(Long int64) { - this.int64 = int64; - return self(); - } - public B number(BigDecimal number) { - this.number = number; - return self(); - } - public B _float(Float _float) { - this._float = _float; - return self(); - } - public B _double(Double _double) { - this._double = _double; - return self(); - } - public B string(String string) { - this.string = string; - return self(); - } - public B _byte(byte[] _byte) { - this._byte = _byte; - return self(); - } - public B binary(File binary) { - this.binary = binary; - return self(); - } - public B date(LocalDate date) { - this.date = date; - return self(); - } - public B dateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - return self(); - } - public B uuid(UUID uuid) { - this.uuid = uuid; - return self(); - } - public B password(String password) { - this.password = password; - return self(); - } - public B bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java deleted file mode 100644 index 18eea9771f95..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ /dev/null @@ -1,142 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("hasOnlyReadOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class HasOnlyReadOnly implements Serializable { - private String bar; - private String foo; - - protected HasOnlyReadOnly(HasOnlyReadOnlyBuilder b) { - this.bar = b.bar; - this.foo = b.foo; - } - - public HasOnlyReadOnly() { - } - - /** - **/ - public HasOnlyReadOnly bar(String bar) { - this.bar = bar; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("bar") - public void setBar(String bar) { - this.bar = bar; - } - - /** - **/ - public HasOnlyReadOnly foo(String foo) { - this.foo = foo; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("foo") - public void setFoo(String foo) { - this.foo = foo; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static HasOnlyReadOnlyBuilder builder() { - return new HasOnlyReadOnlyBuilderImpl(); - } - - private static final class HasOnlyReadOnlyBuilderImpl extends HasOnlyReadOnlyBuilder { - - @Override - protected HasOnlyReadOnlyBuilderImpl self() { - return this; - } - - @Override - public HasOnlyReadOnly build() { - return new HasOnlyReadOnly(this); - } - } - - public static abstract class HasOnlyReadOnlyBuilder> { - private String bar; - private String foo; - protected abstract B self(); - - public abstract C build(); - - public B bar(String bar) { - this.bar = bar; - return self(); - } - public B foo(String foo) { - this.foo = foo; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/MapTest.java deleted file mode 100644 index 78f11b2a696f..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/MapTest.java +++ /dev/null @@ -1,310 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.Map; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("MapTest") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class MapTest implements Serializable { - private @Valid Map> mapMapOfString = new HashMap<>(); - public enum InnerEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); - - - private String value; - - InnerEnum (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 - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static InnerEnum fromString(String s) { - for (InnerEnum b : InnerEnum.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 InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid Map mapOfEnumString = new HashMap<>(); - private @Valid Map directMap = new HashMap<>(); - private @Valid Map indirectMap = new HashMap<>(); - - protected MapTest(MapTestBuilder b) { - this.mapMapOfString = b.mapMapOfString; - this.mapOfEnumString = b.mapOfEnumString; - this.directMap = b.directMap; - this.indirectMap = b.indirectMap; - } - - public MapTest() { - } - - /** - **/ - public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_map_of_string") - public Map> getMapMapOfString() { - return mapMapOfString; - } - - @JsonProperty("map_map_of_string") - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap<>(); - } - - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - public MapTest removeMapMapOfStringItem(String key) { - if (this.mapMapOfString != null) { - this.mapMapOfString.remove(key); - } - - return this; - } - /** - **/ - public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - @JsonProperty("map_of_enum_string") - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap<>(); - } - - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - public MapTest removeMapOfEnumStringItem(String key) { - if (this.mapOfEnumString != null) { - this.mapOfEnumString.remove(key); - } - - return this; - } - /** - **/ - public MapTest directMap(Map directMap) { - this.directMap = directMap; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("direct_map") - public Map getDirectMap() { - return directMap; - } - - @JsonProperty("direct_map") - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap<>(); - } - - this.directMap.put(key, directMapItem); - return this; - } - - public MapTest removeDirectMapItem(String key) { - if (this.directMap != null) { - this.directMap.remove(key); - } - - return this; - } - /** - **/ - public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("indirect_map") - public Map getIndirectMap() { - return indirectMap; - } - - @JsonProperty("indirect_map") - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap<>(); - } - - this.indirectMap.put(key, indirectMapItem); - return this; - } - - public MapTest removeIndirectMapItem(String key) { - if (this.indirectMap != null) { - this.indirectMap.remove(key); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static MapTestBuilder builder() { - return new MapTestBuilderImpl(); - } - - private static final class MapTestBuilderImpl extends MapTestBuilder { - - @Override - protected MapTestBuilderImpl self() { - return this; - } - - @Override - public MapTest build() { - return new MapTest(this); - } - } - - public static abstract class MapTestBuilder> { - private Map> mapMapOfString = new HashMap<>(); - private Map mapOfEnumString = new HashMap<>(); - private Map directMap = new HashMap<>(); - private Map indirectMap = new HashMap<>(); - protected abstract B self(); - - public abstract C build(); - - public B mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - return self(); - } - public B mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - return self(); - } - public B directMap(Map directMap) { - this.directMap = directMap; - return self(); - } - public B indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java deleted file mode 100644 index 91c9114c1f1b..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ /dev/null @@ -1,190 +0,0 @@ -package org.openapitools.model; - -import java.time.LocalDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.openapitools.model.Animal; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { - private UUID uuid; - private LocalDateTime dateTime; - private @Valid Map map = new HashMap<>(); - - protected MixedPropertiesAndAdditionalPropertiesClass(MixedPropertiesAndAdditionalPropertiesClassBuilder b) { - this.uuid = b.uuid; - this.dateTime = b.dateTime; - this.map = b.map; - } - - public MixedPropertiesAndAdditionalPropertiesClass() { - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("uuid") - public UUID getUuid() { - return uuid; - } - - @JsonProperty("uuid") - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass dateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("dateTime") - public LocalDateTime getDateTime() { - return dateTime; - } - - @JsonProperty("dateTime") - public void setDateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - } - - /** - **/ - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("map") - @Valid public Map getMap() { - return map; - } - - @JsonProperty("map") - public void setMap(Map map) { - this.map = map; - } - - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - if (this.map == null) { - this.map = new HashMap<>(); - } - - this.map.put(key, mapItem); - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClass removeMapItem(String key) { - if (this.map != null) { - this.map.remove(key); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static MixedPropertiesAndAdditionalPropertiesClassBuilder builder() { - return new MixedPropertiesAndAdditionalPropertiesClassBuilderImpl(); - } - - private static final class MixedPropertiesAndAdditionalPropertiesClassBuilderImpl extends MixedPropertiesAndAdditionalPropertiesClassBuilder { - - @Override - protected MixedPropertiesAndAdditionalPropertiesClassBuilderImpl self() { - return this; - } - - @Override - public MixedPropertiesAndAdditionalPropertiesClass build() { - return new MixedPropertiesAndAdditionalPropertiesClass(this); - } - } - - public static abstract class MixedPropertiesAndAdditionalPropertiesClassBuilder> { - private UUID uuid; - private LocalDateTime dateTime; - private Map map = new HashMap<>(); - protected abstract B self(); - - public abstract C build(); - - public B uuid(UUID uuid) { - this.uuid = uuid; - return self(); - } - public B dateTime(LocalDateTime dateTime) { - this.dateTime = dateTime; - return self(); - } - public B map(Map map) { - this.map = map; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Model200Response.java deleted file mode 100644 index 1582099fc497..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Model200Response.java +++ /dev/null @@ -1,144 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model name starting with number - **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="Model for testing model name starting with number") -@JsonTypeName("200_response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Model200Response implements Serializable { - private Integer name; - private String propertyClass; - - protected Model200Response(Model200ResponseBuilder b) { - this.name = b.name; - this.propertyClass = b.propertyClass; - } - - public Model200Response() { - } - - /** - **/ - public Model200Response name(Integer name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name") - public Integer getName() { - return name; - } - - @JsonProperty("name") - public void setName(Integer name) { - this.name = name; - } - - /** - **/ - public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("class") - public String getPropertyClass() { - return propertyClass; - } - - @JsonProperty("class") - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static Model200ResponseBuilder builder() { - return new Model200ResponseBuilderImpl(); - } - - private static final class Model200ResponseBuilderImpl extends Model200ResponseBuilder { - - @Override - protected Model200ResponseBuilderImpl self() { - return this; - } - - @Override - public Model200Response build() { - return new Model200Response(this); - } - } - - public static abstract class Model200ResponseBuilder> { - private Integer name; - private String propertyClass; - protected abstract B self(); - - public abstract C build(); - - public B name(Integer name) { - this.name = name; - return self(); - } - public B propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelApiResponse.java index 02f6e6282dc2..bbf5561c2133 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; +/** + * Describes the result of uploading an image resource + **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") +@org.eclipse.microprofile.openapi.annotations.media.Schema(title="An uploaded response", description="Describes the result of uploading an image resource") @JsonTypeName("ApiResponse") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class ModelApiResponse implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelFile.java deleted file mode 100644 index 4a87206729ef..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelFile.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Must be named `File` for test. - **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="Must be named `File` for test.") -@JsonTypeName("File") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelFile implements Serializable { - private String sourceURI; - - protected ModelFile(ModelFileBuilder b) { - this.sourceURI = b.sourceURI; - } - - public ModelFile() { - } - - /** - * Test capitalization - **/ - public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "Test capitalization") - @JsonProperty("sourceURI") - public String getSourceURI() { - return sourceURI; - } - - @JsonProperty("sourceURI") - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelFile {\n"); - - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ModelFileBuilder builder() { - return new ModelFileBuilderImpl(); - } - - private static final class ModelFileBuilderImpl extends ModelFileBuilder { - - @Override - protected ModelFileBuilderImpl self() { - return this; - } - - @Override - public ModelFile build() { - return new ModelFile(this); - } - } - - public static abstract class ModelFileBuilder> { - private String sourceURI; - protected abstract B self(); - - public abstract C build(); - - public B sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelList.java deleted file mode 100644 index 8a2b949a85dd..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelList.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("List") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelList implements Serializable { - private String _123list; - - protected ModelList(ModelListBuilder b) { - this._123list = b._123list; - } - - public ModelList() { - } - - /** - **/ - public ModelList _123list(String _123list) { - this._123list = _123list; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("123-list") - public String get123list() { - return _123list; - } - - @JsonProperty("123-list") - public void set123list(String _123list) { - this._123list = _123list; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); - } - - @Override - public int hashCode() { - return Objects.hash(_123list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelList {\n"); - - sb.append(" _123list: ").append(toIndentedString(_123list)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ModelListBuilder builder() { - return new ModelListBuilderImpl(); - } - - private static final class ModelListBuilderImpl extends ModelListBuilder { - - @Override - protected ModelListBuilderImpl self() { - return this; - } - - @Override - public ModelList build() { - return new ModelList(this); - } - } - - public static abstract class ModelListBuilder> { - private String _123list; - protected abstract B self(); - - public abstract C build(); - - public B _123list(String _123list) { - this._123list = _123list; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelReturn.java deleted file mode 100644 index b0614e9ae358..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ModelReturn.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing reserved words - **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="Model for testing reserved words") -@JsonTypeName("Return") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ModelReturn implements Serializable { - private Integer _return; - - protected ModelReturn(ModelReturnBuilder b) { - this._return = b._return; - } - - public ModelReturn() { - } - - /** - **/ - public ModelReturn _return(Integer _return) { - this._return = _return; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("return") - public Integer getReturn() { - return _return; - } - - @JsonProperty("return") - public void setReturn(Integer _return) { - this._return = _return; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); - } - - @Override - public int hashCode() { - return Objects.hash(_return); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - - sb.append(" _return: ").append(toIndentedString(_return)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ModelReturnBuilder builder() { - return new ModelReturnBuilderImpl(); - } - - private static final class ModelReturnBuilderImpl extends ModelReturnBuilder { - - @Override - protected ModelReturnBuilderImpl self() { - return this; - } - - @Override - public ModelReturn build() { - return new ModelReturn(this); - } - } - - public static abstract class ModelReturnBuilder> { - private Integer _return; - protected abstract B self(); - - public abstract C build(); - - public B _return(Integer _return) { - this._return = _return; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Name.java deleted file mode 100644 index f35ee17ddb3b..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Name.java +++ /dev/null @@ -1,206 +0,0 @@ -package org.openapitools.model; - -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Model for testing model name same as property name - **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="Model for testing model name same as property name") -@JsonTypeName("Name") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class Name implements Serializable { - private Integer name; - private Integer snakeCase; - private String property; - private Integer _123number; - - protected Name(NameBuilder b) { - this.name = b.name; - this.snakeCase = b.snakeCase; - this.property = b.property; - this._123number = b._123number; - } - - public Name() { - } - - @JsonCreator - public Name( - @JsonProperty(required = true, value = "name") Integer name - ) { - this.name = name; - } - - /** - **/ - public Name name(Integer name) { - this.name = name; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "name") - @NotNull public Integer getName() { - return name; - } - - @JsonProperty(required = true, value = "name") - public void setName(Integer name) { - this.name = name; - } - - /** - **/ - public Name snakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("snake_case") - public Integer getSnakeCase() { - return snakeCase; - } - - @JsonProperty("snake_case") - public void setSnakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - } - - /** - **/ - public Name property(String property) { - this.property = property; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("property") - public String getProperty() { - return property; - } - - @JsonProperty("property") - public void setProperty(String property) { - this.property = property; - } - - /** - **/ - public Name _123number(Integer _123number) { - this._123number = _123number; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("123Number") - public Integer get123number() { - return _123number; - } - - @JsonProperty("123Number") - public void set123number(Integer _123number) { - this._123number = _123number; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static NameBuilder builder() { - return new NameBuilderImpl(); - } - - private static final class NameBuilderImpl extends NameBuilder { - - @Override - protected NameBuilderImpl self() { - return this; - } - - @Override - public Name build() { - return new Name(this); - } - } - - public static abstract class NameBuilder> { - private Integer name; - private Integer snakeCase; - private String property; - private Integer _123number; - protected abstract B self(); - - public abstract C build(); - - public B name(Integer name) { - this.name = name; - return self(); - } - public B snakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - return self(); - } - public B property(String property) { - this.property = property; - return self(); - } - public B _123number(Integer _123number) { - this._123number = _123number; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/NumberOnly.java deleted file mode 100644 index 8a495ef849f5..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/NumberOnly.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.openapitools.model; - -import java.math.BigDecimal; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("NumberOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class NumberOnly implements Serializable { - private BigDecimal justNumber; - - protected NumberOnly(NumberOnlyBuilder b) { - this.justNumber = b.justNumber; - } - - public NumberOnly() { - } - - /** - **/ - public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("JustNumber") - @Valid public BigDecimal getJustNumber() { - return justNumber; - } - - @JsonProperty("JustNumber") - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - - @Override - public int hashCode() { - return Objects.hash(justNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - - sb.append(" justNumber: ").append(toIndentedString(justNumber)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static NumberOnlyBuilder builder() { - return new NumberOnlyBuilderImpl(); - } - - private static final class NumberOnlyBuilderImpl extends NumberOnlyBuilder { - - @Override - protected NumberOnlyBuilderImpl self() { - return this; - } - - @Override - public NumberOnly build() { - return new NumberOnly(this); - } - } - - public static abstract class NumberOnlyBuilder> { - private BigDecimal justNumber; - protected abstract B self(); - - public abstract C build(); - - public B justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Order.java index 634fe5bbee3f..81c9f29a38e7 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Order.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; +/** + * An order for a pets from the pet store + **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") +@org.eclipse.microprofile.openapi.annotations.media.Schema(title="Pet Order", description="An order for a pets from the pet store") @JsonTypeName("Order") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Order implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/OuterComposite.java deleted file mode 100644 index 8b4f4f954bf8..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/OuterComposite.java +++ /dev/null @@ -1,170 +0,0 @@ -package org.openapitools.model; - -import java.math.BigDecimal; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("OuterComposite") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class OuterComposite implements Serializable { - private BigDecimal myNumber; - private String myString; - private Boolean myBoolean; - - protected OuterComposite(OuterCompositeBuilder b) { - this.myNumber = b.myNumber; - this.myString = b.myString; - this.myBoolean = b.myBoolean; - } - - public OuterComposite() { - } - - /** - **/ - public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("my_number") - @Valid public BigDecimal getMyNumber() { - return myNumber; - } - - @JsonProperty("my_number") - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - /** - **/ - public OuterComposite myString(String myString) { - this.myString = myString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("my_string") - public String getMyString() { - return myString; - } - - @JsonProperty("my_string") - public void setMyString(String myString) { - this.myString = myString; - } - - /** - **/ - public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("my_boolean") - public Boolean getMyBoolean() { - return myBoolean; - } - - @JsonProperty("my_boolean") - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static OuterCompositeBuilder builder() { - return new OuterCompositeBuilderImpl(); - } - - private static final class OuterCompositeBuilderImpl extends OuterCompositeBuilder { - - @Override - protected OuterCompositeBuilderImpl self() { - return this; - } - - @Override - public OuterComposite build() { - return new OuterComposite(this); - } - } - - public static abstract class OuterCompositeBuilder> { - private BigDecimal myNumber; - private String myString; - private Boolean myBoolean; - protected abstract B self(); - - public abstract C build(); - - public B myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - return self(); - } - public B myString(String myString) { - this.myString = myString; - return self(); - } - public B myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/OuterEnum.java deleted file mode 100644 index 02443e450059..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/OuterEnum.java +++ /dev/null @@ -1,60 +0,0 @@ -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 OuterEnum - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public enum OuterEnum { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static OuterEnum fromString(String s) { - for (OuterEnum b : OuterEnum.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 OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Pet.java index c3e30a2a4b54..3aac79912aef 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Pet.java @@ -1,11 +1,8 @@ package org.openapitools.model; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedHashSet; import java.util.List; -import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import java.io.Serializable; @@ -19,16 +16,18 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; +/** + * A pet for sale in the pet store + **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") +@org.eclipse.microprofile.openapi.annotations.media.Schema(title="a Pet", description="A pet for sale in the pet store") @JsonTypeName("Pet") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Pet implements Serializable { private Long id; private Category category; private String name; - private @Valid Set photoUrls = new LinkedHashSet<>(); + private @Valid List photoUrls = new ArrayList<>(); private @Valid List<@Valid Tag> tags = new ArrayList<>(); public enum StatusEnum { @@ -94,7 +93,7 @@ public Pet() { @JsonCreator public Pet( @JsonProperty(required = true, value = "name") String name, - @JsonProperty(required = true, value = "photoUrls") Set photoUrls + @JsonProperty(required = true, value = "photoUrls") List photoUrls ) { this.name = name; this.photoUrls = photoUrls; @@ -159,7 +158,7 @@ public void setName(String name) { /** **/ - public Pet photoUrls(Set photoUrls) { + public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; } @@ -167,19 +166,18 @@ public Pet photoUrls(Set photoUrls) { @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") @JsonProperty(required = true, value = "photoUrls") - @NotNull public Set getPhotoUrls() { + @NotNull public List getPhotoUrls() { return photoUrls; } @JsonProperty(required = true, value = "photoUrls") - @JsonDeserialize(as = LinkedHashSet.class) - public void setPhotoUrls(Set photoUrls) { + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } public Pet addPhotoUrlsItem(String photoUrlsItem) { if (this.photoUrls == null) { - this.photoUrls = new LinkedHashSet<>(); + this.photoUrls = new ArrayList<>(); } this.photoUrls.add(photoUrlsItem); @@ -316,7 +314,7 @@ public static abstract class PetBuilder photoUrls = new LinkedHashSet<>(); + private List photoUrls = new ArrayList<>(); private List tags = new ArrayList<>(); private StatusEnum status; protected abstract B self(); @@ -335,7 +333,7 @@ public B name(String name) { this.name = name; return self(); } - public B photoUrls(Set photoUrls) { + public B photoUrls(List photoUrls) { this.photoUrls = photoUrls; return self(); } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ReadOnlyFirst.java deleted file mode 100644 index c3497b85b1c7..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ /dev/null @@ -1,141 +0,0 @@ -package org.openapitools.model; - -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("ReadOnlyFirst") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class ReadOnlyFirst implements Serializable { - private String bar; - private String baz; - - protected ReadOnlyFirst(ReadOnlyFirstBuilder b) { - this.bar = b.bar; - this.baz = b.baz; - } - - public ReadOnlyFirst() { - } - - /** - **/ - public ReadOnlyFirst bar(String bar) { - this.bar = bar; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("bar") - public void setBar(String bar) { - this.bar = bar; - } - - /** - **/ - public ReadOnlyFirst baz(String baz) { - this.baz = baz; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - @JsonProperty("baz") - public void setBaz(String baz) { - this.baz = baz; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); - } - - @Override - public int hashCode() { - return Objects.hash(bar, baz); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static ReadOnlyFirstBuilder builder() { - return new ReadOnlyFirstBuilderImpl(); - } - - private static final class ReadOnlyFirstBuilderImpl extends ReadOnlyFirstBuilder { - - @Override - protected ReadOnlyFirstBuilderImpl self() { - return this; - } - - @Override - public ReadOnlyFirst build() { - return new ReadOnlyFirst(this); - } - } - - public static abstract class ReadOnlyFirstBuilder> { - private String bar; - private String baz; - protected abstract B self(); - - public abstract C build(); - - public B bar(String bar) { - this.bar = bar; - return self(); - } - public B baz(String baz) { - this.baz = baz; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/SpecialModelName.java deleted file mode 100644 index 9c2a9ae22a35..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/SpecialModelName.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("$special[model.name]") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class SpecialModelName implements Serializable { - private Long $specialPropertyName; - - protected SpecialModelName(SpecialModelNameBuilder b) { - this.$specialPropertyName = b.$specialPropertyName; - } - - public SpecialModelName() { - } - - /** - **/ - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("$special[property.name]") - public Long get$SpecialPropertyName() { - return $specialPropertyName; - } - - @JsonProperty("$special[property.name]") - public void set$SpecialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); - } - - @Override - public int hashCode() { - return Objects.hash($specialPropertyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static SpecialModelNameBuilder builder() { - return new SpecialModelNameBuilderImpl(); - } - - private static final class SpecialModelNameBuilderImpl extends SpecialModelNameBuilder { - - @Override - protected SpecialModelNameBuilderImpl self() { - return this; - } - - @Override - public SpecialModelName build() { - return new SpecialModelName(this); - } - } - - public static abstract class SpecialModelNameBuilder> { - private Long $specialPropertyName; - protected abstract B self(); - - public abstract C build(); - - public B $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Tag.java index a4803174e1cd..ba469ec1c019 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/Tag.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; +/** + * A tag for a pet + **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") +@org.eclipse.microprofile.openapi.annotations.media.Schema(title="Pet Tag", description="A tag for a pet") @JsonTypeName("Tag") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class Tag implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderDefault.java deleted file mode 100644 index b3f04b6833e6..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ /dev/null @@ -1,260 +0,0 @@ -package org.openapitools.model; - -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 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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("TypeHolderDefault") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class TypeHolderDefault implements Serializable { - private String stringItem = "what"; - private BigDecimal numberItem; - private Integer integerItem; - private Boolean boolItem = true; - private @Valid List 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() { - } - - @JsonCreator - public TypeHolderDefault( - @JsonProperty(required = true, value = "string_item") String stringItem, - @JsonProperty(required = true, value = "number_item") BigDecimal numberItem, - @JsonProperty(required = true, value = "integer_item") Integer integerItem, - @JsonProperty(required = true, value = "bool_item") Boolean boolItem, - @JsonProperty(required = true, value = "array_item") List arrayItem - ) { - this.stringItem = stringItem; - this.numberItem = numberItem; - this.integerItem = integerItem; - this.boolItem = boolItem; - this.arrayItem = arrayItem; - } - - /** - **/ - public TypeHolderDefault stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "string_item") - @NotNull public String getStringItem() { - return stringItem; - } - - @JsonProperty(required = true, value = "string_item") - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - /** - **/ - public TypeHolderDefault numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "number_item") - @NotNull @Valid public BigDecimal getNumberItem() { - return numberItem; - } - - @JsonProperty(required = true, value = "number_item") - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - /** - **/ - public TypeHolderDefault integerItem(Integer integerItem) { - this.integerItem = integerItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "integer_item") - @NotNull public Integer getIntegerItem() { - return integerItem; - } - - @JsonProperty(required = true, value = "integer_item") - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - /** - **/ - public TypeHolderDefault boolItem(Boolean boolItem) { - this.boolItem = boolItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "bool_item") - @NotNull public Boolean getBoolItem() { - return boolItem; - } - - @JsonProperty(required = true, value = "bool_item") - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - /** - **/ - public TypeHolderDefault arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "") - @JsonProperty(required = true, value = "array_item") - @NotNull public List getArrayItem() { - return arrayItem; - } - - @JsonProperty(required = true, value = "array_item") - public void setArrayItem(List 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static TypeHolderDefaultBuilder builder() { - return new TypeHolderDefaultBuilderImpl(); - } - - private static final class TypeHolderDefaultBuilderImpl extends TypeHolderDefaultBuilder { - - @Override - protected TypeHolderDefaultBuilderImpl self() { - return this; - } - - @Override - public TypeHolderDefault build() { - return new TypeHolderDefault(this); - } - } - - public static abstract class TypeHolderDefaultBuilder> { - private String stringItem = "what"; - private BigDecimal numberItem; - private Integer integerItem; - private Boolean boolItem = true; - private List 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 arrayItem) { - this.arrayItem = arrayItem; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java deleted file mode 100644 index f342df891694..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ /dev/null @@ -1,290 +0,0 @@ -package org.openapitools.model; - -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 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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("TypeHolderExample") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.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 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() { - } - - @JsonCreator - public TypeHolderExample( - @JsonProperty(required = true, value = "string_item") String stringItem, - @JsonProperty(required = true, value = "number_item") BigDecimal numberItem, - @JsonProperty(required = true, value = "float_item") Float floatItem, - @JsonProperty(required = true, value = "integer_item") Integer integerItem, - @JsonProperty(required = true, value = "bool_item") Boolean boolItem, - @JsonProperty(required = true, value = "array_item") List arrayItem - ) { - this.stringItem = stringItem; - this.numberItem = numberItem; - this.floatItem = floatItem; - this.integerItem = integerItem; - this.boolItem = boolItem; - this.arrayItem = arrayItem; - } - - /** - **/ - public TypeHolderExample stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "what", required = true, description = "") - @JsonProperty(required = true, value = "string_item") - @NotNull public String getStringItem() { - return stringItem; - } - - @JsonProperty(required = true, value = "string_item") - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - /** - **/ - public TypeHolderExample numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "1.234", required = true, description = "") - @JsonProperty(required = true, value = "number_item") - @NotNull @Valid public BigDecimal getNumberItem() { - return numberItem; - } - - @JsonProperty(required = true, value = "number_item") - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - /** - **/ - public TypeHolderExample floatItem(Float floatItem) { - this.floatItem = floatItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "1.234", required = true, description = "") - @JsonProperty(required = true, value = "float_item") - @NotNull public Float getFloatItem() { - return floatItem; - } - - @JsonProperty(required = true, value = "float_item") - public void setFloatItem(Float floatItem) { - this.floatItem = floatItem; - } - - /** - **/ - public TypeHolderExample integerItem(Integer integerItem) { - this.integerItem = integerItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", required = true, description = "") - @JsonProperty(required = true, value = "integer_item") - @NotNull public Integer getIntegerItem() { - return integerItem; - } - - @JsonProperty(required = true, value = "integer_item") - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - /** - **/ - public TypeHolderExample boolItem(Boolean boolItem) { - this.boolItem = boolItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "true", required = true, description = "") - @JsonProperty(required = true, value = "bool_item") - @NotNull public Boolean getBoolItem() { - return boolItem; - } - - @JsonProperty(required = true, value = "bool_item") - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - /** - **/ - public TypeHolderExample arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "[0, 1, 2, 3]", required = true, description = "") - @JsonProperty(required = true, value = "array_item") - @NotNull public List getArrayItem() { - return arrayItem; - } - - @JsonProperty(required = true, value = "array_item") - public void setArrayItem(List 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) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static TypeHolderExampleBuilder builder() { - return new TypeHolderExampleBuilderImpl(); - } - - private static final class TypeHolderExampleBuilderImpl extends TypeHolderExampleBuilder { - - @Override - protected TypeHolderExampleBuilderImpl self() { - return this; - } - - @Override - public TypeHolderExample build() { - return new TypeHolderExample(this); - } - } - - public static abstract class TypeHolderExampleBuilder> { - private String stringItem; - private BigDecimal numberItem; - private Float floatItem; - private Integer integerItem; - private Boolean boolItem; - private List 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 arrayItem) { - this.arrayItem = arrayItem; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/User.java index b939bafb9169..fd3320f2bf3e 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/User.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import org.openapitools.jackson.nullable.JsonNullable; +/** + * A User who is purchasing from the pet store + **/ - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") +@org.eclipse.microprofile.openapi.annotations.media.Schema(title="a User", description="A User who is purchasing from the pet store") @JsonTypeName("User") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") public class User implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java deleted file mode 100644 index f2769fd7f9f4..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/XmlItem.java +++ /dev/null @@ -1,1045 +0,0 @@ -package org.openapitools.model; - -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 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; -import org.openapitools.jackson.nullable.JsonNullable; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("XmlItem") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.22.0-SNAPSHOT") -public class XmlItem implements Serializable { - private String attributeString; - private BigDecimal attributeNumber; - private Integer attributeInteger; - private Boolean attributeBoolean; - private @Valid List wrappedArray = new ArrayList<>(); - private String nameString; - private BigDecimal nameNumber; - private Integer nameInteger; - private Boolean nameBoolean; - private @Valid List nameArray = new ArrayList<>(); - private @Valid List nameWrappedArray = new ArrayList<>(); - private String prefixString; - private BigDecimal prefixNumber; - private Integer prefixInteger; - private Boolean prefixBoolean; - private @Valid List prefixArray = new ArrayList<>(); - private @Valid List prefixWrappedArray = new ArrayList<>(); - private String namespaceString; - private BigDecimal namespaceNumber; - private Integer namespaceInteger; - private Boolean namespaceBoolean; - private @Valid List namespaceArray = new ArrayList<>(); - private @Valid List namespaceWrappedArray = new ArrayList<>(); - private String prefixNsString; - private BigDecimal prefixNsNumber; - private Integer prefixNsInteger; - private Boolean prefixNsBoolean; - private @Valid List prefixNsArray = new ArrayList<>(); - private @Valid List prefixNsWrappedArray = new ArrayList<>(); - - protected XmlItem(XmlItemBuilder b) { - this.attributeString = b.attributeString; - this.attributeNumber = b.attributeNumber; - this.attributeInteger = b.attributeInteger; - this.attributeBoolean = b.attributeBoolean; - this.wrappedArray = b.wrappedArray; - this.nameString = b.nameString; - this.nameNumber = b.nameNumber; - this.nameInteger = b.nameInteger; - this.nameBoolean = b.nameBoolean; - this.nameArray = b.nameArray; - this.nameWrappedArray = b.nameWrappedArray; - this.prefixString = b.prefixString; - this.prefixNumber = b.prefixNumber; - this.prefixInteger = b.prefixInteger; - this.prefixBoolean = b.prefixBoolean; - this.prefixArray = b.prefixArray; - this.prefixWrappedArray = b.prefixWrappedArray; - this.namespaceString = b.namespaceString; - this.namespaceNumber = b.namespaceNumber; - this.namespaceInteger = b.namespaceInteger; - this.namespaceBoolean = b.namespaceBoolean; - this.namespaceArray = b.namespaceArray; - this.namespaceWrappedArray = b.namespaceWrappedArray; - this.prefixNsString = b.prefixNsString; - this.prefixNsNumber = b.prefixNsNumber; - this.prefixNsInteger = b.prefixNsInteger; - this.prefixNsBoolean = b.prefixNsBoolean; - this.prefixNsArray = b.prefixNsArray; - this.prefixNsWrappedArray = b.prefixNsWrappedArray; - } - - public XmlItem() { - } - - /** - **/ - public XmlItem attributeString(String attributeString) { - this.attributeString = attributeString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "string", description = "") - @JsonProperty("attribute_string") - public String getAttributeString() { - return attributeString; - } - - @JsonProperty("attribute_string") - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - /** - **/ - public XmlItem attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "1.234", description = "") - @JsonProperty("attribute_number") - @Valid public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - @JsonProperty("attribute_number") - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - /** - **/ - public XmlItem attributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") - @JsonProperty("attribute_integer") - public Integer getAttributeInteger() { - return attributeInteger; - } - - @JsonProperty("attribute_integer") - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - /** - **/ - public XmlItem attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "true", description = "") - @JsonProperty("attribute_boolean") - public Boolean getAttributeBoolean() { - return attributeBoolean; - } - - @JsonProperty("attribute_boolean") - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - /** - **/ - public XmlItem wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("wrapped_array") - public List getWrappedArray() { - return wrappedArray; - } - - @JsonProperty("wrapped_array") - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList<>(); - } - - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - public XmlItem removeWrappedArrayItem(Integer wrappedArrayItem) { - if (wrappedArrayItem != null && this.wrappedArray != null) { - this.wrappedArray.remove(wrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem nameString(String nameString) { - this.nameString = nameString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "string", description = "") - @JsonProperty("name_string") - public String getNameString() { - return nameString; - } - - @JsonProperty("name_string") - public void setNameString(String nameString) { - this.nameString = nameString; - } - - /** - **/ - public XmlItem nameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "1.234", description = "") - @JsonProperty("name_number") - @Valid public BigDecimal getNameNumber() { - return nameNumber; - } - - @JsonProperty("name_number") - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - /** - **/ - public XmlItem nameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") - @JsonProperty("name_integer") - public Integer getNameInteger() { - return nameInteger; - } - - @JsonProperty("name_integer") - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - /** - **/ - public XmlItem nameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "true", description = "") - @JsonProperty("name_boolean") - public Boolean getNameBoolean() { - return nameBoolean; - } - - @JsonProperty("name_boolean") - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - /** - **/ - public XmlItem nameArray(List nameArray) { - this.nameArray = nameArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name_array") - public List getNameArray() { - return nameArray; - } - - @JsonProperty("name_array") - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList<>(); - } - - this.nameArray.add(nameArrayItem); - return this; - } - - public XmlItem removeNameArrayItem(Integer nameArrayItem) { - if (nameArrayItem != null && this.nameArray != null) { - this.nameArray.remove(nameArrayItem); - } - - return this; - } - /** - **/ - public XmlItem nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("name_wrapped_array") - public List getNameWrappedArray() { - return nameWrappedArray; - } - - @JsonProperty("name_wrapped_array") - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList<>(); - } - - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - public XmlItem removeNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (nameWrappedArrayItem != null && this.nameWrappedArray != null) { - this.nameWrappedArray.remove(nameWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixString(String prefixString) { - this.prefixString = prefixString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "string", description = "") - @JsonProperty("prefix_string") - public String getPrefixString() { - return prefixString; - } - - @JsonProperty("prefix_string") - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - /** - **/ - public XmlItem prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "1.234", description = "") - @JsonProperty("prefix_number") - @Valid public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - @JsonProperty("prefix_number") - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - /** - **/ - public XmlItem prefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") - @JsonProperty("prefix_integer") - public Integer getPrefixInteger() { - return prefixInteger; - } - - @JsonProperty("prefix_integer") - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - /** - **/ - public XmlItem prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "true", description = "") - @JsonProperty("prefix_boolean") - public Boolean getPrefixBoolean() { - return prefixBoolean; - } - - @JsonProperty("prefix_boolean") - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - /** - **/ - public XmlItem prefixArray(List prefixArray) { - this.prefixArray = prefixArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("prefix_array") - public List getPrefixArray() { - return prefixArray; - } - - @JsonProperty("prefix_array") - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList<>(); - } - - this.prefixArray.add(prefixArrayItem); - return this; - } - - public XmlItem removePrefixArrayItem(Integer prefixArrayItem) { - if (prefixArrayItem != null && this.prefixArray != null) { - this.prefixArray.remove(prefixArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("prefix_wrapped_array") - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - @JsonProperty("prefix_wrapped_array") - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList<>(); - } - - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - public XmlItem removePrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (prefixWrappedArrayItem != null && this.prefixWrappedArray != null) { - this.prefixWrappedArray.remove(prefixWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem namespaceString(String namespaceString) { - this.namespaceString = namespaceString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "string", description = "") - @JsonProperty("namespace_string") - public String getNamespaceString() { - return namespaceString; - } - - @JsonProperty("namespace_string") - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - /** - **/ - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "1.234", description = "") - @JsonProperty("namespace_number") - @Valid public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - @JsonProperty("namespace_number") - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - /** - **/ - public XmlItem namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") - @JsonProperty("namespace_integer") - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - @JsonProperty("namespace_integer") - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - /** - **/ - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "true", description = "") - @JsonProperty("namespace_boolean") - public Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - @JsonProperty("namespace_boolean") - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - /** - **/ - public XmlItem namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("namespace_array") - public List getNamespaceArray() { - return namespaceArray; - } - - @JsonProperty("namespace_array") - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList<>(); - } - - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - public XmlItem removeNamespaceArrayItem(Integer namespaceArrayItem) { - if (namespaceArrayItem != null && this.namespaceArray != null) { - this.namespaceArray.remove(namespaceArrayItem); - } - - return this; - } - /** - **/ - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("namespace_wrapped_array") - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - @JsonProperty("namespace_wrapped_array") - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList<>(); - } - - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - public XmlItem removeNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (namespaceWrappedArrayItem != null && this.namespaceWrappedArray != null) { - this.namespaceWrappedArray.remove(namespaceWrappedArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "string", description = "") - @JsonProperty("prefix_ns_string") - public String getPrefixNsString() { - return prefixNsString; - } - - @JsonProperty("prefix_ns_string") - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - /** - **/ - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "1.234", description = "") - @JsonProperty("prefix_ns_number") - @Valid public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - @JsonProperty("prefix_ns_number") - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - /** - **/ - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "-2", description = "") - @JsonProperty("prefix_ns_integer") - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - @JsonProperty("prefix_ns_integer") - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - /** - **/ - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(example = "true", description = "") - @JsonProperty("prefix_ns_boolean") - public Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - @JsonProperty("prefix_ns_boolean") - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - /** - **/ - public XmlItem prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("prefix_ns_array") - public List getPrefixNsArray() { - return prefixNsArray; - } - - @JsonProperty("prefix_ns_array") - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList<>(); - } - - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - public XmlItem removePrefixNsArrayItem(Integer prefixNsArrayItem) { - if (prefixNsArrayItem != null && this.prefixNsArray != null) { - this.prefixNsArray.remove(prefixNsArrayItem); - } - - return this; - } - /** - **/ - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("prefix_ns_wrapped_array") - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - @JsonProperty("prefix_ns_wrapped_array") - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList<>(); - } - - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - public XmlItem removePrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (prefixNsWrappedArrayItem != null && this.prefixNsWrappedArray != null) { - this.prefixNsWrappedArray.remove(prefixNsWrappedArrayItem); - } - - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - return o == null ? "null" : o.toString().replace("\n", "\n "); - } - - - public static XmlItemBuilder builder() { - return new XmlItemBuilderImpl(); - } - - private static final class XmlItemBuilderImpl extends XmlItemBuilder { - - @Override - protected XmlItemBuilderImpl self() { - return this; - } - - @Override - public XmlItem build() { - return new XmlItem(this); - } - } - - public static abstract class XmlItemBuilder> { - private String attributeString; - private BigDecimal attributeNumber; - private Integer attributeInteger; - private Boolean attributeBoolean; - private List wrappedArray = new ArrayList<>(); - private String nameString; - private BigDecimal nameNumber; - private Integer nameInteger; - private Boolean nameBoolean; - private List nameArray = new ArrayList<>(); - private List nameWrappedArray = new ArrayList<>(); - private String prefixString; - private BigDecimal prefixNumber; - private Integer prefixInteger; - private Boolean prefixBoolean; - private List prefixArray = new ArrayList<>(); - private List prefixWrappedArray = new ArrayList<>(); - private String namespaceString; - private BigDecimal namespaceNumber; - private Integer namespaceInteger; - private Boolean namespaceBoolean; - private List namespaceArray = new ArrayList<>(); - private List namespaceWrappedArray = new ArrayList<>(); - private String prefixNsString; - private BigDecimal prefixNsNumber; - private Integer prefixNsInteger; - private Boolean prefixNsBoolean; - private List prefixNsArray = new ArrayList<>(); - private List prefixNsWrappedArray = new ArrayList<>(); - protected abstract B self(); - - public abstract C build(); - - public B attributeString(String attributeString) { - this.attributeString = attributeString; - return self(); - } - public B attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - return self(); - } - public B attributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - return self(); - } - public B attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - return self(); - } - public B wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - return self(); - } - public B nameString(String nameString) { - this.nameString = nameString; - return self(); - } - public B nameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - return self(); - } - public B nameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - return self(); - } - public B nameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - return self(); - } - public B nameArray(List nameArray) { - this.nameArray = nameArray; - return self(); - } - public B nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - return self(); - } - public B prefixString(String prefixString) { - this.prefixString = prefixString; - return self(); - } - public B prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - return self(); - } - public B prefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - return self(); - } - public B prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - return self(); - } - public B prefixArray(List prefixArray) { - this.prefixArray = prefixArray; - return self(); - } - public B prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - return self(); - } - public B namespaceString(String namespaceString) { - this.namespaceString = namespaceString; - return self(); - } - public B namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - return self(); - } - public B namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - return self(); - } - public B namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - return self(); - } - public B namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - return self(); - } - public B namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - return self(); - } - public B prefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - return self(); - } - public B prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - return self(); - } - public B prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - return self(); - } - public B prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - return self(); - } - public B prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - return self(); - } - public B prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - return self(); - } - } -} diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/openapi/openapi.yaml deleted file mode 100644 index eded577e74f9..000000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/openapi/openapi.yaml +++ /dev/null @@ -1,2276 +0,0 @@ -openapi: 3.0.1 -info: - description: "This spec is mainly for testing Petstore server and contains fake\ - \ endpoints, models. Please do not use this for any other purpose. Special characters:\ - \ \" \\" - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore - version: 1.0.0 -servers: -- url: http://petstore.swagger.io:80/v2 -tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user -paths: - /pet: - post: - operationId: addPet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - "200": - content: {} - description: successful operation - "405": - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store - tags: - - pet - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: pet - put: - operationId: updatePet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - "200": - content: {} - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Pet not found - "405": - content: {} - description: Validation exception - security: - - petstore_auth: - - write:pets - - read:pets - summary: Update an existing pet - tags: - - pet - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: pet - /pet/findByStatus: - get: - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - parameters: - - description: Status values that need to be considered for filter - explode: false - in: query - name: status - required: true - schema: - items: - default: available - enum: - - available - - pending - - sold - type: string - type: array - style: form - responses: - "200": - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - "400": - content: {} - description: Invalid status value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by status - tags: - - pet - x-accepts: application/json - x-tags: - - tag: pet - /pet/findByTags: - get: - deprecated: true - description: "Multiple tags can be provided with comma separated strings. Use\ - \ tag1, tag2, tag3 for testing." - operationId: findPetsByTags - parameters: - - description: Tags to filter by - explode: false - in: query - name: tags - required: true - schema: - items: - type: string - type: array - uniqueItems: true - style: form - responses: - "200": - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - uniqueItems: true - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - uniqueItems: true - description: successful operation - "400": - content: {} - description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - x-accepts: application/json - x-tags: - - tag: pet - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - "200": - content: {} - description: successful operation - "400": - content: {} - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet - tags: - - pet - x-accepts: application/json - x-tags: - - tag: pet - get: - description: Returns a single pet - operationId: getPetById - parameters: - - description: ID of pet to return - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Pet' - application/json: - schema: - $ref: '#/components/schemas/Pet' - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Pet not found - security: - - api_key: [] - summary: Find pet by ID - tags: - - pet - x-accepts: application/json - x-tags: - - tag: pet - post: - operationId: updatePetWithForm - parameters: - - description: ID of pet that needs to be updated - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/updatePetWithForm_request' - responses: - "405": - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Updates a pet in the store with form data - tags: - - pet - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - x-tags: - - tag: pet - /pet/{petId}/uploadImage: - post: - operationId: uploadFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/uploadFile_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - x-content-type: multipart/form-data - x-accepts: application/json - x-tags: - - tag: pet - /store/inventory: - get: - description: Returns a map of status codes to quantities - operationId: getInventory - responses: - "200": - content: - application/json: - schema: - additionalProperties: - format: int32 - type: integer - type: object - description: successful operation - security: - - api_key: [] - summary: Returns pet inventories by status - tags: - - store - x-accepts: application/json - x-tags: - - tag: store - /store/order: - post: - operationId: placeOrder - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet - required: true - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - "400": - content: {} - description: Invalid Order - summary: Place an order for a pet - tags: - - store - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: application/json - x-tags: - - tag: store - /store/order/{order_id}: - delete: - description: For valid response try integer IDs with value < 1000. Anything - above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - in: path - name: order_id - required: true - schema: - type: string - responses: - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Order not found - summary: Delete purchase order by ID - tags: - - store - x-accepts: application/json - x-tags: - - tag: store - get: - description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generate exceptions - operationId: getOrderById - parameters: - - description: ID of pet that needs to be fetched - in: path - name: order_id - required: true - schema: - format: int64 - maximum: 5 - minimum: 1 - type: integer - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Order not found - summary: Find purchase order by ID - tags: - - store - x-accepts: application/json - x-tags: - - tag: store - /user: - post: - description: This can only be done by the logged in user. - operationId: createUser - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/User' - description: Created user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Create user - tags: - - user - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: application/json - x-tags: - - tag: user - /user/createWithArray: - post: - operationId: createUsersWithArrayInput - requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: application/json - x-tags: - - tag: user - /user/createWithList: - post: - operationId: createUsersWithListInput - requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: application/json - x-tags: - - tag: user - /user/login: - get: - operationId: loginUser - parameters: - - description: The user name for login - in: query - name: username - required: true - schema: - type: string - - description: The password for login in clear text - in: query - name: password - required: true - schema: - type: string - responses: - "200": - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string - description: successful operation - headers: - X-Rate-Limit: - description: calls per hour allowed by the user - schema: - format: int32 - type: integer - X-Expires-After: - description: date in UTC when token expires - schema: - format: date-time - type: string - "400": - content: {} - description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - x-accepts: application/json - x-tags: - - tag: user - /user/logout: - get: - operationId: logoutUser - responses: - default: - content: {} - description: successful operation - summary: Logs out current logged in user session - tags: - - user - x-accepts: application/json - x-tags: - - tag: user - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - summary: Delete user - tags: - - user - x-accepts: application/json - x-tags: - - tag: user - get: - operationId: getUserByName - parameters: - - description: The name that needs to be fetched. Use user1 for testing. - in: path - name: username - required: true - schema: - type: string - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/User' - application/json: - schema: - $ref: '#/components/schemas/User' - description: successful operation - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - summary: Get user by user name - tags: - - user - x-accepts: application/json - x-tags: - - tag: user - put: - description: This can only be done by the logged in user. - operationId: updateUser - parameters: - - description: name that need to be deleted - in: path - name: username - required: true - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/User' - description: Updated user object - required: true - responses: - "400": - content: {} - description: Invalid user supplied - "404": - content: {} - description: User not found - summary: Updated user - tags: - - user - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: application/json - x-tags: - - tag: user - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - security: - - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: fake_classname_tags 123#$%^ - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - in: query - name: required_string_group - required: true - schema: - type: integer - - description: Required Boolean in group parameters - in: header - name: required_boolean_group - required: true - schema: - type: boolean - - description: Required Integer in group parameters - in: query - name: required_int64_group - required: true - schema: - format: int64 - type: integer - - description: String in group parameters - in: query - name: string_group - schema: - type: integer - - description: Boolean in group parameters - in: header - name: boolean_group - schema: - type: boolean - - description: Integer in group parameters - in: query - name: int64_group - schema: - format: int64 - type: integer - responses: - "400": - content: {} - description: Something wrong - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - x-accepts: application/json - x-tags: - - tag: fake - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - in: header - name: enum_header_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - - description: Query parameter enum test (string array) - explode: false - in: query - name: enum_query_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - in: query - name: enum_query_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - - description: Query parameter enum test (double) - in: query - name: enum_query_integer - schema: - enum: - - 1 - - -2 - format: int32 - type: integer - - description: Query parameter enum test (double) - in: query - name: enum_query_double - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/testEnumParameters_request' - responses: - "400": - content: {} - description: Invalid request - "404": - content: {} - description: Not found - summary: To test enum parameters - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - x-tags: - - tag: fake - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test "client" model - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: fake - post: - description: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/testEndpointParameters_request' - required: true - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - security: - - http_basic_test: [] - summary: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - x-tags: - - tag: fake - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Input number as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Output number - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: '*/*' - x-tags: - - tag: fake - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Input string as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Output string - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: '*/*' - x-tags: - - tag: fake - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Input boolean as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Output boolean - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: '*/*' - x-tags: - - tag: fake - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Input composite as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Output composite - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: '*/*' - x-tags: - - tag: fake - /fake/jsonFormData: - get: - operationId: testJsonFormData - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/testJsonFormData_request' - required: true - responses: - "200": - content: {} - description: successful operation - summary: test json serialization of form data - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - x-tags: - - tag: fake - /fake/inline-additionalProperties: - post: - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - "200": - content: {} - description: successful operation - summary: test inline additionalProperties - tags: - - fake - x-codegen-request-body-name: param - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: fake - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - in: query - name: query - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: fake - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: application/json - x-tags: - - tag: fake - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test special tags - tags: - - $another-fake? - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: $another-fake? - /fake/body-with-file-schema: - put: - description: "For this test, the body for this request much reference a schema\ - \ named `File`." - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FileSchemaTestClass' - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: fake - /fake/test-query-parameters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: false - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: form - - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: {} - description: Success - tags: - - fake - x-accepts: application/json - x-tags: - - tag: fake - /fake/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - x-content-type: multipart/form-data - x-accepts: application/json - x-tags: - - tag: pet -components: - schemas: - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order - Category: - example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: default-name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: '#/components/schemas/Category' - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - uniqueItems: true - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: '#/components/schemas/Tag' - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - type: object - xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" - Return: - description: Model for testing reserved words - properties: - return: - format: int32 - type: integer - type: object - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - "123Number": - readOnly: true - type: integer - required: - - name - type: object - xml: - name: Name - "200_response": - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - type: object - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - type: object - Dog: - allOf: - - $ref: '#/components/schemas/Animal' - - properties: - breed: - type: string - type: object - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - properties: - declawed: - type: boolean - type: object - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: '#/components/schemas/Animal' - type: array - format_test: - properties: - integer: - maximum: 100 - minimum: 10 - type: integer - int32: - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - pattern: "/[a-z]/i" - type: string - byte: - format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - BigDecimal: - format: number - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: '#/components/schemas/OuterEnum' - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_string: - additionalProperties: - type: string - type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: '#/components/schemas/Animal' - type: object - type: object - List: - properties: - "123-list": - type: string - type: object - Client: - example: - client: client - properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: '#/components/schemas/ReadOnlyFirst' - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array - type: object - OuterEnum: - enum: - - placed - - approved - - delivered - type: string - OuterComposite: - example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true - properties: - my_number: - type: number - my_string: - type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: '#/components/schemas/File' - files: - items: - $ref: '#/components/schemas/File' - type: array - type: object - File: - description: Must be named `File` for test. - example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - TypeHolderDefault: - properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: - type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object - xml: - namespace: http://a.com/schema - prefix: pre - updatePetWithForm_request: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - uploadFile_request: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - testEnumParameters_request: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - testEndpointParameters_request: - properties: - integer: - description: None - format: int32 - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: "/[a-z]/i" - type: string - pattern_without_delimiter: - description: None - pattern: "^[A-Z].*" - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - type: object - testJsonFormData_request: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - uploadFileWithRequiredFile_request: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - type: object - securitySchemes: - petstore_auth: - flows: - implicit: - authorizationUrl: http://petstore.swagger.io/api/oauth/dialog - scopes: - write:pets: modify pets in your account - read:pets: read your pets - type: oauth2 - api_key: - in: header - name: api_key - type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: - scheme: basic - type: http -x-original-swagger-version: "2.0" diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml index 0fe317558754..31074771d9fb 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml @@ -1,15 +1,17 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: - description: "This spec is mainly for testing Petstore server and contains fake\ - \ endpoints, models. Please do not use this for any other purpose. Special characters:\ - \ \" \\" + description: "This is a sample server Petstore server. For this sample, you can\ + \ use the api key `special-key` to test the authorization filters." license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: -- url: http://petstore.swagger.io:80/v2 +- url: http://petstore.swagger.io/v2 tags: - description: Everything about your Pets name: pet @@ -20,23 +22,21 @@ tags: paths: /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Pet" - application/xml: - schema: - $ref: "#/components/schemas/Pet" - description: Pet object that needs to be added to the store - required: true + $ref: "#/components/requestBodies/Pet" responses: "200": - content: {} + content: + application/xml: + schema: + $ref: "#/components/schemas/Pet" + application/json: + schema: + $ref: "#/components/schemas/Pet" description: successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,36 +45,35 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json + - application/xml x-tags: - tag: pet put: + description: "" + externalDocs: + description: API documentation for the updatePet operation + url: http://petstore.swagger.io/v2/doc/updatePet operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Pet" - application/xml: - schema: - $ref: "#/components/schemas/Pet" - description: Pet object that needs to be added to the store - required: true + $ref: "#/components/requestBodies/Pet" responses: "200": - content: {} + content: + application/xml: + schema: + $ref: "#/components/schemas/Pet" + application/json: + schema: + $ref: "#/components/schemas/Pet" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -83,10 +82,10 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json + - application/xml x-tags: - tag: pet /pet/findByStatus: @@ -94,7 +93,8 @@ paths: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -124,11 +124,9 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by status tags: @@ -154,7 +152,6 @@ paths: items: type: string type: array - uniqueItems: true style: form responses: "200": @@ -164,20 +161,16 @@ paths: items: $ref: "#/components/schemas/Pet" type: array - uniqueItems: true application/json: schema: items: $ref: "#/components/schemas/Pet" type: array - uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by tags tags: @@ -189,25 +182,27 @@ paths: - tag: pet /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: - "200": - content: {} - description: successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -225,12 +220,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -242,10 +239,8 @@ paths: $ref: "#/components/schemas/Pet" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] @@ -258,15 +253,18 @@ paths: x-tags: - tag: pet post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -274,7 +272,6 @@ paths: $ref: "#/components/schemas/updatePetWithForm_request" responses: "405": - content: {} description: Invalid input security: - petstore_auth: @@ -290,15 +287,18 @@ paths: - tag: pet /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -348,10 +348,11 @@ paths: - tag: store /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/Order" description: order placed for purchasing the pet @@ -367,36 +368,34 @@ paths: $ref: "#/components/schemas/Order" description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json - application/xml x-tags: - tag: store - /store/order/{order_id}: + /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path - name: order_id + name: orderId required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -411,14 +410,16 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path - name: order_id + name: orderId required: true schema: format: int64 maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -430,10 +431,8 @@ paths: $ref: "#/components/schemas/Order" description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -449,90 +448,84 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/User" description: Created user object required: true responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: "#/components/schemas/User" - type: array - description: List of user object - required: true + $ref: "#/components/requestBodies/UserArray" responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: "#/components/schemas/User" - type: array - description: List of user object - required: true + $ref: "#/components/requestBodies/UserArray" responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: - application/json x-tags: - tag: user /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: + pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -544,18 +537,29 @@ paths: type: string description: successful operation headers: + Set-Cookie: + description: Cookie authentication key for use with the `api_key` apiKey + authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -567,11 +571,13 @@ paths: - tag: user /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Logs out current logged in user session tags: - user @@ -585,18 +591,20 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Delete user tags: - user @@ -605,14 +613,17 @@ paths: x-tags: - tag: user get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -624,10 +635,8 @@ paths: $ref: "#/components/schemas/User" description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -642,1533 +651,230 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: "#/components/schemas/User" description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - application/json - x-tags: - - tag: user - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - security: - - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: - application/json x-tags: - - tag: fake_classname_tags 123#$%^ - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - in: query - name: required_string_group - required: true - schema: + - tag: user +components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/User" + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + $ref: "#/components/schemas/Pet" + description: Pet object that needs to be added to the store + required: true + schemas: + Order: + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 type: integer - - description: Required Boolean in group parameters - in: header - name: required_boolean_group - required: true - schema: - type: boolean - - description: Required Integer in group parameters - in: query - name: required_int64_group - required: true - schema: + petId: format: int64 type: integer - - description: String in group parameters - in: query - name: string_group - schema: + quantity: + format: int32 type: integer - - description: Boolean in group parameters - in: header - name: boolean_group - schema: + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false type: boolean - - description: Integer in group parameters - in: query - name: int64_group - schema: + title: Pet Order + type: object + xml: + name: Order + Category: + description: A category for a pet + example: + name: name + id: 6 + properties: + id: format: int64 type: integer - responses: - "400": - content: {} - description: Something wrong - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - x-accepts: - - application/json - x-tags: - - tag: fake - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - in: header - name: enum_header_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) + name: + pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" type: string - - description: Query parameter enum test (string array) - explode: false - in: query - name: enum_query_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - in: query - name: enum_query_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) + title: Pet category + type: object + xml: + name: Category + User: + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + username: type: string - - description: Query parameter enum test (double) - in: query - name: enum_query_integer - schema: - enum: - - 1 - - -2 + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status format: int32 type: integer - - description: Query parameter enum test (double) - in: query - name: enum_query_double - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testEnumParameters_request" - responses: - "400": - content: {} - description: Invalid request - "404": - content: {} - description: Not found - summary: To test enum parameters - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - summary: To test "client" model - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - post: - description: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testEndpointParameters_request" - required: true - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - security: - - http_basic_test: [] - summary: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterNumber" - description: Input number as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterNumber" - description: Output number - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterString" - description: Input string as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterString" - description: Output string - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterBoolean" - description: Input boolean as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterBoolean" - description: Output boolean - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterComposite" - description: Input composite as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: "#/components/schemas/OuterComposite" - description: Output composite - tags: - - fake - x-codegen-request-body-name: body - x-content-type: '*/*' - x-accepts: - - '*/*' - x-tags: - - tag: fake - /fake/jsonFormData: - get: - operationId: testJsonFormData - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/testJsonFormData_request" - required: true - responses: - "200": - content: {} - description: successful operation - summary: test json serialization of form data - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/inline-additionalProperties: - post: - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - "200": - content: {} - description: successful operation - summary: test inline additionalProperties - tags: - - fake - x-codegen-request-body-name: param - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - in: query - name: query - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/User" - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: "#/components/schemas/XmlItem" - application/xml; charset=utf-8: - schema: - $ref: "#/components/schemas/XmlItem" - application/xml; charset=utf-16: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml; charset=utf-8: - schema: - $ref: "#/components/schemas/XmlItem" - text/xml; charset=utf-16: - schema: - $ref: "#/components/schemas/XmlItem" - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: - - application/json - x-tags: - - tag: fake - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - parameters: - - description: to test uuid example value - in: header - name: uuid_test - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Client" - description: successful operation - summary: To test special tags - tags: - - $another-fake? - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: $another-fake? - /fake/body-with-file-schema: - put: - description: "For this test, the body for this request much reference a schema\ - \ named `File`." - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FileSchemaTestClass" - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-content-type: application/json - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/test-query-parameters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: false - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: form - - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: {} - description: Success - tags: - - fake - x-accepts: - - application/json - x-tags: - - tag: fake - /fake/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - $ref: "#/components/schemas/uploadFileWithRequiredFile_request" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ApiResponse" - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - x-content-type: multipart/form-data - x-accepts: - - application/json - x-tags: - - tag: pet -components: - schemas: - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order - Category: - example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: default-name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: "#/components/schemas/Category" - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - uniqueItems: true - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: "#/components/schemas/Tag" - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - type: object - xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" - Return: - description: Model for testing reserved words - properties: - return: - format: int32 - type: integer - type: object - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - "123Number": - readOnly: true - type: integer - required: - - name - type: object - xml: - name: Name - "200_response": - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - type: object - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - type: object - Dog: - allOf: - - $ref: "#/components/schemas/Animal" - - properties: - breed: - type: string - type: object - Cat: - allOf: - - $ref: "#/components/schemas/Animal" - - properties: - declawed: - type: boolean - type: object - BigCat: - allOf: - - $ref: "#/components/schemas/Cat" - - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: "#/components/schemas/Animal" - type: array - format_test: - properties: - integer: - maximum: 100 - minimum: 10 - type: integer - int32: - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - pattern: "/[a-z]/i" - type: string - byte: - format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - BigDecimal: - format: number - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: "#/components/schemas/OuterEnum" - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_string: - additionalProperties: - type: string - type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: "#/components/schemas/Animal" - type: object - type: object - List: - properties: - "123-list": - type: string - type: object - Client: - example: - client: client - properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: "#/components/schemas/ReadOnlyFirst" - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array + title: a User type: object - OuterEnum: - enum: - - placed - - approved - - delivered - type: string - OuterComposite: + xml: + name: User + Tag: + description: A tag for a pet example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true + name: name + id: 1 properties: - my_number: - type: number - my_string: + id: + format: int64 + type: integer + name: type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: "#/components/schemas/File" - files: - items: - $ref: "#/components/schemas/File" - type: array + title: Pet Tag type: object - File: - description: Must be named `File` for test. + xml: + name: Tag + Pet: + description: A pet for sale in the pet store example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - TypeHolderDefault: - properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: - type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 + id: + format: int64 type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string + category: + $ref: "#/components/schemas/Category" + name: + example: doggie type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: + photoUrls: items: - type: integer + type: string type: array xml: + name: photoUrl wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: + tags: items: - type: integer - xml: - name: xml_name_wrapped_array_item + $ref: "#/components/schemas/Tag" type: array xml: - name: xml_name_wrapped_array + name: tag wrapped: true - prefix_string: - example: string + status: + deprecated: true + description: pet status in the store + enum: + - available + - pending + - sold type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 + required: + - name + - photoUrls + title: a Pet + type: object + xml: + name: Pet + ApiResponse: + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string + type: type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string + message: type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true + title: An uploaded response type: object - xml: - namespace: http://a.com/schema - prefix: pre updatePetWithForm_request: properties: name: @@ -2188,123 +894,6 @@ components: format: binary type: string type: object - testEnumParameters_request: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - testEndpointParameters_request: - properties: - integer: - description: None - format: int32 - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: "/[a-z]/i" - type: string - pattern_without_delimiter: - description: None - pattern: "^[A-Z].*" - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - type: object - testJsonFormData_request: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - uploadFileWithRequiredFile_request: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - type: object securitySchemes: petstore_auth: flows: @@ -2318,11 +907,3 @@ components: in: header name: api_key type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: - scheme: basic - type: http -x-original-swagger-version: "2.0"