From 52391ed9e59a16a145b7f705d94da00373c0b9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Thu, 26 Apr 2018 07:54:41 +0200 Subject: [PATCH] Regenerate all jaxrs examples (#234) --- .../.openapi-generator-ignore | 6 +- .../jaxrs-cxf-annotated-base-path/pom.xml | 2 +- .../jaxrs-cxf-cdi/.openapi-generator-ignore | 4 +- samples/server/petstore/jaxrs-cxf-cdi/pom.xml | 6 +- .../.openapi-generator-ignore | 6 +- .../petstore/jaxrs-cxf-non-spring-app/pom.xml | 2 +- .../jaxrs-cxf/.openapi-generator-ignore | 6 +- samples/server/petstore/jaxrs-cxf/pom.xml | 6 +- .../org/openapitools/model/AnimalFarm.java | 41 -- .../org/openapitools/model/OuterBoolean.java | 38 -- .../org/openapitools/model/OuterNumber.java | 38 -- .../org/openapitools/model/OuterString.java | 38 -- .../.openapi-generator-ignore | 23 + .../.openapi-generator/VERSION | 1 + .../petstore/jaxrs-datelib-j8/README.md | 23 + .../server/petstore/jaxrs-datelib-j8/pom.xml | 185 ++++++++ .../org/openapitools/api/AnotherFakeApi.java | 69 +++ .../api/AnotherFakeApiService.java | 21 + .../org/openapitools/api/ApiException.java | 10 + .../org/openapitools/api/ApiOriginFilter.java | 22 + .../openapitools/api/ApiResponseMessage.java | 69 +++ .../java/org/openapitools/api/FakeApi.java | 214 ++++++++++ .../org/openapitools/api/FakeApiService.java | 37 ++ .../api/FakeClassnameTestApi.java | 71 ++++ .../api/FakeClassnameTestApiService.java | 21 + .../openapitools/api/JacksonJsonProvider.java | 29 ++ .../openapitools/api/LocalDateProvider.java | 28 ++ .../openapitools/api/NotFoundException.java | 10 + .../api/OffsetDateTimeProvider.java | 28 ++ .../gen/java/org/openapitools/api/PetApi.java | 211 ++++++++++ .../org/openapitools/api/PetApiService.java | 30 ++ .../openapitools/api/RFC3339DateFormat.java | 19 + .../java/org/openapitools/api/StoreApi.java | 115 +++++ .../org/openapitools/api/StoreApiService.java | 25 ++ .../java/org/openapitools/api/StringUtil.java | 42 ++ .../java/org/openapitools/api/UserApi.java | 165 ++++++++ .../org/openapitools/api/UserApiService.java | 29 ++ .../model/AdditionalPropertiesClass.java | 134 ++++++ .../java/org/openapitools/model/Animal.java | 118 ++++++ .../model/ArrayOfArrayOfNumberOnly.java | 102 +++++ .../openapitools/model/ArrayOfNumberOnly.java | 102 +++++ .../org/openapitools/model/ArrayTest.java | 166 ++++++++ .../openapitools/model/Capitalization.java | 211 ++++++++++ .../gen/java/org/openapitools/model/Cat.java} | 42 +- .../java/org/openapitools/model/Category.java | 115 +++++ .../org/openapitools/model/ClassModel.java} | 40 +- .../java/org/openapitools/model/Client.java} | 39 +- .../gen/java/org/openapitools/model/Dog.java} | 42 +- .../org/openapitools/model/EnumArrays.java | 188 +++++++++ .../org/openapitools/model/EnumClass.java | 55 +++ .../java/org/openapitools/model/EnumTest.java | 318 ++++++++++++++ .../org/openapitools/model/FormatTest.java | 398 ++++++++++++++++++ .../openapitools/model/HasOnlyReadOnly.java} | 45 +- .../java/org/openapitools/model/MapTest.java | 166 ++++++++ ...ropertiesAndAdditionalPropertiesClass.java | 153 +++++++ .../openapitools/model/Model200Response.java | 116 +++++ .../openapitools/model/ModelApiResponse.java | 139 ++++++ .../org/openapitools/model/ModelReturn.java} | 45 +- .../gen/java/org/openapitools/model/Name.java | 147 +++++++ .../org/openapitools/model/NumberOnly.java} | 40 +- .../java/org/openapitools/model/Order.java | 246 +++++++++++ .../openapitools/model/OuterComposite.java | 140 ++++++ .../org/openapitools/model/OuterEnum.java | 55 +++ .../gen/java/org/openapitools/model/Pet.java | 264 ++++++++++++ .../org/openapitools/model/ReadOnlyFirst.java | 106 +++++ .../openapitools/model/SpecialModelName.java | 91 ++++ .../gen/java/org/openapitools/model/Tag.java | 115 +++++ .../gen/java/org/openapitools/model/User.java | 259 ++++++++++++ .../java/org/openapitools/api/Bootstrap.java | 31 ++ .../AnotherFakeApiServiceFactory.java | 13 + .../api/factories/FakeApiServiceFactory.java | 13 + .../FakeClassnameTestApiServiceFactory.java | 13 + .../api/factories/PetApiServiceFactory.java | 13 + .../api/factories/StoreApiServiceFactory.java | 13 + .../api/factories/UserApiServiceFactory.java | 13 + .../api/impl/AnotherFakeApiServiceImpl.java | 25 ++ .../api/impl/FakeApiServiceImpl.java | 77 ++++ .../impl/FakeClassnameTestApiServiceImpl.java | 25 ++ .../api/impl/PetApiServiceImpl.java | 62 +++ .../api/impl/StoreApiServiceImpl.java | 41 ++ .../api/impl/UserApiServiceImpl.java | 61 +++ .../src/main/webapp/WEB-INF/web.xml | 63 +++ .../default/.openapi-generator-ignore | 4 +- .../jaxrs-resteasy/default/build.gradle | 2 +- .../petstore/jaxrs-resteasy/default/pom.xml | 6 +- .../jaxrs-resteasy/default/settings.gradle | 2 +- .../eap-java8/.openapi-generator-ignore | 4 +- .../jaxrs-resteasy/eap-java8/build.gradle | 2 +- .../petstore/jaxrs-resteasy/eap-java8/pom.xml | 2 +- .../eap-joda/.openapi-generator-ignore | 4 +- .../jaxrs-resteasy/eap-joda/build.gradle | 2 +- .../petstore/jaxrs-resteasy/eap-joda/pom.xml | 2 +- .../eap/.openapi-generator-ignore | 4 +- .../petstore/jaxrs-resteasy/eap/build.gradle | 2 +- .../petstore/jaxrs-resteasy/eap/pom.xml | 6 +- .../jaxrs-resteasy/eap/settings.gradle | 2 +- .../joda/.openapi-generator-ignore | 4 +- .../petstore/jaxrs-resteasy/joda/build.gradle | 2 +- .../petstore/jaxrs-resteasy/joda/pom.xml | 2 +- .../.openapi-generator-ignore | 4 +- .../petstore/jaxrs-spec-interface/pom.xml | 6 +- .../gen/java/io/swagger/model/AnimalFarm.java | 57 --- .../java/io/swagger/model/OuterBoolean.java | 54 --- .../java/io/swagger/model/OuterNumber.java | 54 --- .../java/io/swagger/model/OuterString.java | 54 --- .../jaxrs-spec/.openapi-generator-ignore | 4 +- samples/server/petstore/jaxrs-spec/pom.xml | 2 +- .../gen/java/io/swagger/model/AnimalFarm.java | 57 --- .../java/io/swagger/model/OuterBoolean.java | 54 --- .../java/io/swagger/model/OuterNumber.java | 54 --- .../java/io/swagger/model/OuterString.java | 54 --- .../jersey1-useTags/.openapi-generator-ignore | 4 +- .../petstore/jaxrs/jersey1-useTags/pom.xml | 2 +- .../org/openapitools/model/AnimalFarm.java | 65 --- .../java/org/openapitools/api/Bootstrap.java | 2 +- .../src/main/webapp/WEB-INF/web.xml | 2 +- .../jaxrs/jersey1/.openapi-generator-ignore | 4 +- samples/server/petstore/jaxrs/jersey1/pom.xml | 2 +- .../org/openapitools/model/OuterNumber.java | 62 --- .../org/openapitools/model/OuterString.java | 62 --- .../java/org/openapitools/api/Bootstrap.java | 2 +- .../jersey1/src/main/webapp/WEB-INF/web.xml | 2 +- .../jersey2-useTags/.openapi-generator-ignore | 4 +- .../petstore/jaxrs/jersey2-useTags/pom.xml | 2 +- .../org/openapitools/model/OuterBoolean.java | 62 --- .../org/openapitools/model/OuterNumber.java | 62 --- .../org/openapitools/model/OuterString.java | 62 --- .../java/org/openapitools/api/Bootstrap.java | 2 +- .../src/main/webapp/WEB-INF/web.xml | 2 +- .../jaxrs/jersey2/.openapi-generator-ignore | 4 +- samples/server/petstore/jaxrs/jersey2/pom.xml | 2 +- .../org/openapitools/model/OuterBoolean.java | 62 --- .../org/openapitools/model/OuterNumber.java | 62 --- .../org/openapitools/model/OuterString.java | 62 --- .../java/org/openapitools/api/Bootstrap.java | 2 +- .../jersey2/src/main/webapp/WEB-INF/web.xml | 2 +- 136 files changed, 6187 insertions(+), 1270 deletions(-) delete mode 100644 samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterBoolean.java delete mode 100644 samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterNumber.java delete mode 100644 samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterString.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/.openapi-generator-ignore create mode 100644 samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION create mode 100644 samples/server/petstore/jaxrs-datelib-j8/README.md create mode 100644 samples/server/petstore/jaxrs-datelib-j8/pom.xml create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiException.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiOriginFilter.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiResponseMessage.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/JacksonJsonProvider.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/LocalDateProvider.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/NotFoundException.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/OffsetDateTimeProvider.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/RFC3339DateFormat.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApiService.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StringUtil.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayTest.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Capitalization.java rename samples/server/petstore/{jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AnimalFarm.java => jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Cat.java} (57%) create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Category.java rename samples/server/petstore/{jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterString.java => jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ClassModel.java} (50%) rename samples/server/petstore/{jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterBoolean.java => jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Client.java} (56%) rename samples/server/petstore/{jaxrs/jersey1/src/gen/java/org/openapitools/model/AnimalFarm.java => jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Dog.java} (58%) create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumArrays.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumClass.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumTest.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FormatTest.java rename samples/server/petstore/{jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterNumber.java => jaxrs-datelib-j8/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java} (51%) create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Model200Response.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ModelApiResponse.java rename samples/server/petstore/{jaxrs/jersey2/src/gen/java/org/openapitools/model/AnimalFarm.java => jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ModelReturn.java} (53%) create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Name.java rename samples/server/petstore/{jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterBoolean.java => jaxrs-datelib-j8/src/gen/java/org/openapitools/model/NumberOnly.java} (52%) create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Order.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterEnum.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Pet.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ReadOnlyFirst.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/SpecialModelName.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Tag.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/User.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/Bootstrap.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/AnotherFakeApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/FakeApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/FakeClassnameTestApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/PetApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/StoreApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/UserApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-datelib-j8/src/main/webapp/WEB-INF/web.xml delete mode 100644 samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java delete mode 100644 samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterBoolean.java delete mode 100644 samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterNumber.java delete mode 100644 samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterString.java delete mode 100644 samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java delete mode 100644 samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterBoolean.java delete mode 100644 samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterNumber.java delete mode 100644 samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterString.java delete mode 100644 samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AnimalFarm.java delete mode 100644 samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterNumber.java delete mode 100644 samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterString.java delete mode 100644 samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterBoolean.java delete mode 100644 samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterNumber.java delete mode 100644 samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterString.java delete mode 100644 samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterBoolean.java delete mode 100644 samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterNumber.java delete mode 100644 samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterString.java diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator-ignore b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator-ignore index 70b88e71039..4886bc8b2e1 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml index 1628371f346..df4bd5d4270 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - io.swagger + org.openapitools cxf-annotated-basepath war cxf-annotated-basepath diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator-ignore b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml index 94292deb437..899e8e5e23c 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml @@ -1,9 +1,9 @@ 4.0.0 - io.swagger - swagger-jaxrs-cxf-cdi-server + org.openapitools + openapi-jaxrs-cxf-cdi-server war - swagger-jaxrs-cxf-cdi-server + openapi-jaxrs-cxf-cdi-server 1.0.0 diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator-ignore b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator-ignore index 70b88e71039..4886bc8b2e1 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml index 3f93d2f926b..31ac6ba1d6a 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - io.swagger + org.openapitools cxf-server-non-spring war cxf-server-non-spring diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator-ignore b/samples/server/petstore/jaxrs-cxf/.openapi-generator-ignore index 70b88e71039..4886bc8b2e1 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-cxf/pom.xml b/samples/server/petstore/jaxrs-cxf/pom.xml index 6d1fab5ec17..e2b8844ff1d 100644 --- a/samples/server/petstore/jaxrs-cxf/pom.xml +++ b/samples/server/petstore/jaxrs-cxf/pom.xml @@ -1,9 +1,9 @@ 4.0.0 - io.swagger - swagger-cxf-server + org.openapitools + openapi-cxf-server war - swagger-cxf-server + openapi-cxf-server This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ 1.0.0 diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index ea7ba3a7d13..00000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.model; - -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class AnimalFarm extends ArrayList { - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterBoolean.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterBoolean.java deleted file mode 100644 index 3ecea6b1c28..00000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterBoolean.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openapitools.model; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OuterBoolean { - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterBoolean {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterNumber.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterNumber.java deleted file mode 100644 index a8ec86ab337..00000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterNumber.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openapitools.model; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OuterNumber { - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterNumber {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterString.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterString.java deleted file mode 100644 index cdafdd02303..00000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterString.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openapitools.model; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OuterString { - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterString {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator-ignore b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION new file mode 100644 index 00000000000..096bf47efe3 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/README.md b/samples/server/petstore/jaxrs-datelib-j8/README.md new file mode 100644 index 00000000000..c5803b176f4 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/README.md @@ -0,0 +1,23 @@ +# Swagger Jersey generated server + +## Overview +This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the +[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This +is an example of building a swagger-enabled JAX-RS server. + +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. + +To run the server, please execute the following: + +``` +mvn clean package jetty:run +``` + +You can then view the swagger listing here: + +``` +http://localhost:80/v2/openapi.json +``` + +Note that if you have configured the `host` to be something other than localhost, the calls through +swagger-ui will be directed to that host and not localhost! \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/pom.xml b/samples/server/petstore/jaxrs-datelib-j8/pom.xml new file mode 100644 index 00000000000..4cbb15f83ee --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/pom.xml @@ -0,0 +1,185 @@ + + 4.0.0 + org.openapitools + openapi-jaxrs-server + jar + openapi-jaxrs-server + 1.0.0 + + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + src/main/java + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + + maven-failsafe-plugin + 2.6 + + + + integration-test + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty-version} + + + / + + target/${project.artifactId}-${project.version} + 8079 + stopit + 10 + + 80 + 60000 + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.9.1 + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + io.swagger + swagger-jersey2-jaxrs + compile + ${swagger-core-version} + + + ch.qos.logback + logback-classic + ${logback-version} + compile + + + ch.qos.logback + logback-core + ${logback-version} + compile + + + junit + junit + ${junit-version} + test + + + javax.servlet + servlet-api + ${servlet-api-version} + + + org.glassfish.jersey.containers + jersey-container-servlet-core + ${jersey2-version} + + + org.glassfish.jersey.media + jersey-media-multipart + ${jersey2-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson-version} + + + + com.brsanthu + migbase64 + 2.2 + + + + + + javax.validation + validation-api + 1.1.0.Final + provided + + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 1.8 + ${java.version} + ${java.version} + 1.5.18 + 9.2.9.v20150224 + 2.22.2 + 2.8.9 + 4.12 + 1.1.7 + 2.5 + UTF-8 + + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java new file mode 100644 index 00000000000..042f91ddfa9 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -0,0 +1,69 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.AnotherFakeApiService; +import org.openapitools.api.factories.AnotherFakeApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import org.openapitools.model.Client; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/another-fake") + + +@io.swagger.annotations.Api(description = "the another-fake API") + +public class AnotherFakeApi { + private final AnotherFakeApiService delegate; + + public AnotherFakeApi(@Context ServletConfig servletContext) { + AnotherFakeApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("AnotherFakeApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (AnotherFakeApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = AnotherFakeApiServiceFactory.getAnotherFakeApi(); + } + + this.delegate = delegate; + } + + @PATCH + @Path("/dummy") + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags", response = Client.class, tags={ "$another-fake?", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + public Response testSpecialTags(@ApiParam(value = "client model" ,required=true) Client client +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testSpecialTags(client,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java new file mode 100644 index 00000000000..d8df665e2a6 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -0,0 +1,21 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import org.openapitools.model.Client; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public abstract class AnotherFakeApiService { + public abstract Response testSpecialTags(Client client,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiException.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiException.java new file mode 100644 index 00000000000..fdbaeee3a29 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiException.java @@ -0,0 +1,10 @@ +package org.openapitools.api; + + +public class ApiException extends Exception{ + private int code; + public ApiException (int code, String msg) { + super(msg); + this.code = code; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiOriginFilter.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiOriginFilter.java new file mode 100644 index 00000000000..7039b5e4d92 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiOriginFilter.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import java.io.IOException; + +import javax.servlet.*; +import javax.servlet.http.HttpServletResponse; + + +public class ApiOriginFilter implements javax.servlet.Filter { + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } + + public void destroy() {} + + public void init(FilterConfig filterConfig) throws ServletException {} +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiResponseMessage.java new file mode 100644 index 00000000000..9211b2dd7e5 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/ApiResponseMessage.java @@ -0,0 +1,69 @@ +package org.openapitools.api; + +import javax.xml.bind.annotation.XmlTransient; + +@javax.xml.bind.annotation.XmlRootElement + +public class ApiResponseMessage { + public static final int ERROR = 1; + public static final int WARNING = 2; + public static final int INFO = 3; + public static final int OK = 4; + public static final int TOO_BUSY = 5; + + int code; + String type; + String message; + + public ApiResponseMessage(){} + + public ApiResponseMessage(int code, String message){ + this.code = code; + switch(code){ + case ERROR: + setType("error"); + break; + case WARNING: + setType("warning"); + break; + case INFO: + setType("info"); + break; + case OK: + setType("ok"); + break; + case TOO_BUSY: + setType("too busy"); + break; + default: + setType("unknown"); + break; + } + this.message = message; + } + + @XmlTransient + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java new file mode 100644 index 00000000000..b29003160b0 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java @@ -0,0 +1,214 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.FakeApiService; +import org.openapitools.api.factories.FakeApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import java.io.File; +import java.time.LocalDate; +import java.util.Map; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/fake") + + +@io.swagger.annotations.Api(description = "the fake API") + +public class FakeApi { + private final FakeApiService delegate; + + public FakeApi(@Context ServletConfig servletContext) { + FakeApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("FakeApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (FakeApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = FakeApiServiceFactory.getFakeApi(); + } + + this.delegate = delegate; + } + + @POST + @Path("/outer/boolean") + + @Produces({ "*/*" }) + @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) + public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean booleanPostBody +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.fakeOuterBooleanSerialize(booleanPostBody,securityContext); + } + @POST + @Path("/outer/composite") + + @Produces({ "*/*" }) + @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) + public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) OuterComposite outerComposite +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.fakeOuterCompositeSerialize(outerComposite,securityContext); + } + @POST + @Path("/outer/number") + + @Produces({ "*/*" }) + @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) + public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.fakeOuterNumberSerialize(body,securityContext); + } + @POST + @Path("/outer/string") + + @Produces({ "*/*" }) + @io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) }) + public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.fakeOuterStringSerialize(body,securityContext); + } + @PUT + @Path("/body-with-query-params") + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "", notes = "", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) }) + public Response testBodyWithQueryParams(@ApiParam(value = "",required=true) @QueryParam("query") String query +,@ApiParam(value = "" ,required=true) User user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testBodyWithQueryParams(query,user,securityContext); + } + @PATCH + + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + public Response testClientModel(@ApiParam(value = "client model" ,required=true) Client client +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testClientModel(client,securityContext); + } + @POST + + @Consumes({ "application/x-www-form-urlencoded" }) + + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "http_basic_test") + }, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number +,@ApiParam(value = "None", required=true) @FormParam("double") Double _double +,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter +,@ApiParam(value = "None", required=true) @FormParam("byte") byte[] _byte +,@ApiParam(value = "None", allowableValues="range=[10, 100]") @FormParam("integer") Integer integer +,@ApiParam(value = "None", allowableValues="range=[20, 200]") @FormParam("int32") Integer int32 +,@ApiParam(value = "None") @FormParam("int64") Long int64 +,@ApiParam(value = "None") @FormParam("float") Float _float +,@ApiParam(value = "None") @FormParam("string") String string +, + @FormDataParam("binary") InputStream binaryInputStream, + @FormDataParam("binary") FormDataContentDisposition binaryDetail +,@ApiParam(value = "None") @FormParam("date") LocalDate date +,@ApiParam(value = "None") @FormParam("dateTime") OffsetDateTime dateTime +,@ApiParam(value = "None") @FormParam("password") String password +,@ApiParam(value = "None") @FormParam("callback") String paramCallback +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binaryInputStream, binaryDetail,date,dateTime,password,paramCallback,securityContext); + } + @GET + + @Consumes({ "application/x-www-form-urlencoded" }) + + @io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = Void.class) }) + public Response testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List enumHeaderStringArray +,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString +,@ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $") @QueryParam("enum_query_string_array") List enumQueryStringArray +,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger +,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble +,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List enumFormStringArray +,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)") @FormParam("enum_form_string") String enumFormString +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testEnumParameters(enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,enumFormStringArray,enumFormString,securityContext); + } + @POST + @Path("/inline-additionalProperties") + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) String requestBody +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testInlineAdditionalProperties(requestBody,securityContext); + } + @GET + @Path("/jsonFormData") + @Consumes({ "application/x-www-form-urlencoded" }) + + @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response testJsonFormData(@ApiParam(value = "field1", required=true) @FormParam("param") String param +,@ApiParam(value = "field2", required=true) @FormParam("param2") String param2 +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testJsonFormData(param,param2,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java new file mode 100644 index 00000000000..1f6f99464a6 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java @@ -0,0 +1,37 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import java.io.File; +import java.time.LocalDate; +import java.util.Map; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public abstract class FakeApiService { + public abstract Response fakeOuterBooleanSerialize(Boolean booleanPostBody,SecurityContext securityContext) throws NotFoundException; + public abstract Response fakeOuterCompositeSerialize(OuterComposite outerComposite,SecurityContext securityContext) throws NotFoundException; + public abstract Response fakeOuterNumberSerialize(BigDecimal body,SecurityContext securityContext) throws NotFoundException; + public abstract Response fakeOuterStringSerialize(String body,SecurityContext securityContext) throws NotFoundException; + public abstract Response testBodyWithQueryParams( @NotNull String query,User user,SecurityContext securityContext) throws NotFoundException; + public abstract Response testClientModel(Client client,SecurityContext securityContext) throws NotFoundException; + public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,InputStream binaryInputStream, FormDataContentDisposition binaryDetail,LocalDate date,OffsetDateTime dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; + public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException; + public abstract Response testInlineAdditionalProperties(String requestBody,SecurityContext securityContext) throws NotFoundException; + public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java new file mode 100644 index 00000000000..26f71f89a8d --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -0,0 +1,71 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.FakeClassnameTestApiService; +import org.openapitools.api.factories.FakeClassnameTestApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import org.openapitools.model.Client; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/fake_classname_test") + + +@io.swagger.annotations.Api(description = "the fake_classname_test API") + +public class FakeClassnameTestApi { + private final FakeClassnameTestApiService delegate; + + public FakeClassnameTestApi(@Context ServletConfig servletContext) { + FakeClassnameTestApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("FakeClassnameTestApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (FakeClassnameTestApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = FakeClassnameTestApiServiceFactory.getFakeClassnameTestApi(); + } + + this.delegate = delegate; + } + + @PATCH + + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", response = Client.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key_query") + }, tags={ "fake_classname_tags 123#$%^", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + public Response testClassname(@ApiParam(value = "client model" ,required=true) Client client +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testClassname(client,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java new file mode 100644 index 00000000000..d5c2d43a43d --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApiService.java @@ -0,0 +1,21 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import org.openapitools.model.Client; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public abstract class FakeClassnameTestApiService { + public abstract Response testClassname(Client client,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/JacksonJsonProvider.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/JacksonJsonProvider.java new file mode 100644 index 00000000000..adf25aec2c6 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/JacksonJsonProvider.java @@ -0,0 +1,29 @@ +package org.openapitools.api; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + +import com.fasterxml.jackson.datatype.jsr310.*; + +import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; + +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.ext.Provider; + +@Provider +@Produces({MediaType.APPLICATION_JSON}) +public class JacksonJsonProvider extends JacksonJaxbJsonProvider { + + public JacksonJsonProvider() { + + ObjectMapper objectMapper = new ObjectMapper() + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .registerModule(new JavaTimeModule()) + .setDateFormat(new RFC3339DateFormat()); + + setMapper(objectMapper); + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/LocalDateProvider.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/LocalDateProvider.java new file mode 100644 index 00000000000..063da97f949 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/LocalDateProvider.java @@ -0,0 +1,28 @@ +package org.openapitools.api; + +import javax.ws.rs.ext.ParamConverter; +import javax.ws.rs.ext.ParamConverterProvider; +import javax.ws.rs.ext.Provider; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.time.LocalDate; + +@Provider +public class LocalDateProvider implements ParamConverterProvider { + + public ParamConverter getConverter(Class clazz, Type type, Annotation[] annotations) { + if (clazz.getName().equals(LocalDate.class.getName())) { + return new ParamConverter() { + @SuppressWarnings("unchecked") + public T fromString(String value) { + return value!=null ? (T) LocalDate.parse(value) : null; + } + + public String toString(T bean) { + return bean!=null ? bean.toString() : ""; + } + }; + } + return null; + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/NotFoundException.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/NotFoundException.java new file mode 100644 index 00000000000..526df6c1c19 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/NotFoundException.java @@ -0,0 +1,10 @@ +package org.openapitools.api; + + +public class NotFoundException extends ApiException { + private int code; + public NotFoundException (int code, String msg) { + super(code, msg); + this.code = code; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/OffsetDateTimeProvider.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/OffsetDateTimeProvider.java new file mode 100644 index 00000000000..d4105c5a829 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/OffsetDateTimeProvider.java @@ -0,0 +1,28 @@ +package org.openapitools.api; + +import javax.ws.rs.ext.ParamConverter; +import javax.ws.rs.ext.ParamConverterProvider; +import javax.ws.rs.ext.Provider; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.time.OffsetDateTime; + +@Provider +public class OffsetDateTimeProvider implements ParamConverterProvider { + + public ParamConverter getConverter(Class clazz, Type type, Annotation[] annotations) { + if (clazz.getName().equals(OffsetDateTime.class.getName())) { + return new ParamConverter() { + @SuppressWarnings("unchecked") + public T fromString(String value) { + return value != null ? (T) OffsetDateTime.parse(value) : null; + } + + public String toString(T bean) { + return bean != null ? bean.toString() : ""; + } + }; + } + return null; + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java new file mode 100644 index 00000000000..6a324b6e7a3 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java @@ -0,0 +1,211 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.PetApiService; +import org.openapitools.api.factories.PetApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import java.io.File; +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/pet") + + +@io.swagger.annotations.Api(description = "the pet API") + +public class PetApi { + private final PetApiService delegate; + + public PetApi(@Context ServletConfig servletContext) { + PetApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("PetApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (PetApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = PetApiServiceFactory.getPetApi(); + } + + this.delegate = delegate; + } + + @POST + + @Consumes({ "application/json", "application/xml" }) + + @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) + public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.addPet(pet,securityContext); + } + @DELETE + @Path("/{petId}") + + + @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) + public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.deletePet(petId,apiKey,securityContext); + } + @GET + @Path("/findByStatus") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) + public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List status +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.findPetsByStatus(status,securityContext); + } + @GET + @Path("/findByTags") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) + public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.findPetsByTags(tags,securityContext); + } + @GET + @Path("/{petId}") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) + public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.getPetById(petId,securityContext); + } + @PUT + + @Consumes({ "application/json", "application/xml" }) + + @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) + public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.updatePet(pet,securityContext); + } + @POST + @Path("/{petId}") + @Consumes({ "application/x-www-form-urlencoded" }) + + @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name +,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.updatePetWithForm(petId,name,status,securityContext); + } + @POST + @Path("/{petId}/uploadImage") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java new file mode 100644 index 00000000000..ebd89ee5c3a --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java @@ -0,0 +1,30 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import java.io.File; +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public abstract class PetApiService { + public abstract Response addPet(Pet pet,SecurityContext securityContext) throws NotFoundException; + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByStatus( @NotNull List status,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByTags( @NotNull List tags,SecurityContext securityContext) throws NotFoundException; + public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/RFC3339DateFormat.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/RFC3339DateFormat.java new file mode 100644 index 00000000000..b471837701d --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/RFC3339DateFormat.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import com.fasterxml.jackson.databind.util.ISO8601DateFormat; +import com.fasterxml.jackson.databind.util.ISO8601Utils; + +import java.text.FieldPosition; +import java.util.Date; + +public class RFC3339DateFormat extends ISO8601DateFormat { + + // Same as ISO8601DateFormat but serializing milliseconds. + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + String value = ISO8601Utils.format(date, true); + toAppendTo.append(value); + return toAppendTo; + } + +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java new file mode 100644 index 00000000000..af9eab63453 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,115 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.StoreApiService; +import org.openapitools.api.factories.StoreApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import java.util.Map; +import org.openapitools.model.Order; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/store") + + +@io.swagger.annotations.Api(description = "the store API") + +public class StoreApi { + private final StoreApiService delegate; + + public StoreApi(@Context ServletConfig servletContext) { + StoreApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("StoreApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (StoreApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = StoreApiServiceFactory.getStoreApi(); + } + + this.delegate = delegate; + } + + @DELETE + @Path("/order/{order_id}") + + + @io.swagger.annotations.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", response = Void.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("order_id") String orderId +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.deleteOrder(orderId,securityContext); + } + @GET + @Path("/inventory") + + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") + }, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + public Response getInventory(@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.getInventory(securityContext); + } + @GET + @Path("/order/{order_id}") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true, allowableValues="range=[1, 5]") @PathParam("order_id") Long orderId +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.getOrderById(orderId,securityContext); + } + @POST + @Path("/order") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) + public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order order +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.placeOrder(order,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApiService.java new file mode 100644 index 00000000000..47440abc132 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApiService.java @@ -0,0 +1,25 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import java.util.Map; +import org.openapitools.model.Order; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public abstract class StoreApiService { + public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; + public abstract Response getOrderById( @Min(1L) @Max(5L)Long orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response placeOrder(Order order,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StringUtil.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StringUtil.java new file mode 100644 index 00000000000..36728355897 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StringUtil.java @@ -0,0 +1,42 @@ +package org.openapitools.api; + + +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) return true; + if (value != null && value.equalsIgnoreCase(str)) return true; + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) return ""; + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java new file mode 100644 index 00000000000..bdc79d307f6 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java @@ -0,0 +1,165 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.UserApiService; +import org.openapitools.api.factories.UserApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import java.util.List; +import org.openapitools.model.User; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/user") + + +@io.swagger.annotations.Api(description = "the user API") + +public class UserApi { + private final UserApiService delegate; + + public UserApi(@Context ServletConfig servletContext) { + UserApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("UserApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (UserApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = UserApiServiceFactory.getUserApi(); + } + + this.delegate = delegate; + } + + @POST + + + + @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUser(@ApiParam(value = "Created user object" ,required=true) User user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.createUser(user,securityContext); + } + @POST + @Path("/createWithArray") + + + @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.createUsersWithArrayInput(user,securityContext); + } + @POST + @Path("/createWithList") + + + @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.createUsersWithListInput(user,securityContext); + } + @DELETE + @Path("/{username}") + + + @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.deleteUser(username,securityContext); + } + @GET + @Path("/{username}") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.getUserByName(username,securityContext); + } + @GET + @Path("/login") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) + public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username +,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.loginUser(username,password,securityContext); + } + @GET + @Path("/logout") + + + @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response logoutUser(@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.logoutUser(securityContext); + } + @PUT + @Path("/{username}") + + + @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username +,@ApiParam(value = "Updated user object" ,required=true) User user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.updateUser(username,user,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java new file mode 100644 index 00000000000..ce18fdbf88c --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java @@ -0,0 +1,29 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import java.util.List; +import org.openapitools.model.User; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public abstract class UserApiService { + public abstract Response createUser(User user,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List user,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List user,SecurityContext securityContext) throws NotFoundException; + public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; + public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; + public abstract Response loginUser( @NotNull String username, @NotNull String password,SecurityContext securityContext) throws NotFoundException; + public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException; + public abstract Response updateUser(String username,User user,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java new file mode 100644 index 00000000000..2d2afc62939 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -0,0 +1,134 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * AdditionalPropertiesClass + */ + +public class AdditionalPropertiesClass implements Serializable { + @JsonProperty("map_property") + private Map mapProperty = null; + + @JsonProperty("map_of_map_property") + private Map> mapOfMapProperty = null; + + public AdditionalPropertiesClass mapProperty(Map mapProperty) { + this.mapProperty = mapProperty; + return this; + } + + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); + } + this.mapProperty.put(key, mapPropertyItem); + return this; + } + + /** + * Get mapProperty + * @return mapProperty + **/ + @JsonProperty("map_property") + @ApiModelProperty(value = "") + public Map getMapProperty() { + return mapProperty; + } + + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; + } + + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; + return this; + } + + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); + } + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); + return this; + } + + /** + * Get mapOfMapProperty + * @return mapOfMapProperty + **/ + @JsonProperty("map_of_map_property") + @ApiModelProperty(value = "") + public Map> getMapOfMapProperty() { + return mapOfMapProperty; + } + + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); + } + + @Override + public int hashCode() { + return Objects.hash(mapProperty, mapOfMapProperty); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdditionalPropertiesClass {\n"); + + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java new file mode 100644 index 00000000000..871c161344b --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java @@ -0,0 +1,118 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +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.*; + +/** + * Animal + */ + +public class Animal implements Serializable { + @JsonProperty("className") + private String className = null; + + @JsonProperty("color") + private String color = "red"; + + public Animal className(String className) { + this.className = className; + return this; + } + + /** + * Get className + * @return className + **/ + @JsonProperty("className") + @ApiModelProperty(required = true, value = "") + @NotNull + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public Animal color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @JsonProperty("color") + @ApiModelProperty(value = "") + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java new file mode 100644 index 00000000000..2a88788cd68 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -0,0 +1,102 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * ArrayOfArrayOfNumberOnly + */ + +public class ArrayOfArrayOfNumberOnly implements Serializable { + @JsonProperty("ArrayArrayNumber") + private List> arrayArrayNumber = null; + + public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + return this; + } + + public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { + if (this.arrayArrayNumber == null) { + this.arrayArrayNumber = new ArrayList<>(); + } + this.arrayArrayNumber.add(arrayArrayNumberItem); + return this; + } + + /** + * Get arrayArrayNumber + * @return arrayArrayNumber + **/ + @JsonProperty("ArrayArrayNumber") + @ApiModelProperty(value = "") + public List> getArrayArrayNumber() { + return arrayArrayNumber; + } + + public void setArrayArrayNumber(List> arrayArrayNumber) { + this.arrayArrayNumber = arrayArrayNumber; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java new file mode 100644 index 00000000000..1441895b9e4 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -0,0 +1,102 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * ArrayOfNumberOnly + */ + +public class ArrayOfNumberOnly implements Serializable { + @JsonProperty("ArrayNumber") + private List arrayNumber = null; + + public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + return this; + } + + public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { + if (this.arrayNumber == null) { + this.arrayNumber = new ArrayList<>(); + } + this.arrayNumber.add(arrayNumberItem); + return this; + } + + /** + * Get arrayNumber + * @return arrayNumber + **/ + @JsonProperty("ArrayNumber") + @ApiModelProperty(value = "") + public List getArrayNumber() { + return arrayNumber; + } + + public void setArrayNumber(List arrayNumber) { + this.arrayNumber = arrayNumber; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayTest.java new file mode 100644 index 00000000000..176fb5a7203 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ArrayTest.java @@ -0,0 +1,166 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.ReadOnlyFirst; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * ArrayTest + */ + +public class ArrayTest implements Serializable { + @JsonProperty("array_of_string") + private List arrayOfString = null; + + @JsonProperty("array_array_of_integer") + private List> arrayArrayOfInteger = null; + + @JsonProperty("array_array_of_model") + private List> arrayArrayOfModel = null; + + public ArrayTest arrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + return this; + } + + public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { + if (this.arrayOfString == null) { + this.arrayOfString = new ArrayList<>(); + } + this.arrayOfString.add(arrayOfStringItem); + return this; + } + + /** + * Get arrayOfString + * @return arrayOfString + **/ + @JsonProperty("array_of_string") + @ApiModelProperty(value = "") + public List getArrayOfString() { + return arrayOfString; + } + + public void setArrayOfString(List arrayOfString) { + this.arrayOfString = arrayOfString; + } + + public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + return this; + } + + public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { + if (this.arrayArrayOfInteger == null) { + this.arrayArrayOfInteger = new ArrayList<>(); + } + this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); + return this; + } + + /** + * Get arrayArrayOfInteger + * @return arrayArrayOfInteger + **/ + @JsonProperty("array_array_of_integer") + @ApiModelProperty(value = "") + public List> getArrayArrayOfInteger() { + return arrayArrayOfInteger; + } + + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + this.arrayArrayOfInteger = arrayArrayOfInteger; + } + + public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + return this; + } + + public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { + if (this.arrayArrayOfModel == null) { + this.arrayArrayOfModel = new ArrayList<>(); + } + this.arrayArrayOfModel.add(arrayArrayOfModelItem); + return this; + } + + /** + * Get arrayArrayOfModel + * @return arrayArrayOfModel + **/ + @JsonProperty("array_array_of_model") + @ApiModelProperty(value = "") + public List> getArrayArrayOfModel() { + return arrayArrayOfModel; + } + + public void setArrayArrayOfModel(List> arrayArrayOfModel) { + this.arrayArrayOfModel = arrayArrayOfModel; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Capitalization.java new file mode 100644 index 00000000000..de8f332c124 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Capitalization.java @@ -0,0 +1,211 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * Capitalization + */ + +public class Capitalization implements Serializable { + @JsonProperty("smallCamel") + private String smallCamel = null; + + @JsonProperty("CapitalCamel") + private String capitalCamel = null; + + @JsonProperty("small_Snake") + private String smallSnake = null; + + @JsonProperty("Capital_Snake") + private String capitalSnake = null; + + @JsonProperty("SCA_ETH_Flow_Points") + private String scAETHFlowPoints = null; + + @JsonProperty("ATT_NAME") + private String ATT_NAME = null; + + public Capitalization smallCamel(String smallCamel) { + this.smallCamel = smallCamel; + return this; + } + + /** + * Get smallCamel + * @return smallCamel + **/ + @JsonProperty("smallCamel") + @ApiModelProperty(value = "") + public String getSmallCamel() { + return smallCamel; + } + + public void setSmallCamel(String smallCamel) { + this.smallCamel = smallCamel; + } + + public Capitalization capitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + return this; + } + + /** + * Get capitalCamel + * @return capitalCamel + **/ + @JsonProperty("CapitalCamel") + @ApiModelProperty(value = "") + public String getCapitalCamel() { + return capitalCamel; + } + + public void setCapitalCamel(String capitalCamel) { + this.capitalCamel = capitalCamel; + } + + public Capitalization smallSnake(String smallSnake) { + this.smallSnake = smallSnake; + return this; + } + + /** + * Get smallSnake + * @return smallSnake + **/ + @JsonProperty("small_Snake") + @ApiModelProperty(value = "") + public String getSmallSnake() { + return smallSnake; + } + + public void setSmallSnake(String smallSnake) { + this.smallSnake = smallSnake; + } + + public Capitalization capitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + return this; + } + + /** + * Get capitalSnake + * @return capitalSnake + **/ + @JsonProperty("Capital_Snake") + @ApiModelProperty(value = "") + public String getCapitalSnake() { + return capitalSnake; + } + + public void setCapitalSnake(String capitalSnake) { + this.capitalSnake = capitalSnake; + } + + public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + return this; + } + + /** + * Get scAETHFlowPoints + * @return scAETHFlowPoints + **/ + @JsonProperty("SCA_ETH_Flow_Points") + @ApiModelProperty(value = "") + public String getScAETHFlowPoints() { + return scAETHFlowPoints; + } + + public void setScAETHFlowPoints(String scAETHFlowPoints) { + this.scAETHFlowPoints = scAETHFlowPoints; + } + + public Capitalization ATT_NAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + return this; + } + + /** + * Name of the pet + * @return ATT_NAME + **/ + @JsonProperty("ATT_NAME") + @ApiModelProperty(value = "Name of the pet ") + public String getATTNAME() { + return ATT_NAME; + } + + public void setATTNAME(String ATT_NAME) { + this.ATT_NAME = ATT_NAME; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Cat.java similarity index 57% rename from samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AnimalFarm.java rename to samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Cat.java index e29e13f23d9..a9117d5b98d 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Cat.java @@ -14,16 +14,41 @@ package org.openapitools.model; import java.util.Objects; -import java.util.ArrayList; -import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import java.io.Serializable; import javax.validation.constraints.*; /** - * AnimalFarm + * Cat */ -public class AnimalFarm extends ArrayList { +public class Cat extends Animal implements Serializable { + @JsonProperty("declawed") + private Boolean declawed = null; + + public Cat declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + /** + * Get declawed + * @return declawed + **/ + @JsonProperty("declawed") + @ApiModelProperty(value = "") + public Boolean isDeclawed() { + return declawed; + } + + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + @Override public boolean equals(java.lang.Object o) { @@ -33,20 +58,23 @@ public class AnimalFarm extends ArrayList { if (o == null || getClass() != o.getClass()) { return false; } - return true; + Cat cat = (Cat) o; + return Objects.equals(this.declawed, cat.declawed) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(declawed, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); + 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(); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Category.java new file mode 100644 index 00000000000..407628d3e5c --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Category.java @@ -0,0 +1,115 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * Category + */ + +public class Category implements Serializable { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("name") + private String name = null; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + + sb.append(" id: ").append(toIndentedString(id)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterString.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ClassModel.java similarity index 50% rename from samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterString.java rename to samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ClassModel.java index f003e4d574d..64fe231da91 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterString.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ClassModel.java @@ -14,13 +14,41 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; import javax.validation.constraints.*; /** - * OuterString + * Model for testing model with \"_class\" property */ +@ApiModel(description = "Model for testing model with \"_class\" property") + +public class ClassModel implements Serializable { + @JsonProperty("_class") + private String propertyClass = null; + + public ClassModel propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + **/ + @JsonProperty("_class") + @ApiModelProperty(value = "") + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } -public class OuterString { @Override public boolean equals(java.lang.Object o) { @@ -30,20 +58,22 @@ public class OuterString { if (o == null || getClass() != o.getClass()) { return false; } - return true; + ClassModel classModel = (ClassModel) o; + return Objects.equals(this.propertyClass, classModel.propertyClass); } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(propertyClass); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OuterString {\n"); + sb.append("class ClassModel {\n"); + sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterBoolean.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Client.java similarity index 56% rename from samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterBoolean.java rename to samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Client.java index 7be7947b705..211287d2aab 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterBoolean.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Client.java @@ -14,13 +14,40 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; import javax.validation.constraints.*; /** - * OuterBoolean + * Client */ -public class OuterBoolean { +public class Client implements Serializable { + @JsonProperty("client") + private String client = null; + + public Client client(String client) { + this.client = client; + return this; + } + + /** + * Get client + * @return client + **/ + @JsonProperty("client") + @ApiModelProperty(value = "") + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + @Override public boolean equals(java.lang.Object o) { @@ -30,20 +57,22 @@ public class OuterBoolean { if (o == null || getClass() != o.getClass()) { return false; } - return true; + Client client = (Client) o; + return Objects.equals(this.client, client.client); } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(client); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OuterBoolean {\n"); + sb.append("class Client {\n"); + sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Dog.java similarity index 58% rename from samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AnimalFarm.java rename to samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Dog.java index e29e13f23d9..c11e22a45bf 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Dog.java @@ -14,16 +14,41 @@ package org.openapitools.model; import java.util.Objects; -import java.util.ArrayList; -import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; +import java.io.Serializable; import javax.validation.constraints.*; /** - * AnimalFarm + * Dog */ -public class AnimalFarm extends ArrayList { +public class Dog extends Animal implements Serializable { + @JsonProperty("breed") + private String breed = null; + + public Dog breed(String breed) { + this.breed = breed; + return this; + } + + /** + * Get breed + * @return breed + **/ + @JsonProperty("breed") + @ApiModelProperty(value = "") + public String getBreed() { + return breed; + } + + public void setBreed(String breed) { + this.breed = breed; + } + @Override public boolean equals(java.lang.Object o) { @@ -33,20 +58,23 @@ public class AnimalFarm extends ArrayList { if (o == null || getClass() != o.getClass()) { return false; } - return true; + Dog dog = (Dog) o; + return Objects.equals(this.breed, dog.breed) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(breed, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); + 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(); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumArrays.java new file mode 100644 index 00000000000..e0646da6f98 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumArrays.java @@ -0,0 +1,188 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * EnumArrays + */ + +public class EnumArrays implements Serializable { + /** + * Gets or Sets justSymbol + */ + public enum JustSymbolEnum { + GREATER_THAN_OR_EQUAL_TO(">="), + + DOLLAR("$"); + + private String value; + + JustSymbolEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static JustSymbolEnum fromValue(String text) { + for (JustSymbolEnum b : JustSymbolEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("just_symbol") + private JustSymbolEnum justSymbol = null; + + /** + * Gets or Sets arrayEnum + */ + public enum ArrayEnumEnum { + FISH("fish"), + + CRAB("crab"); + + private String value; + + ArrayEnumEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String text) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("array_enum") + private List arrayEnum = null; + + public EnumArrays justSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + return this; + } + + /** + * Get justSymbol + * @return justSymbol + **/ + @JsonProperty("just_symbol") + @ApiModelProperty(value = "") + public JustSymbolEnum getJustSymbol() { + return justSymbol; + } + + public void setJustSymbol(JustSymbolEnum justSymbol) { + this.justSymbol = justSymbol; + } + + public EnumArrays arrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + return this; + } + + public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { + if (this.arrayEnum == null) { + this.arrayEnum = new ArrayList<>(); + } + this.arrayEnum.add(arrayEnumItem); + return this; + } + + /** + * Get arrayEnum + * @return arrayEnum + **/ + @JsonProperty("array_enum") + @ApiModelProperty(value = "") + public List getArrayEnum() { + return arrayEnum; + } + + public void setArrayEnum(List arrayEnum) { + this.arrayEnum = arrayEnum; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumClass.java new file mode 100644 index 00000000000..a495eee0629 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumClass.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import java.io.Serializable; +import javax.validation.constraints.*; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Gets or Sets EnumClass + */ +public enum EnumClass { + + _ABC("_abc"), + + _EFG("-efg"), + + _XYZ_("(xyz)"); + + private String value; + + EnumClass(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumClass fromValue(String text) { + for (EnumClass b : EnumClass.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumTest.java new file mode 100644 index 00000000000..25e2cca2b1a --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/EnumTest.java @@ -0,0 +1,318 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.OuterEnum; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * EnumTest + */ + +public class EnumTest implements Serializable { + /** + * Gets or Sets enumString + */ + public enum EnumStringEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringEnum fromValue(String text) { + for (EnumStringEnum b : EnumStringEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("enum_string") + private EnumStringEnum enumString = null; + + /** + * Gets or Sets enumStringRequired + */ + public enum EnumStringRequiredEnum { + UPPER("UPPER"), + + LOWER("lower"), + + EMPTY(""); + + private String value; + + EnumStringRequiredEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumStringRequiredEnum fromValue(String text) { + for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("enum_string_required") + private EnumStringRequiredEnum enumStringRequired = null; + + /** + * Gets or Sets enumInteger + */ + public enum EnumIntegerEnum { + NUMBER_1(1), + + NUMBER_MINUS_1(-1); + + private Integer value; + + EnumIntegerEnum(Integer value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumIntegerEnum fromValue(String text) { + for (EnumIntegerEnum b : EnumIntegerEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("enum_integer") + private EnumIntegerEnum enumInteger = null; + + /** + * Gets or Sets enumNumber + */ + public enum EnumNumberEnum { + NUMBER_1_DOT_1(1.1), + + NUMBER_MINUS_1_DOT_2(-1.2); + + private Double value; + + EnumNumberEnum(Double value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumNumberEnum fromValue(String text) { + for (EnumNumberEnum b : EnumNumberEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("enum_number") + private EnumNumberEnum enumNumber = null; + + @JsonProperty("outerEnum") + private OuterEnum outerEnum = null; + + public EnumTest enumString(EnumStringEnum enumString) { + this.enumString = enumString; + return this; + } + + /** + * Get enumString + * @return enumString + **/ + @JsonProperty("enum_string") + @ApiModelProperty(value = "") + public EnumStringEnum getEnumString() { + return enumString; + } + + public void setEnumString(EnumStringEnum enumString) { + this.enumString = enumString; + } + + public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + return this; + } + + /** + * Get enumStringRequired + * @return enumStringRequired + **/ + @JsonProperty("enum_string_required") + @ApiModelProperty(required = true, value = "") + @NotNull + public EnumStringRequiredEnum getEnumStringRequired() { + return enumStringRequired; + } + + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + + public EnumTest enumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + return this; + } + + /** + * Get enumInteger + * @return enumInteger + **/ + @JsonProperty("enum_integer") + @ApiModelProperty(value = "") + public EnumIntegerEnum getEnumInteger() { + return enumInteger; + } + + public void setEnumInteger(EnumIntegerEnum enumInteger) { + this.enumInteger = enumInteger; + } + + public EnumTest enumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + return this; + } + + /** + * Get enumNumber + * @return enumNumber + **/ + @JsonProperty("enum_number") + @ApiModelProperty(value = "") + public EnumNumberEnum getEnumNumber() { + return enumNumber; + } + + public void setEnumNumber(EnumNumberEnum enumNumber) { + this.enumNumber = enumNumber; + } + + public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + return this; + } + + /** + * Get outerEnum + * @return outerEnum + **/ + @JsonProperty("outerEnum") + @ApiModelProperty(value = "") + public OuterEnum getOuterEnum() { + return outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = outerEnum; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FormatTest.java new file mode 100644 index 00000000000..2fd7d36e9cf --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FormatTest.java @@ -0,0 +1,398 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.File; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * FormatTest + */ + +public class FormatTest implements Serializable { + @JsonProperty("integer") + private Integer integer = null; + + @JsonProperty("int32") + private Integer int32 = null; + + @JsonProperty("int64") + private Long int64 = null; + + @JsonProperty("number") + private BigDecimal number = null; + + @JsonProperty("float") + private Float _float = null; + + @JsonProperty("double") + private Double _double = null; + + @JsonProperty("string") + private String string = null; + + @JsonProperty("byte") + private byte[] _byte = null; + + @JsonProperty("binary") + private File binary = null; + + @JsonProperty("date") + private LocalDate date = null; + + @JsonProperty("dateTime") + private OffsetDateTime dateTime = null; + + @JsonProperty("uuid") + private UUID uuid = null; + + @JsonProperty("password") + private String password = null; + + public FormatTest integer(Integer integer) { + this.integer = integer; + return this; + } + + /** + * Get integer + * minimum: 10 + * maximum: 100 + * @return integer + **/ + @JsonProperty("integer") + @ApiModelProperty(value = "") + @Min(10) @Max(100) public Integer getInteger() { + return integer; + } + + public void setInteger(Integer integer) { + this.integer = integer; + } + + public FormatTest int32(Integer int32) { + this.int32 = int32; + return this; + } + + /** + * Get int32 + * minimum: 20 + * maximum: 200 + * @return int32 + **/ + @JsonProperty("int32") + @ApiModelProperty(value = "") + @Min(20) @Max(200) public Integer getInt32() { + return int32; + } + + public void setInt32(Integer int32) { + this.int32 = int32; + } + + public FormatTest int64(Long int64) { + this.int64 = int64; + return this; + } + + /** + * Get int64 + * @return int64 + **/ + @JsonProperty("int64") + @ApiModelProperty(value = "") + public Long getInt64() { + return int64; + } + + public void setInt64(Long int64) { + this.int64 = int64; + } + + public FormatTest number(BigDecimal number) { + this.number = number; + return this; + } + + /** + * Get number + * minimum: 32.1 + * maximum: 543.2 + * @return number + **/ + @JsonProperty("number") + @ApiModelProperty(required = true, value = "") + @NotNull + @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { + return number; + } + + public void setNumber(BigDecimal number) { + this.number = number; + } + + public FormatTest _float(Float _float) { + this._float = _float; + return this; + } + + /** + * Get _float + * minimum: 54.3 + * maximum: 987.6 + * @return _float + **/ + @JsonProperty("float") + @ApiModelProperty(value = "") + @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { + return _float; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public FormatTest _double(Double _double) { + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 67.8 + * maximum: 123.4 + * @return _double + **/ + @JsonProperty("double") + @ApiModelProperty(value = "") + @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { + return _double; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public FormatTest string(String string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @JsonProperty("string") + @ApiModelProperty(value = "") + @Pattern(regexp="/[a-z]/i") public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public FormatTest _byte(byte[] _byte) { + this._byte = _byte; + return this; + } + + /** + * Get _byte + * @return _byte + **/ + @JsonProperty("byte") + @ApiModelProperty(required = true, value = "") + @NotNull + @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public byte[] getByte() { + return _byte; + } + + public void setByte(byte[] _byte) { + this._byte = _byte; + } + + public FormatTest binary(File binary) { + this.binary = binary; + return this; + } + + /** + * Get binary + * @return binary + **/ + @JsonProperty("binary") + @ApiModelProperty(value = "") + public File getBinary() { + return binary; + } + + public void setBinary(File binary) { + this.binary = binary; + } + + public FormatTest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + **/ + @JsonProperty("date") + @ApiModelProperty(required = true, value = "") + @NotNull + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public FormatTest dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + **/ + @JsonProperty("dateTime") + @ApiModelProperty(value = "") + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public FormatTest uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @JsonProperty("uuid") + @ApiModelProperty(value = "") + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public FormatTest password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @JsonProperty("password") + @ApiModelProperty(required = true, value = "") + @NotNull + @Size(min=10,max=64) public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + + @Override + public boolean equals(java.lang.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) && + Objects.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); + } + + @Override + public int hashCode() { + return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password); + } + + + @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(toIndentedString(password)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterNumber.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java similarity index 51% rename from samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterNumber.java rename to samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index 99c1ab138ed..a4694ef89a5 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterNumber.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -14,13 +14,44 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; import javax.validation.constraints.*; /** - * OuterNumber + * HasOnlyReadOnly */ -public class OuterNumber { +public class HasOnlyReadOnly implements Serializable { + @JsonProperty("bar") + private String bar = null; + + @JsonProperty("foo") + private String foo = null; + + /** + * Get bar + * @return bar + **/ + @JsonProperty("bar") + @ApiModelProperty(value = "") + public String getBar() { + return bar; + } + + /** + * Get foo + * @return foo + **/ + @JsonProperty("foo") + @ApiModelProperty(value = "") + public String getFoo() { + return foo; + } + @Override public boolean equals(java.lang.Object o) { @@ -30,20 +61,24 @@ public class OuterNumber { if (o == null || getClass() != o.getClass()) { return false; } - return true; + HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; + return Objects.equals(this.bar, hasOnlyReadOnly.bar) && + Objects.equals(this.foo, hasOnlyReadOnly.foo); } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(bar, foo); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OuterNumber {\n"); + 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(); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java new file mode 100644 index 00000000000..d86da4c6cb3 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MapTest.java @@ -0,0 +1,166 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +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.*; + +/** + * MapTest + */ + +public class MapTest implements Serializable { + @JsonProperty("map_map_of_string") + private Map> mapMapOfString = null; + + /** + * Gets or Sets inner + */ + public enum InnerEnum { + UPPER("UPPER"), + + LOWER("lower"); + + private String value; + + InnerEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String text) { + for (InnerEnum b : InnerEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("map_of_enum_string") + private Map mapOfEnumString = null; + + public MapTest mapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + return this; + } + + public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { + if (this.mapMapOfString == null) { + this.mapMapOfString = new HashMap<>(); + } + this.mapMapOfString.put(key, mapMapOfStringItem); + return this; + } + + /** + * Get mapMapOfString + * @return mapMapOfString + **/ + @JsonProperty("map_map_of_string") + @ApiModelProperty(value = "") + public Map> getMapMapOfString() { + return mapMapOfString; + } + + public void setMapMapOfString(Map> mapMapOfString) { + this.mapMapOfString = mapMapOfString; + } + + public MapTest mapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + return this; + } + + public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { + if (this.mapOfEnumString == null) { + this.mapOfEnumString = new HashMap<>(); + } + this.mapOfEnumString.put(key, mapOfEnumStringItem); + return this; + } + + /** + * Get mapOfEnumString + * @return mapOfEnumString + **/ + @JsonProperty("map_of_enum_string") + @ApiModelProperty(value = "") + public Map getMapOfEnumString() { + return mapOfEnumString; + } + + public void setMapOfEnumString(Map mapOfEnumString) { + this.mapOfEnumString = mapOfEnumString; + } + + + @Override + public boolean equals(java.lang.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); + } + + @Override + public int hashCode() { + return Objects.hash(mapMapOfString, mapOfEnumString); + } + + + @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("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java new file mode 100644 index 00000000000..a52bc5bcb0a --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -0,0 +1,153 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.openapitools.model.Animal; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * MixedPropertiesAndAdditionalPropertiesClass + */ + +public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { + @JsonProperty("uuid") + private UUID uuid = null; + + @JsonProperty("dateTime") + private OffsetDateTime dateTime = null; + + @JsonProperty("map") + private Map map = null; + + public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @JsonProperty("uuid") + @ApiModelProperty(value = "") + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + return this; + } + + /** + * Get dateTime + * @return dateTime + **/ + @JsonProperty("dateTime") + @ApiModelProperty(value = "") + public OffsetDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(OffsetDateTime dateTime) { + this.dateTime = dateTime; + } + + public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { + this.map = map; + return this; + } + + public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { + if (this.map == null) { + this.map = new HashMap<>(); + } + this.map.put(key, mapItem); + return this; + } + + /** + * Get map + * @return map + **/ + @JsonProperty("map") + @ApiModelProperty(value = "") + public Map getMap() { + return map; + } + + public void setMap(Map map) { + this.map = map; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Model200Response.java new file mode 100644 index 00000000000..bfe756f31aa --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Model200Response.java @@ -0,0 +1,116 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * Model for testing model name starting with number + */ +@ApiModel(description = "Model for testing model name starting with number") + +public class Model200Response implements Serializable { + @JsonProperty("name") + private Integer name = null; + + @JsonProperty("class") + private String propertyClass = null; + + public Model200Response name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(value = "") + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + public Model200Response propertyClass(String propertyClass) { + this.propertyClass = propertyClass; + return this; + } + + /** + * Get propertyClass + * @return propertyClass + **/ + @JsonProperty("class") + @ApiModelProperty(value = "") + public String getPropertyClass() { + return propertyClass; + } + + public void setPropertyClass(String propertyClass) { + this.propertyClass = propertyClass; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 00000000000..1078eaa680c --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,139 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * ModelApiResponse + */ + +public class ModelApiResponse implements Serializable { + @JsonProperty("code") + private Integer code = null; + + @JsonProperty("type") + private String type = null; + + @JsonProperty("message") + private String message = null; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @JsonProperty("code") + @ApiModelProperty(value = "") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @JsonProperty("type") + @ApiModelProperty(value = "") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @JsonProperty("message") + @ApiModelProperty(value = "") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ModelReturn.java similarity index 53% rename from samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AnimalFarm.java rename to samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ModelReturn.java index e29e13f23d9..dec25386104 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ModelReturn.java @@ -14,16 +14,41 @@ package org.openapitools.model; import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; import javax.validation.constraints.*; /** - * AnimalFarm + * Model for testing reserved words */ +@ApiModel(description = "Model for testing reserved words") + +public class ModelReturn implements Serializable { + @JsonProperty("return") + private Integer _return = null; + + public ModelReturn _return(Integer _return) { + this._return = _return; + return this; + } + + /** + * Get _return + * @return _return + **/ + @JsonProperty("return") + @ApiModelProperty(value = "") + public Integer getReturn() { + return _return; + } + + public void setReturn(Integer _return) { + this._return = _return; + } -public class AnimalFarm extends ArrayList { @Override public boolean equals(java.lang.Object o) { @@ -33,20 +58,22 @@ public class AnimalFarm extends ArrayList { if (o == null || getClass() != o.getClass()) { return false; } - return true; + ModelReturn _return = (ModelReturn) o; + return Objects.equals(this._return, _return._return); } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(_return); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("class ModelReturn {\n"); + + sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Name.java new file mode 100644 index 00000000000..878f0cf0101 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Name.java @@ -0,0 +1,147 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * Model for testing model name same as property name + */ +@ApiModel(description = "Model for testing model name same as property name") + +public class Name implements Serializable { + @JsonProperty("name") + private Integer name = null; + + @JsonProperty("snake_case") + private Integer snakeCase = null; + + @JsonProperty("property") + private String property = null; + + @JsonProperty("123Number") + private Integer _123number = null; + + public Name name(Integer name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(required = true, value = "") + @NotNull + public Integer getName() { + return name; + } + + public void setName(Integer name) { + this.name = name; + } + + /** + * Get snakeCase + * @return snakeCase + **/ + @JsonProperty("snake_case") + @ApiModelProperty(value = "") + public Integer getSnakeCase() { + return snakeCase; + } + + public Name property(String property) { + this.property = property; + return this; + } + + /** + * Get property + * @return property + **/ + @JsonProperty("property") + @ApiModelProperty(value = "") + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + /** + * Get _123number + * @return _123number + **/ + @JsonProperty("123Number") + @ApiModelProperty(value = "") + public Integer get123number() { + return _123number; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterBoolean.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/NumberOnly.java similarity index 52% rename from samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterBoolean.java rename to samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/NumberOnly.java index 7be7947b705..b6ef05934e2 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/OuterBoolean.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/NumberOnly.java @@ -14,13 +14,41 @@ package org.openapitools.model; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.io.Serializable; import javax.validation.constraints.*; /** - * OuterBoolean + * NumberOnly */ -public class OuterBoolean { +public class NumberOnly implements Serializable { + @JsonProperty("JustNumber") + private BigDecimal justNumber = null; + + public NumberOnly justNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + return this; + } + + /** + * Get justNumber + * @return justNumber + **/ + @JsonProperty("JustNumber") + @ApiModelProperty(value = "") + public BigDecimal getJustNumber() { + return justNumber; + } + + public void setJustNumber(BigDecimal justNumber) { + this.justNumber = justNumber; + } + @Override public boolean equals(java.lang.Object o) { @@ -30,20 +58,22 @@ public class OuterBoolean { if (o == null || getClass() != o.getClass()) { return false; } - return true; + NumberOnly numberOnly = (NumberOnly) o; + return Objects.equals(this.justNumber, numberOnly.justNumber); } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(justNumber); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OuterBoolean {\n"); + sb.append("class NumberOnly {\n"); + sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Order.java new file mode 100644 index 00000000000..58bac106f55 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Order.java @@ -0,0 +1,246 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * Order + */ + +public class Order implements Serializable { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("petId") + private Long petId = null; + + @JsonProperty("quantity") + private Integer quantity = null; + + @JsonProperty("shipDate") + private OffsetDateTime shipDate = null; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("status") + private StatusEnum status = null; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + **/ + @JsonProperty("petId") + @ApiModelProperty(value = "") + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + @JsonProperty("quantity") + @ApiModelProperty(value = "") + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + @JsonProperty("shipDate") + @ApiModelProperty(value = "") + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + **/ + @JsonProperty("status") + @ApiModelProperty(value = "Order Status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + **/ + @JsonProperty("complete") + @ApiModelProperty(value = "") + public Boolean isComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java new file mode 100644 index 00000000000..c154a2295cf --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterComposite.java @@ -0,0 +1,140 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * OuterComposite + */ + +public class OuterComposite implements Serializable { + @JsonProperty("my_number") + private BigDecimal myNumber = null; + + @JsonProperty("my_string") + private String myString = null; + + @JsonProperty("my_boolean") + private Boolean myBoolean = null; + + public OuterComposite myNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + return this; + } + + /** + * Get myNumber + * @return myNumber + **/ + @JsonProperty("my_number") + @ApiModelProperty(value = "") + public BigDecimal getMyNumber() { + return myNumber; + } + + public void setMyNumber(BigDecimal myNumber) { + this.myNumber = myNumber; + } + + public OuterComposite myString(String myString) { + this.myString = myString; + return this; + } + + /** + * Get myString + * @return myString + **/ + @JsonProperty("my_string") + @ApiModelProperty(value = "") + public String getMyString() { + return myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public OuterComposite myBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + return this; + } + + /** + * Get myBoolean + * @return myBoolean + **/ + @JsonProperty("my_boolean") + @ApiModelProperty(value = "") + public Boolean getMyBoolean() { + return myBoolean; + } + + public void setMyBoolean(Boolean myBoolean) { + this.myBoolean = myBoolean; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterEnum.java new file mode 100644 index 00000000000..d631d2cb97e --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/OuterEnum.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonValue; +import java.io.Serializable; +import javax.validation.constraints.*; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Gets or Sets OuterEnum + */ +public enum OuterEnum { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnum fromValue(String text) { + for (OuterEnum b : OuterEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Pet.java new file mode 100644 index 00000000000..d55764fb6ca --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Pet.java @@ -0,0 +1,264 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * Pet + */ + +public class Pet implements Serializable { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("category") + private Category category = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("photoUrls") + private List photoUrls = new ArrayList<>(); + + @JsonProperty("tags") + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("status") + private StatusEnum status = null; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @JsonProperty("category") + @ApiModelProperty(value = "") + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(example = "doggie", required = true, value = "") + @NotNull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @JsonProperty("photoUrls") + @ApiModelProperty(required = true, value = "") + @NotNull + public List getPhotoUrls() { + return photoUrls; + } + + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @JsonProperty("tags") + @ApiModelProperty(value = "") + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + **/ + @JsonProperty("status") + @ApiModelProperty(value = "pet status in the store") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ReadOnlyFirst.java new file mode 100644 index 00000000000..7415c3f6ac0 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -0,0 +1,106 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * ReadOnlyFirst + */ + +public class ReadOnlyFirst implements Serializable { + @JsonProperty("bar") + private String bar = null; + + @JsonProperty("baz") + private String baz = null; + + /** + * Get bar + * @return bar + **/ + @JsonProperty("bar") + @ApiModelProperty(value = "") + public String getBar() { + return bar; + } + + public ReadOnlyFirst baz(String baz) { + this.baz = baz; + return this; + } + + /** + * Get baz + * @return baz + **/ + @JsonProperty("baz") + @ApiModelProperty(value = "") + public String getBaz() { + return baz; + } + + public void setBaz(String baz) { + this.baz = baz; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/SpecialModelName.java new file mode 100644 index 00000000000..d19a20e48ba --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -0,0 +1,91 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * SpecialModelName + */ + +public class SpecialModelName implements Serializable { + @JsonProperty("$special[property.name]") + private Long $specialPropertyName = null; + + public SpecialModelName $specialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + return this; + } + + /** + * Get $specialPropertyName + * @return $specialPropertyName + **/ + @JsonProperty("$special[property.name]") + @ApiModelProperty(value = "") + public Long get$SpecialPropertyName() { + return $specialPropertyName; + } + + public void set$SpecialPropertyName(Long $specialPropertyName) { + this.$specialPropertyName = $specialPropertyName; + } + + + @Override + public boolean equals(java.lang.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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Tag.java new file mode 100644 index 00000000000..db370fe2a54 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Tag.java @@ -0,0 +1,115 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * Tag + */ + +public class Tag implements Serializable { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("name") + private String name = null; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + + sb.append(" id: ").append(toIndentedString(id)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/User.java new file mode 100644 index 00000000000..6c7131093b1 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/User.java @@ -0,0 +1,259 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import javax.validation.constraints.*; + +/** + * User + */ + +public class User implements Serializable { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("username") + private String username = null; + + @JsonProperty("firstName") + private String firstName = null; + + @JsonProperty("lastName") + private String lastName = null; + + @JsonProperty("email") + private String email = null; + + @JsonProperty("password") + private String password = null; + + @JsonProperty("phone") + private String phone = null; + + @JsonProperty("userStatus") + private Integer userStatus = null; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @JsonProperty("username") + @ApiModelProperty(value = "") + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + @JsonProperty("firstName") + @ApiModelProperty(value = "") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + @JsonProperty("lastName") + @ApiModelProperty(value = "") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @JsonProperty("email") + @ApiModelProperty(value = "") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @JsonProperty("password") + @ApiModelProperty(value = "") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @JsonProperty("phone") + @ApiModelProperty(value = "") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + **/ + @JsonProperty("userStatus") + @ApiModelProperty(value = "User Status") + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/Bootstrap.java new file mode 100644 index 00000000000..1d5c3ae3e36 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/Bootstrap.java @@ -0,0 +1,31 @@ +package org.openapitools.api; + +import io.swagger.jaxrs.config.SwaggerContextService; +import io.swagger.models.*; + +import io.swagger.models.auth.*; + +import javax.servlet.http.HttpServlet; +import javax.servlet.ServletContext; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; + +public class Bootstrap extends HttpServlet { + @Override + public void init(ServletConfig config) throws ServletException { + Info info = new Info() + .title("OpenAPI Server") + .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: \" \\") + .termsOfService("http://swagger.io/terms/") + .contact(new Contact() + .email("apiteam@swagger.io")) + .license(new License() + .name("Apache-2.0") + .url("http://www.apache.org/licenses/LICENSE-2.0.html")); + + ServletContext context = config.getServletContext(); + Swagger swagger = new Swagger().info(info); + + new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/AnotherFakeApiServiceFactory.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/AnotherFakeApiServiceFactory.java new file mode 100644 index 00000000000..21281d8d8a4 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/AnotherFakeApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.AnotherFakeApiService; +import org.openapitools.api.impl.AnotherFakeApiServiceImpl; + + +public class AnotherFakeApiServiceFactory { + private final static AnotherFakeApiService service = new AnotherFakeApiServiceImpl(); + + public static AnotherFakeApiService getAnotherFakeApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/FakeApiServiceFactory.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/FakeApiServiceFactory.java new file mode 100644 index 00000000000..6b5746c6e8a --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/FakeApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.FakeApiService; +import org.openapitools.api.impl.FakeApiServiceImpl; + + +public class FakeApiServiceFactory { + private final static FakeApiService service = new FakeApiServiceImpl(); + + public static FakeApiService getFakeApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/FakeClassnameTestApiServiceFactory.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/FakeClassnameTestApiServiceFactory.java new file mode 100644 index 00000000000..3c866f7e478 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/FakeClassnameTestApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.FakeClassnameTestApiService; +import org.openapitools.api.impl.FakeClassnameTestApiServiceImpl; + + +public class FakeClassnameTestApiServiceFactory { + private final static FakeClassnameTestApiService service = new FakeClassnameTestApiServiceImpl(); + + public static FakeClassnameTestApiService getFakeClassnameTestApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/PetApiServiceFactory.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/PetApiServiceFactory.java new file mode 100644 index 00000000000..c292d9111ee --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/PetApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.PetApiService; +import org.openapitools.api.impl.PetApiServiceImpl; + + +public class PetApiServiceFactory { + private final static PetApiService service = new PetApiServiceImpl(); + + public static PetApiService getPetApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/StoreApiServiceFactory.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/StoreApiServiceFactory.java new file mode 100644 index 00000000000..0a145377ade --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/StoreApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.StoreApiService; +import org.openapitools.api.impl.StoreApiServiceImpl; + + +public class StoreApiServiceFactory { + private final static StoreApiService service = new StoreApiServiceImpl(); + + public static StoreApiService getStoreApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/UserApiServiceFactory.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/UserApiServiceFactory.java new file mode 100644 index 00000000000..6376e5732cf --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/factories/UserApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.UserApiService; +import org.openapitools.api.impl.UserApiServiceImpl; + + +public class UserApiServiceFactory { + private final static UserApiService service = new UserApiServiceImpl(); + + public static UserApiService getUserApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java new file mode 100644 index 00000000000..e2d6575d836 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -0,0 +1,25 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.openapitools.model.Client; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { + @Override + public Response testSpecialTags(Client client, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java new file mode 100644 index 00000000000..cd3dd7dfe1a --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -0,0 +1,77 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import java.math.BigDecimal; +import org.openapitools.model.Client; +import java.io.File; +import java.time.LocalDate; +import java.util.Map; +import java.time.OffsetDateTime; +import org.openapitools.model.OuterComposite; +import org.openapitools.model.User; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public class FakeApiServiceImpl extends FakeApiService { + @Override + public Response fakeOuterBooleanSerialize(Boolean booleanPostBody, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response fakeOuterCompositeSerialize(OuterComposite outerComposite, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response fakeOuterNumberSerialize(BigDecimal body, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response fakeOuterStringSerialize(String body, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response testBodyWithQueryParams( @NotNull String query, User user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response testClientModel(Client client, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, InputStream binaryInputStream, FormDataContentDisposition binaryDetail, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response testInlineAdditionalProperties(String requestBody, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response testJsonFormData(String param, String param2, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java new file mode 100644 index 00000000000..8e5ee58fd96 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeClassnameTestApiServiceImpl.java @@ -0,0 +1,25 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.openapitools.model.Client; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public class FakeClassnameTestApiServiceImpl extends FakeClassnameTestApiService { + @Override + public Response testClassname(Client client, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java new file mode 100644 index 00000000000..366b2e4e133 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -0,0 +1,62 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import java.io.File; +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public class PetApiServiceImpl extends PetApiService { + @Override + public Response addPet(Pet pet, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response findPetsByStatus( @NotNull List status, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response findPetsByTags( @NotNull List tags, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response getPetById(Long petId, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response updatePet(Pet pet, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response uploadFile(Long petId, String additionalMetadata, InputStream fileInputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java new file mode 100644 index 00000000000..18c2ec5ecdd --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -0,0 +1,41 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import java.util.Map; +import org.openapitools.model.Order; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public class StoreApiServiceImpl extends StoreApiService { + @Override + public Response deleteOrder(String orderId, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response getInventory(SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response getOrderById( @Min(1L) @Max(5L)Long orderId, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response placeOrder(Order order, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java new file mode 100644 index 00000000000..ef7366a6626 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -0,0 +1,61 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import java.util.List; +import org.openapitools.model.User; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; + +public class UserApiServiceImpl extends UserApiService { + @Override + public Response createUser(User user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response createUsersWithArrayInput(List user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response createUsersWithListInput(List user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response deleteUser(String username, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response getUserByName(String username, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response loginUser( @NotNull String username, @NotNull String password, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response logoutUser(SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response updateUser(String username, User user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs-datelib-j8/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000000..69846c8e9d2 --- /dev/null +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,63 @@ + + + + + jersey + org.glassfish.jersey.servlet.ServletContainer + + jersey.config.server.provider.packages + + io.swagger.jaxrs.listing, + io.swagger.sample.resource, + org.openapitools.api + + + + jersey.config.server.provider.classnames + org.glassfish.jersey.media.multipart.MultiPartFeature + + + jersey.config.server.wadl.disableWadl + true + + 1 + + + + Jersey2Config + io.swagger.jersey.config.JerseyJaxrsConfig + + api.version + 1.0.0 + + + swagger.api.title + OpenAPI Server + + + swagger.api.basepath + http://petstore.swagger.io:80/v2 + + + 2 + + + Bootstrap + org.openapitools.api.Bootstrap + 2 + + + jersey + /v2/* + + + ApiOriginFilter + org.openapitools.api.ApiOriginFilter + + + ApiOriginFilter + /* + + diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator-ignore b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-resteasy/default/build.gradle b/samples/server/petstore/jaxrs-resteasy/default/build.gradle index a568dc86c41..467eb76237d 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/default/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'war' project.version = "1.0.0" -project.group = "io.swagger" +project.group = "org.openapitools" repositories { mavenCentral() diff --git a/samples/server/petstore/jaxrs-resteasy/default/pom.xml b/samples/server/petstore/jaxrs-resteasy/default/pom.xml index 9168c1b1cf0..aad60f785b4 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default/pom.xml @@ -1,10 +1,10 @@ 4.0.0 - io.swagger - swagger-jaxrs-resteasy-server + org.openapitools + openapi-jaxrs-resteasy-server war - swagger-jaxrs-resteasy-server + openapi-jaxrs-resteasy-server 1.0.0 src/main/java diff --git a/samples/server/petstore/jaxrs-resteasy/default/settings.gradle b/samples/server/petstore/jaxrs-resteasy/default/settings.gradle index 6392b5011e0..70cc4b6f9d2 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/settings.gradle +++ b/samples/server/petstore/jaxrs-resteasy/default/settings.gradle @@ -1 +1 @@ -rootProject.name = "swagger-jaxrs-resteasy-server" \ No newline at end of file +rootProject.name = "openapi-jaxrs-resteasy-server" \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator-ignore b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle index e189fe88dfb..db258e31787 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'war' project.version = "1.0.0" -project.group = "io.swagger" +project.group = "org.openapitools" repositories { mavenCentral() diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml index 0b95ae32fbf..efcd7e66203 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - io.swagger + org.openapitools jaxrs-resteasy-eap-java8-server war jaxrs-resteasy-eap-java8-server diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator-ignore b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle index e89fc25bec1..3d50424ed37 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'war' project.version = "1.0.0" -project.group = "io.swagger" +project.group = "org.openapitools" repositories { mavenCentral() diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml index f6dcc3b4563..78a42e812dc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - io.swagger + org.openapitools jaxrs-resteasy-eap-joda-server war jaxrs-resteasy-eap-joda-server diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator-ignore b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle index e89fc25bec1..3d50424ed37 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'war' project.version = "1.0.0" -project.group = "io.swagger" +project.group = "org.openapitools" repositories { mavenCentral() diff --git a/samples/server/petstore/jaxrs-resteasy/eap/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap/pom.xml index acee66c012b..f468d7d0321 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap/pom.xml @@ -1,10 +1,10 @@ 4.0.0 - io.swagger - swagger-jaxrs-resteasy-eap-server + org.openapitools + openapi-jaxrs-resteasy-eap-server war - swagger-jaxrs-resteasy-eap-server + openapi-jaxrs-resteasy-eap-server 1.0.0 src/main/java diff --git a/samples/server/petstore/jaxrs-resteasy/eap/settings.gradle b/samples/server/petstore/jaxrs-resteasy/eap/settings.gradle index 1bd07384c31..ecf714af280 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/settings.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap/settings.gradle @@ -1 +1 @@ -rootProject.name = "swagger-jaxrs-resteasy-eap-server" \ No newline at end of file +rootProject.name = "openapi-jaxrs-resteasy-eap-server" \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator-ignore b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle index a568dc86c41..467eb76237d 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'war' project.version = "1.0.0" -project.group = "io.swagger" +project.group = "org.openapitools" repositories { mavenCentral() diff --git a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml index 185c02560a6..c67485fa47a 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - io.swagger + org.openapitools jaxrs-resteasy-joda-server war jaxrs-resteasy-joda-server diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator-ignore b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-spec-interface/pom.xml b/samples/server/petstore/jaxrs-spec-interface/pom.xml index a32dafce9ee..a71bfe3bc95 100644 --- a/samples/server/petstore/jaxrs-spec-interface/pom.xml +++ b/samples/server/petstore/jaxrs-spec-interface/pom.xml @@ -1,9 +1,9 @@ 4.0.0 - io.swagger - swagger-jaxrs-client + org.openapitools + openapi-jaxrs-client jar - swagger-jaxrs-client + openapi-jaxrs-client 1.0.0 src/main/java diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java deleted file mode 100644 index f14a33d343e..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java +++ /dev/null @@ -1,57 +0,0 @@ -package io.swagger.model; - -import io.swagger.model.Animal; -import java.util.ArrayList; -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; - - -public class AnimalFarm extends ArrayList implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnimalFarm animalFarm = (AnimalFarm) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterBoolean.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterBoolean.java deleted file mode 100644 index 42cd43032eb..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterBoolean.java +++ /dev/null @@ -1,54 +0,0 @@ -package io.swagger.model; - -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; - - -public class OuterBoolean implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterBoolean outerBoolean = (OuterBoolean) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterBoolean {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterNumber.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterNumber.java deleted file mode 100644 index c3904810c5f..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterNumber.java +++ /dev/null @@ -1,54 +0,0 @@ -package io.swagger.model; - -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; - - -public class OuterNumber implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterNumber outerNumber = (OuterNumber) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterNumber {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterString.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterString.java deleted file mode 100644 index 58d009930f7..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterString.java +++ /dev/null @@ -1,54 +0,0 @@ -package io.swagger.model; - -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; - - -public class OuterString implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterString outerString = (OuterString) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterString {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator-ignore b/samples/server/petstore/jaxrs-spec/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs-spec/pom.xml b/samples/server/petstore/jaxrs-spec/pom.xml index c6f7f4f808e..3505912ab2b 100644 --- a/samples/server/petstore/jaxrs-spec/pom.xml +++ b/samples/server/petstore/jaxrs-spec/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - io.swagger + org.openapitools jaxrs-spec-petstore-server war jaxrs-spec-petstore-server diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java deleted file mode 100644 index f14a33d343e..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java +++ /dev/null @@ -1,57 +0,0 @@ -package io.swagger.model; - -import io.swagger.model.Animal; -import java.util.ArrayList; -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; - - -public class AnimalFarm extends ArrayList implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AnimalFarm animalFarm = (AnimalFarm) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterBoolean.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterBoolean.java deleted file mode 100644 index 42cd43032eb..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterBoolean.java +++ /dev/null @@ -1,54 +0,0 @@ -package io.swagger.model; - -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; - - -public class OuterBoolean implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterBoolean outerBoolean = (OuterBoolean) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterBoolean {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterNumber.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterNumber.java deleted file mode 100644 index c3904810c5f..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterNumber.java +++ /dev/null @@ -1,54 +0,0 @@ -package io.swagger.model; - -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; - - -public class OuterNumber implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterNumber outerNumber = (OuterNumber) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterNumber {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterString.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterString.java deleted file mode 100644 index 58d009930f7..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterString.java +++ /dev/null @@ -1,54 +0,0 @@ -package io.swagger.model; - -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; - - -public class OuterString implements Serializable { - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterString outerString = (OuterString) o; - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterString {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator-ignore b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml index 7b9f6811c34..4d6805a2b99 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - io.swagger + org.openapitools jaxrs-jersey1-useTags jar jaxrs-jersey1-useTags diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AnimalFarm.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AnimalFarm.java deleted file mode 100644 index e29e13f23d9..00000000000 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/AnimalFarm.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.Animal; -import javax.validation.constraints.*; - -/** - * AnimalFarm - */ - -public class AnimalFarm extends ArrayList { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AnimalFarm {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/Bootstrap.java index 25a26352bf5..1d5c3ae3e36 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/Bootstrap.java @@ -14,7 +14,7 @@ public class Bootstrap extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { Info info = new Info() - .title("Swagger Server") + .title("OpenAPI Server") .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: \" \\") .termsOfService("http://swagger.io/terms/") .contact(new Contact() diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/webapp/WEB-INF/web.xml index 3d725cbf5e5..5fe617236de 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/webapp/WEB-INF/web.xml +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/webapp/WEB-INF/web.xml @@ -30,7 +30,7 @@ swagger.api.title - Swagger Server + OpenAPI Server swagger.api.basepath diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator-ignore b/samples/server/petstore/jaxrs/jersey1/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs/jersey1/pom.xml b/samples/server/petstore/jaxrs/jersey1/pom.xml index c3099182423..edd0462ef92 100644 --- a/samples/server/petstore/jaxrs/jersey1/pom.xml +++ b/samples/server/petstore/jaxrs/jersey1/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - io.swagger + org.openapitools jaxrs-jersey1-server jar jaxrs-jersey1-server diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterNumber.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterNumber.java deleted file mode 100644 index 99c1ab138ed..00000000000 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterNumber.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import javax.validation.constraints.*; - -/** - * OuterNumber - */ - -public class OuterNumber { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterNumber {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterString.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterString.java deleted file mode 100644 index f003e4d574d..00000000000 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/OuterString.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import javax.validation.constraints.*; - -/** - * OuterString - */ - -public class OuterString { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterString {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/Bootstrap.java index 25a26352bf5..1d5c3ae3e36 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/Bootstrap.java @@ -14,7 +14,7 @@ public class Bootstrap extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { Info info = new Info() - .title("Swagger Server") + .title("OpenAPI Server") .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: \" \\") .termsOfService("http://swagger.io/terms/") .contact(new Contact() diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs/jersey1/src/main/webapp/WEB-INF/web.xml index 3d725cbf5e5..5fe617236de 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/webapp/WEB-INF/web.xml +++ b/samples/server/petstore/jaxrs/jersey1/src/main/webapp/WEB-INF/web.xml @@ -30,7 +30,7 @@ swagger.api.title - Swagger Server + OpenAPI Server swagger.api.basepath diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator-ignore b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml index 58bd574cf87..be0f1c3b0b7 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - io.swagger + org.openapitools jaxrs-jersey2-useTags jar jaxrs-jersey2-useTags diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterBoolean.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterBoolean.java deleted file mode 100644 index 7be7947b705..00000000000 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterBoolean.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import javax.validation.constraints.*; - -/** - * OuterBoolean - */ - -public class OuterBoolean { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterBoolean {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterNumber.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterNumber.java deleted file mode 100644 index 99c1ab138ed..00000000000 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterNumber.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import javax.validation.constraints.*; - -/** - * OuterNumber - */ - -public class OuterNumber { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterNumber {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterString.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterString.java deleted file mode 100644 index f003e4d574d..00000000000 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/OuterString.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import javax.validation.constraints.*; - -/** - * OuterString - */ - -public class OuterString { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterString {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/Bootstrap.java index 25a26352bf5..1d5c3ae3e36 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/Bootstrap.java @@ -14,7 +14,7 @@ public class Bootstrap extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { Info info = new Info() - .title("Swagger Server") + .title("OpenAPI Server") .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: \" \\") .termsOfService("http://swagger.io/terms/") .contact(new Contact() diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/webapp/WEB-INF/web.xml index b88ffedf9f9..69846c8e9d2 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/webapp/WEB-INF/web.xml +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/webapp/WEB-INF/web.xml @@ -34,7 +34,7 @@ swagger.api.title - Swagger Server + OpenAPI Server swagger.api.basepath diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator-ignore b/samples/server/petstore/jaxrs/jersey2/.openapi-generator-ignore index 6fa32398dc8..7484ee590a3 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator-ignore +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Openapi Generator Ignore +# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/server/petstore/jaxrs/jersey2/pom.xml b/samples/server/petstore/jaxrs/jersey2/pom.xml index 78f18cc583d..d1a5e075bc1 100644 --- a/samples/server/petstore/jaxrs/jersey2/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - io.swagger + org.openapitools jaxrs-jersey-petstore-server jar jaxrs-jersey-petstore-server diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterBoolean.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterBoolean.java deleted file mode 100644 index 7be7947b705..00000000000 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterBoolean.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import javax.validation.constraints.*; - -/** - * OuterBoolean - */ - -public class OuterBoolean { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterBoolean {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterNumber.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterNumber.java deleted file mode 100644 index 99c1ab138ed..00000000000 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterNumber.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import javax.validation.constraints.*; - -/** - * OuterNumber - */ - -public class OuterNumber { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterNumber {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterString.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterString.java deleted file mode 100644 index f003e4d574d..00000000000 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/OuterString.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package org.openapitools.model; - -import java.util.Objects; -import javax.validation.constraints.*; - -/** - * OuterString - */ - -public class OuterString { - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash(); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterString {\n"); - - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/Bootstrap.java index 25a26352bf5..1d5c3ae3e36 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/Bootstrap.java @@ -14,7 +14,7 @@ public class Bootstrap extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { Info info = new Info() - .title("Swagger Server") + .title("OpenAPI Server") .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: \" \\") .termsOfService("http://swagger.io/terms/") .contact(new Contact() diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs/jersey2/src/main/webapp/WEB-INF/web.xml index b88ffedf9f9..69846c8e9d2 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/webapp/WEB-INF/web.xml +++ b/samples/server/petstore/jaxrs/jersey2/src/main/webapp/WEB-INF/web.xml @@ -34,7 +34,7 @@ swagger.api.title - Swagger Server + OpenAPI Server swagger.api.basepath