From 5bb0f7a933ffa07d3e6ea1daf7f7943852d053b5 Mon Sep 17 00:00:00 2001 From: Paul Ebermann Date: Wed, 15 Mar 2017 16:49:52 +0100 Subject: [PATCH] Update all samples. --- samples/client/petstore/akka-scala/pom.xml | 4 +- samples/client/petstore/bash/_petstore-cli | 2 +- samples/client/petstore/bash/petstore-cli | 2 +- .../bash/petstore-cli.bash-completion | 2 +- .../Lib/SwaggerClient/README.md | 2 +- .../csharp/SwaggerClient/IO.Swagger.sln | 10 +- .../src/IO.Swagger/IO.Swagger.csproj | 2 +- .../IO.Swagger.sln | 10 +- .../IO.Swagger.Test/IO.Swagger.Test.csproj | 2 +- .../src/IO.Swagger/IO.Swagger.csproj | 2 +- .../petstore/java/jersey2-java6/pom.xml | 2 +- .../java/io/swagger/client/api/FakeApi.java | 6 +- .../client/api/FakeClassnameTags123Api.java | 2 +- .../java/io/swagger/client/api/PetApi.java | 16 +- .../java/io/swagger/client/api/StoreApi.java | 8 +- .../java/io/swagger/client/api/UserApi.java | 16 +- .../model/AdditionalPropertiesClass.java | 4 +- .../java/io/swagger/client/model/Animal.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../client/model/ArrayOfNumberOnly.java | 2 +- .../io/swagger/client/model/ArrayTest.java | 6 +- .../swagger/client/model/Capitalization.java | 12 +- .../java/io/swagger/client/model/Cat.java | 2 +- .../io/swagger/client/model/Category.java | 4 +- .../io/swagger/client/model/ClassModel.java | 2 +- .../java/io/swagger/client/model/Client.java | 2 +- .../java/io/swagger/client/model/Dog.java | 2 +- .../io/swagger/client/model/EnumArrays.java | 4 +- .../io/swagger/client/model/EnumTest.java | 8 +- .../io/swagger/client/model/FormatTest.java | 26 +- .../swagger/client/model/HasOnlyReadOnly.java | 4 +- .../java/io/swagger/client/model/MapTest.java | 4 +- ...ropertiesAndAdditionalPropertiesClass.java | 6 +- .../client/model/Model200Response.java | 4 +- .../client/model/ModelApiResponse.java | 6 +- .../io/swagger/client/model/ModelReturn.java | 2 +- .../java/io/swagger/client/model/Name.java | 8 +- .../io/swagger/client/model/NumberOnly.java | 2 +- .../java/io/swagger/client/model/Order.java | 12 +- .../java/io/swagger/client/model/Pet.java | 10 +- .../swagger/client/model/ReadOnlyFirst.java | 4 +- .../client/model/SpecialModelName.java | 2 +- .../java/io/swagger/client/model/Tag.java | 4 +- .../java/io/swagger/client/model/User.java | 16 +- .../client/api/FakeClassnameTags123Api.java | 2 +- .../src/api/Fake_classname_tags123Api.js | 2 +- .../core-data/SwaggerClient/Api/SWGPetApi.m | 24 -- .../core-data/SwaggerClient/Api/SWGStoreApi.m | 12 - .../core-data/SwaggerClient/Api/SWGUserApi.m | 24 -- .../SwaggerClient/Core/SWGApiClient.m | 14 +- .../SwaggerClient/FakeClassnameTags123Api.pm | 1 - .../apis/fake_classname_tags_123_api.py | 3 +- .../petstore/qt5cpp/client/SWGHelpers.cpp | 1 + .../api/fake_classname_tags123_api.rb | 2 +- samples/client/petstore/scala/pom.xml | 2 +- samples/client/petstore/spring-cloud/pom.xml | 2 +- .../Classes/Swaggers/APIs/PetAPI.swift | 32 +- .../Classes/Swaggers/APIs/StoreAPI.swift | 36 +- .../Classes/Swaggers/APIs/UserAPI.swift | 8 +- .../Classes/Swaggers/APIs/PetAPI.swift | 32 +- .../Classes/Swaggers/APIs/StoreAPI.swift | 36 +- .../Classes/Swaggers/APIs/UserAPI.swift | 8 +- .../Classes/Swaggers/APIs/PetAPI.swift | 32 +- .../Classes/Swaggers/APIs/StoreAPI.swift | 36 +- .../Classes/Swaggers/APIs/UserAPI.swift | 8 +- .../Classes/Swaggers/APIs/PetAPI.swift | 38 +- .../Classes/Swaggers/APIs/StoreAPI.swift | 18 +- .../Classes/Swaggers/APIs/UserAPI.swift | 8 +- .../Classes/Swaggers/APIs/PetAPI.swift | 30 +- .../Classes/Swaggers/APIs/StoreAPI.swift | 18 +- .../Classes/Swaggers/APIs/UserAPI.swift | 4 +- .../Classes/Swaggers/APIs/PetAPI.swift | 30 +- .../Classes/Swaggers/APIs/StoreAPI.swift | 22 +- .../Classes/Swaggers/APIs/UserAPI.swift | 8 +- .../typescript-angular2/npm/README.md | 4 +- .../typescript-angular2/npm/package.json | 2 +- .../typescript-jquery/npm/package.json | 2 +- samples/html/index.html | 108 +++--- samples/html2/index.html | 2 +- .../server/petstore/aspnetcore/IO.Swagger.sln | 10 +- .../src/IO.Swagger/IO.Swagger.xproj | 2 +- .../swagger_server/swagger/swagger.yaml | 2 +- .../swagger_server/swagger/swagger.yaml | 2 +- .../petstore/go-api-server/go/README.md | 2 +- samples/server/petstore/java-msf4j/pom.xml | 9 +- .../.swagger-codegen-ignore | 23 ++ .../petstore/java-play-framework/LICENSE | 8 + .../petstore/java-play-framework/README | 4 + .../app/apimodels/Category.java | 96 +++++ .../app/apimodels/Order.java | 222 +++++++++++ .../app/apimodels/Pet.java | 237 ++++++++++++ .../app/apimodels/Tag.java | 96 +++++ .../app/apimodels/User.java | 234 ++++++++++++ .../app/controllers/ApiDocController.java | 15 + .../app/controllers/PetApiController.java | 248 ++++++++++++ .../app/controllers/PetApiControllerImp.java | 53 +++ .../app/controllers/StoreApiController.java | 97 +++++ .../controllers/StoreApiControllerImp.java | 33 ++ .../app/controllers/UserApiController.java | 184 +++++++++ .../app/controllers/UserApiControllerImp.java | 53 +++ .../app/swagger/SwaggerUtils.java | 108 ++++++ .../petstore/java-play-framework/build.sbt | 16 + .../java-play-framework/conf/application.conf | 361 ++++++++++++++++++ .../java-play-framework/conf/logback.xml | 41 ++ .../petstore/java-play-framework/conf/routes | 40 ++ .../project/build.properties | 1 + .../java-play-framework/project/plugins.sbt | 2 + .../src/gen/java/io/swagger/api/PetApi.java | 24 ++ .../src/gen/java/io/swagger/api/StoreApi.java | 16 +- .../src/gen/java/io/swagger/api/UserApi.java | 23 ++ .../gen/java/io/swagger/model/Category.java | 4 +- .../io/swagger/model/ModelApiResponse.java | 6 +- .../src/gen/java/io/swagger/model/Order.java | 21 +- .../src/gen/java/io/swagger/model/Pet.java | 10 +- .../src/gen/java/io/swagger/model/Tag.java | 4 +- .../src/gen/java/io/swagger/model/User.java | 16 +- .../gen/java/io/swagger/model/Category.java | 4 +- .../io/swagger/model/ModelApiResponse.java | 6 +- .../src/gen/java/io/swagger/model/Order.java | 12 +- .../src/gen/java/io/swagger/model/Pet.java | 10 +- .../src/gen/java/io/swagger/model/Tag.java | 4 +- .../src/gen/java/io/swagger/model/User.java | 16 +- .../src/gen/java/io/swagger/api/PetApi.java | 24 ++ .../src/gen/java/io/swagger/api/StoreApi.java | 16 +- .../src/gen/java/io/swagger/api/UserApi.java | 23 ++ .../gen/java/io/swagger/model/Category.java | 4 +- .../io/swagger/model/ModelApiResponse.java | 6 +- .../src/gen/java/io/swagger/model/Order.java | 21 +- .../src/gen/java/io/swagger/model/Pet.java | 10 +- .../src/gen/java/io/swagger/model/Tag.java | 4 +- .../src/gen/java/io/swagger/model/User.java | 16 +- .../src/gen/java/io/swagger/api/FakeApi.java | 3 +- .../swagger/api/FakeClassnameTags123Api.java | 4 + .../model/AdditionalPropertiesClass.java | 4 +- .../src/gen/java/io/swagger/model/Animal.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../io/swagger/model/ArrayOfNumberOnly.java | 2 +- .../gen/java/io/swagger/model/ArrayTest.java | 6 +- .../java/io/swagger/model/Capitalization.java | 12 +- .../src/gen/java/io/swagger/model/Cat.java | 2 +- .../gen/java/io/swagger/model/Category.java | 4 +- .../gen/java/io/swagger/model/ClassModel.java | 2 +- .../src/gen/java/io/swagger/model/Client.java | 2 +- .../src/gen/java/io/swagger/model/Dog.java | 2 +- .../gen/java/io/swagger/model/EnumArrays.java | 4 +- .../gen/java/io/swagger/model/EnumTest.java | 8 +- .../gen/java/io/swagger/model/FormatTest.java | 35 +- .../io/swagger/model/HasOnlyReadOnly.java | 4 +- .../gen/java/io/swagger/model/MapTest.java | 4 +- ...ropertiesAndAdditionalPropertiesClass.java | 15 +- .../io/swagger/model/Model200Response.java | 4 +- .../io/swagger/model/ModelApiResponse.java | 6 +- .../java/io/swagger/model/ModelReturn.java | 2 +- .../src/gen/java/io/swagger/model/Name.java | 8 +- .../gen/java/io/swagger/model/NumberOnly.java | 2 +- .../src/gen/java/io/swagger/model/Order.java | 21 +- .../src/gen/java/io/swagger/model/Pet.java | 10 +- .../java/io/swagger/model/ReadOnlyFirst.java | 4 +- .../io/swagger/model/SpecialModelName.java | 2 +- .../src/gen/java/io/swagger/model/Tag.java | 4 +- .../src/gen/java/io/swagger/model/User.java | 16 +- .../swagger/api/impl/FakeApiServiceImpl.java | 3 +- .../gen/java/io/swagger/model/Category.java | 4 +- .../io/swagger/model/ModelApiResponse.java | 6 +- .../src/gen/java/io/swagger/model/Order.java | 12 +- .../src/gen/java/io/swagger/model/Pet.java | 10 +- .../src/gen/java/io/swagger/model/Tag.java | 4 +- .../src/gen/java/io/swagger/model/User.java | 16 +- .../gen/java/io/swagger/model/Category.java | 4 +- .../io/swagger/model/ModelApiResponse.java | 6 +- .../src/gen/java/io/swagger/model/Order.java | 12 +- .../src/gen/java/io/swagger/model/Pet.java | 10 +- .../src/gen/java/io/swagger/model/Tag.java | 4 +- .../src/gen/java/io/swagger/model/User.java | 16 +- .../src/gen/java/io/swagger/api/FakeApi.java | 5 +- .../model/AdditionalPropertiesClass.java | 8 +- .../src/gen/java/io/swagger/model/Animal.java | 8 +- .../gen/java/io/swagger/model/AnimalFarm.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 6 +- .../io/swagger/model/ArrayOfNumberOnly.java | 6 +- .../gen/java/io/swagger/model/ArrayTest.java | 10 +- .../java/io/swagger/model/Capitalization.java | 16 +- .../src/gen/java/io/swagger/model/Cat.java | 6 +- .../gen/java/io/swagger/model/Category.java | 8 +- .../gen/java/io/swagger/model/ClassModel.java | 6 +- .../src/gen/java/io/swagger/model/Client.java | 6 +- .../src/gen/java/io/swagger/model/Dog.java | 6 +- .../gen/java/io/swagger/model/EnumArrays.java | 8 +- .../gen/java/io/swagger/model/EnumTest.java | 12 +- .../gen/java/io/swagger/model/FormatTest.java | 39 +- .../io/swagger/model/HasOnlyReadOnly.java | 8 +- .../gen/java/io/swagger/model/MapTest.java | 8 +- ...ropertiesAndAdditionalPropertiesClass.java | 19 +- .../io/swagger/model/Model200Response.java | 8 +- .../io/swagger/model/ModelApiResponse.java | 10 +- .../java/io/swagger/model/ModelReturn.java | 6 +- .../src/gen/java/io/swagger/model/Name.java | 12 +- .../gen/java/io/swagger/model/NumberOnly.java | 6 +- .../src/gen/java/io/swagger/model/Order.java | 25 +- .../src/gen/java/io/swagger/model/Pet.java | 14 +- .../java/io/swagger/model/ReadOnlyFirst.java | 8 +- .../io/swagger/model/SpecialModelName.java | 6 +- .../src/gen/java/io/swagger/model/Tag.java | 8 +- .../src/gen/java/io/swagger/model/User.java | 20 +- .../server/petstore/jaxrs-spec/swagger.json | 10 +- .../gen/java/io/swagger/model/FormatTest.java | 26 +- .../server/petstore/nancyfx/IO.Swagger.sln | 10 +- .../nancyfx/src/IO.Swagger/IO.Swagger.csproj | 2 +- .../controllers/Pet.js | 82 +++- .../controllers/Store.js | 40 +- .../controllers/User.js | 78 +++- .../service/PetService.js | 186 +++++++++ .../service/StoreService.js | 91 +++++ .../service/UserService.js | 136 +++++++ .../utils/writer.js | 43 +++ .../springboot-implicitHeaders/pom.xml | 11 +- .../src/main/java/io/swagger/api/FakeApi.java | 8 +- .../io/swagger/api/FakeApiController.java | 28 +- .../io/swagger/api/FakeClassnameTestApi.java | 34 ++ .../api/FakeClassnameTestApiController.java | 31 ++ .../src/main/java/io/swagger/api/PetApi.java | 2 +- .../CustomInstantDeserializer.java | 232 +++++++++++ .../configuration/JacksonConfiguration.java | 23 ++ .../SwaggerDocumentationConfig.java | 4 +- .../java/io/swagger/model/FormatTest.java | 38 +- ...ropertiesAndAdditionalPropertiesClass.java | 10 +- .../src/main/java/io/swagger/model/Order.java | 10 +- .../main/java/io/swagger/model/Category.java | 10 +- .../io/swagger/model/ModelApiResponse.java | 12 +- .../src/main/java/io/swagger/model/Order.java | 18 +- .../src/main/java/io/swagger/model/Pet.java | 16 +- .../src/main/java/io/swagger/model/Tag.java | 10 +- .../src/main/java/io/swagger/model/User.java | 22 +- 233 files changed, 4172 insertions(+), 1030 deletions(-) create mode 100644 samples/server/petstore/java-play-framework/.swagger-codegen-ignore create mode 100644 samples/server/petstore/java-play-framework/LICENSE create mode 100644 samples/server/petstore/java-play-framework/README create mode 100644 samples/server/petstore/java-play-framework/app/apimodels/Category.java create mode 100644 samples/server/petstore/java-play-framework/app/apimodels/Order.java create mode 100644 samples/server/petstore/java-play-framework/app/apimodels/Pet.java create mode 100644 samples/server/petstore/java-play-framework/app/apimodels/Tag.java create mode 100644 samples/server/petstore/java-play-framework/app/apimodels/User.java create mode 100644 samples/server/petstore/java-play-framework/app/controllers/ApiDocController.java create mode 100644 samples/server/petstore/java-play-framework/app/controllers/PetApiController.java create mode 100644 samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImp.java create mode 100644 samples/server/petstore/java-play-framework/app/controllers/StoreApiController.java create mode 100644 samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImp.java create mode 100644 samples/server/petstore/java-play-framework/app/controllers/UserApiController.java create mode 100644 samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java create mode 100644 samples/server/petstore/java-play-framework/app/swagger/SwaggerUtils.java create mode 100644 samples/server/petstore/java-play-framework/build.sbt create mode 100644 samples/server/petstore/java-play-framework/conf/application.conf create mode 100644 samples/server/petstore/java-play-framework/conf/logback.xml create mode 100644 samples/server/petstore/java-play-framework/conf/routes create mode 100644 samples/server/petstore/java-play-framework/project/build.properties create mode 100644 samples/server/petstore/java-play-framework/project/plugins.sbt create mode 100644 samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js create mode 100644 samples/server/petstore/nodejs-google-cloud-functions/service/StoreService.js create mode 100644 samples/server/petstore/nodejs-google-cloud-functions/service/UserService.js create mode 100644 samples/server/petstore/nodejs-google-cloud-functions/utils/writer.js create mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApi.java create mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApiController.java create mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java create mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/JacksonConfiguration.java diff --git a/samples/client/petstore/akka-scala/pom.xml b/samples/client/petstore/akka-scala/pom.xml index d37f26cfb4c..0715ac9c4f6 100644 --- a/samples/client/petstore/akka-scala/pom.xml +++ b/samples/client/petstore/akka-scala/pom.xml @@ -2,9 +2,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 io.swagger - scala-akka-petstore-client + swagger-client jar - scala-akka-petstore-client + swagger-client 1.0.0 2.2.0 diff --git a/samples/client/petstore/bash/_petstore-cli b/samples/client/petstore/bash/_petstore-cli index 2d9f4ef773d..5a62059d697 100644 --- a/samples/client/petstore/bash/_petstore-cli +++ b/samples/client/petstore/bash/_petstore-cli @@ -10,7 +10,7 @@ # ! # ! Based on: https://github.com/Valodim/zsh-curl-completion/blob/master/_curl # ! -# ! Generated on: 2017-03-13T20:38:05.746+01:00 +# ! Generated on: 2017-03-15T16:43:11.743+01:00 # ! # ! # ! Installation: diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index 19e64fa6e89..79c470926f3 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -8,7 +8,7 @@ # ! swagger-codegen (https://github.com/swagger-api/swagger-codegen) # ! FROM SWAGGER SPECIFICATION IN JSON. # ! -# ! Generated on: 2017-03-13T20:38:05.746+01:00 +# ! Generated on: 2017-03-15T16:43:11.743+01:00 # ! # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/samples/client/petstore/bash/petstore-cli.bash-completion b/samples/client/petstore/bash/petstore-cli.bash-completion index ba5e11c8083..0cdb9d6def9 100644 --- a/samples/client/petstore/bash/petstore-cli.bash-completion +++ b/samples/client/petstore/bash/petstore-cli.bash-completion @@ -8,7 +8,7 @@ # ! swagger-codegen (https://github.com/swagger-api/swagger-codegen) # ! FROM SWAGGER SPECIFICATION IN JSON. # ! -# ! Generated on: 2017-03-13T20:38:05.746+01:00 +# ! Generated on: 2017-03-15T16:43:11.743+01:00 # ! # ! # ! System wide installation: diff --git a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/README.md b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/README.md index 90bd3728440..7e9048986d5 100644 --- a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/README.md +++ b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/README.md @@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c - API version: 1.0.0 - SDK version: 1.0.0 -- Build date: 2017-03-13T18:03:07.267+01:00 +- Build date: 2017-03-15T16:43:14.410+01:00 - Build package: io.swagger.codegen.languages.CsharpDotNet2ClientCodegen diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln index f51b1980c99..1f24bf0c591 100644 --- a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln +++ b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{1289047F-8FA6-4CE8-A8F2-90F14016B774}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{7A39FC83-4C85-4785-A7BC-D75E4413FC1C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{1289047F-8FA6-4CE8-A8F2-90F14016B774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{1289047F-8FA6-4CE8-A8F2-90F14016B774}.Debug|Any CPU.Build.0 = Debug|Any CPU -{1289047F-8FA6-4CE8-A8F2-90F14016B774}.Release|Any CPU.ActiveCfg = Release|Any CPU -{1289047F-8FA6-4CE8-A8F2-90F14016B774}.Release|Any CPU.Build.0 = Release|Any CPU +{7A39FC83-4C85-4785-A7BC-D75E4413FC1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{7A39FC83-4C85-4785-A7BC-D75E4413FC1C}.Debug|Any CPU.Build.0 = Debug|Any CPU +{7A39FC83-4C85-4785-A7BC-D75E4413FC1C}.Release|Any CPU.ActiveCfg = Release|Any CPU +{7A39FC83-4C85-4785-A7BC-D75E4413FC1C}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj index 55c4b4e9e56..a32467b12c3 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj @@ -11,7 +11,7 @@ Contact: apiteam@swagger.io Debug AnyCPU - {1289047F-8FA6-4CE8-A8F2-90F14016B774} + {7A39FC83-4C85-4785-A7BC-D75E4413FC1C} Library Properties IO.Swagger diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.sln index 6b856a0e98b..1b2100a7cd6 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.sln +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{9BBF43FA-576F-4571-99A7-9BDBB93F6B91}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{2E45FB6E-03CA-4975-94BB-8A38A03A1DB7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{9BBF43FA-576F-4571-99A7-9BDBB93F6B91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{9BBF43FA-576F-4571-99A7-9BDBB93F6B91}.Debug|Any CPU.Build.0 = Debug|Any CPU -{9BBF43FA-576F-4571-99A7-9BDBB93F6B91}.Release|Any CPU.ActiveCfg = Release|Any CPU -{9BBF43FA-576F-4571-99A7-9BDBB93F6B91}.Release|Any CPU.Build.0 = Release|Any CPU +{2E45FB6E-03CA-4975-94BB-8A38A03A1DB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{2E45FB6E-03CA-4975-94BB-8A38A03A1DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU +{2E45FB6E-03CA-4975-94BB-8A38A03A1DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU +{2E45FB6E-03CA-4975-94BB-8A38A03A1DB7}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj index c2edf6a9091..981d8dfd5d1 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj @@ -74,7 +74,7 @@ Contact: apiteam@swagger.io - {9BBF43FA-576F-4571-99A7-9BDBB93F6B91} + {2E45FB6E-03CA-4975-94BB-8A38A03A1DB7} IO.Swagger diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj index f3a3f2da5ac..5d79632ea25 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj @@ -11,7 +11,7 @@ Contact: apiteam@swagger.io Debug AnyCPU - {9BBF43FA-576F-4571-99A7-9BDBB93F6B91} + {2E45FB6E-03CA-4975-94BB-8A38A03A1DB7} Library Properties IO.Swagger diff --git a/samples/client/petstore/java/jersey2-java6/pom.xml b/samples/client/petstore/java/jersey2-java6/pom.xml index f8e7a142779..8e4c6a8ba78 100644 --- a/samples/client/petstore/java/jersey2-java6/pom.xml +++ b/samples/client/petstore/java/jersey2-java6/pom.xml @@ -249,7 +249,7 @@ - 1.5.9 + 1.5.12 2.22.2 2.5 3.5 diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java index 60192509f52..208886d5bed 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeApi.java @@ -53,7 +53,7 @@ public class FakeApi { } // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); @@ -121,7 +121,7 @@ public class FakeApi { } // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); @@ -191,7 +191,7 @@ if (paramCallback != null) Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index f51298081fe..08b909ba04b 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -50,7 +50,7 @@ public class FakeClassnameTags123Api { } // create path and map variables - String localVarPath = "/fake_classname_test".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake_classname_test"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java index e816fce5bad..c8f8b730ca5 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/PetApi.java @@ -51,7 +51,7 @@ public class PetApi { } // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; // query params List localVarQueryParams = new ArrayList(); @@ -92,7 +92,7 @@ public class PetApi { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -136,7 +136,7 @@ public class PetApi { } // create path and map variables - String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByStatus"; // query params List localVarQueryParams = new ArrayList(); @@ -178,7 +178,7 @@ public class PetApi { } // create path and map variables - String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet/findByTags"; // query params List localVarQueryParams = new ArrayList(); @@ -220,7 +220,7 @@ public class PetApi { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -261,7 +261,7 @@ public class PetApi { } // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); + String localVarPath = "/pet"; // query params List localVarQueryParams = new ArrayList(); @@ -303,7 +303,7 @@ public class PetApi { } // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params @@ -351,7 +351,7 @@ if (status != null) } // create path and map variables - String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json") + String localVarPath = "/pet/{petId}/uploadImage" .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); // query params diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/StoreApi.java index 41bd6751871..d0a1e843743 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/StoreApi.java @@ -49,7 +49,7 @@ public class StoreApi { } // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") + String localVarPath = "/store/order/{orderId}" .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params @@ -85,7 +85,7 @@ public class StoreApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/inventory"; // query params List localVarQueryParams = new ArrayList(); @@ -126,7 +126,7 @@ public class StoreApi { } // create path and map variables - String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json") + String localVarPath = "/store/order/{orderId}" .replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString())); // query params @@ -168,7 +168,7 @@ public class StoreApi { } // create path and map variables - String localVarPath = "/store/order".replaceAll("\\{format\\}","json"); + String localVarPath = "/store/order"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/UserApi.java index 7602f4e2ba9..a7dced63d85 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/api/UserApi.java @@ -49,7 +49,7 @@ public class UserApi { } // create path and map variables - String localVarPath = "/user".replaceAll("\\{format\\}","json"); + String localVarPath = "/user"; // query params List localVarQueryParams = new ArrayList(); @@ -89,7 +89,7 @@ public class UserApi { } // create path and map variables - String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithArray"; // query params List localVarQueryParams = new ArrayList(); @@ -129,7 +129,7 @@ public class UserApi { } // create path and map variables - String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/createWithList"; // query params List localVarQueryParams = new ArrayList(); @@ -169,7 +169,7 @@ public class UserApi { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params @@ -211,7 +211,7 @@ public class UserApi { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params @@ -259,7 +259,7 @@ public class UserApi { } // create path and map variables - String localVarPath = "/user/login".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/login"; // query params List localVarQueryParams = new ArrayList(); @@ -295,7 +295,7 @@ public class UserApi { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/logout".replaceAll("\\{format\\}","json"); + String localVarPath = "/user/logout"; // query params List localVarQueryParams = new ArrayList(); @@ -341,7 +341,7 @@ public class UserApi { } // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") + String localVarPath = "/user/{username}" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); // query params diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index d25a531da70..3ae66bbe6e4 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -47,7 +47,7 @@ public class AdditionalPropertiesClass { * Get mapProperty * @return mapProperty **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map getMapProperty() { return mapProperty; } @@ -70,7 +70,7 @@ public class AdditionalPropertiesClass { * Get mapOfMapProperty * @return mapOfMapProperty **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map> getMapOfMapProperty() { return mapOfMapProperty; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java index 6bde500e6a9..094faff9a33 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java @@ -46,7 +46,7 @@ public class Animal { * Get className * @return className **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public String getClassName() { return className; } @@ -64,7 +64,7 @@ public class Animal { * Get color * @return color **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getColor() { return color; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index 6442d6cb9e3..01d49d0f2bd 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -44,7 +44,7 @@ public class ArrayOfArrayOfNumberOnly { * Get arrayArrayNumber * @return arrayArrayNumber **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List> getArrayArrayNumber() { return arrayArrayNumber; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 8b804b0b802..c8e64cfab20 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -44,7 +44,7 @@ public class ArrayOfNumberOnly { * Get arrayNumber * @return arrayNumber **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getArrayNumber() { return arrayNumber; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java index 0a1faf8633d..e82b4fe7c97 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java @@ -50,7 +50,7 @@ public class ArrayTest { * Get arrayOfString * @return arrayOfString **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getArrayOfString() { return arrayOfString; } @@ -73,7 +73,7 @@ public class ArrayTest { * Get arrayArrayOfInteger * @return arrayArrayOfInteger **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -96,7 +96,7 @@ public class ArrayTest { * Get arrayArrayOfModel * @return arrayArrayOfModel **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Capitalization.java index 4a982a45f71..5f21318820d 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Capitalization.java @@ -51,7 +51,7 @@ public class Capitalization { * Get smallCamel * @return smallCamel **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getSmallCamel() { return smallCamel; } @@ -69,7 +69,7 @@ public class Capitalization { * Get capitalCamel * @return capitalCamel **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getCapitalCamel() { return capitalCamel; } @@ -87,7 +87,7 @@ public class Capitalization { * Get smallSnake * @return smallSnake **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getSmallSnake() { return smallSnake; } @@ -105,7 +105,7 @@ public class Capitalization { * Get capitalSnake * @return capitalSnake **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getCapitalSnake() { return capitalSnake; } @@ -123,7 +123,7 @@ public class Capitalization { * Get scAETHFlowPoints * @return scAETHFlowPoints **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -141,7 +141,7 @@ public class Capitalization { * Name of the pet * @return ATT_NAME **/ - @ApiModelProperty(example = "null", value = "Name of the pet ") + @ApiModelProperty(value = "Name of the pet ") public String getATTNAME() { return ATT_NAME; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java index 03d398d9506..9810941ab3c 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java @@ -37,7 +37,7 @@ public class Cat extends Animal { * Get declawed * @return declawed **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Boolean getDeclawed() { return declawed; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java index 49e34cf1a6e..bab0deb78a6 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java @@ -39,7 +39,7 @@ public class Category { * Get id * @return id **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -57,7 +57,7 @@ public class Category { * Get name * @return name **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getName() { return name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java index f682855449e..e83dfe06b54 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java @@ -37,7 +37,7 @@ public class ClassModel { * Get propertyClass * @return propertyClass **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getPropertyClass() { return propertyClass; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java index 49799a3ca84..94b55364ae1 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java @@ -36,7 +36,7 @@ public class Client { * Get client * @return client **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getClient() { return client; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java index e8a8a629ed8..86f53267ca4 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java @@ -37,7 +37,7 @@ public class Dog extends Animal { * Get breed * @return breed **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getBreed() { return breed; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java index d15264a0372..ebcbce243dd 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java @@ -101,7 +101,7 @@ public class EnumArrays { * Get justSymbol * @return justSymbol **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -124,7 +124,7 @@ public class EnumArrays { * Get arrayEnum * @return arrayEnum **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getArrayEnum() { return arrayEnum; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java index b09055b9942..d1e298d6625 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java @@ -138,7 +138,7 @@ public class EnumTest { * Get enumString * @return enumString **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EnumStringEnum getEnumString() { return enumString; } @@ -156,7 +156,7 @@ public class EnumTest { * Get enumInteger * @return enumInteger **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -174,7 +174,7 @@ public class EnumTest { * Get enumNumber * @return enumNumber **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -192,7 +192,7 @@ public class EnumTest { * Get outerEnum * @return outerEnum **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OuterEnum getOuterEnum() { return outerEnum; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java index 76910c24bb5..4737f683aa0 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java @@ -78,7 +78,7 @@ public class FormatTest { * maximum: 100 * @return integer **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getInteger() { return integer; } @@ -98,7 +98,7 @@ public class FormatTest { * maximum: 200 * @return int32 **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getInt32() { return int32; } @@ -116,7 +116,7 @@ public class FormatTest { * Get int64 * @return int64 **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getInt64() { return int64; } @@ -136,7 +136,7 @@ public class FormatTest { * maximum: 543.2 * @return number **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public BigDecimal getNumber() { return number; } @@ -156,7 +156,7 @@ public class FormatTest { * maximum: 987.6 * @return _float **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Float getFloat() { return _float; } @@ -176,7 +176,7 @@ public class FormatTest { * maximum: 123.4 * @return _double **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Double getDouble() { return _double; } @@ -194,7 +194,7 @@ public class FormatTest { * Get string * @return string **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getString() { return string; } @@ -212,7 +212,7 @@ public class FormatTest { * Get _byte * @return _byte **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public byte[] getByte() { return _byte; } @@ -230,7 +230,7 @@ public class FormatTest { * Get binary * @return binary **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public byte[] getBinary() { return binary; } @@ -248,7 +248,7 @@ public class FormatTest { * Get date * @return date **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public LocalDate getDate() { return date; } @@ -266,7 +266,7 @@ public class FormatTest { * Get dateTime * @return dateTime **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OffsetDateTime getDateTime() { return dateTime; } @@ -284,7 +284,7 @@ public class FormatTest { * Get uuid * @return uuid **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public UUID getUuid() { return uuid; } @@ -302,7 +302,7 @@ public class FormatTest { * Get password * @return password **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public String getPassword() { return password; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 2c7bd1eed1e..85a2b788ef0 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -34,7 +34,7 @@ public class HasOnlyReadOnly { * Get bar * @return bar **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getBar() { return bar; } @@ -43,7 +43,7 @@ public class HasOnlyReadOnly { * Get foo * @return foo **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFoo() { return foo; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java index 770b018c3e4..61b09c151d6 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java @@ -77,7 +77,7 @@ public class MapTest { * Get mapMapOfString * @return mapMapOfString **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map> getMapMapOfString() { return mapMapOfString; } @@ -100,7 +100,7 @@ public class MapTest { * Get mapOfEnumString * @return mapOfEnumString **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map getMapOfEnumString() { return mapOfEnumString; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index b9da5e384a2..3c21d7c6db8 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -48,7 +48,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * Get uuid * @return uuid **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public UUID getUuid() { return uuid; } @@ -66,7 +66,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * Get dateTime * @return dateTime **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OffsetDateTime getDateTime() { return dateTime; } @@ -89,7 +89,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * Get map * @return map **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map getMap() { return map; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java index 23dba81e4bf..03dc410f058 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java @@ -40,7 +40,7 @@ public class Model200Response { * Get name * @return name **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getName() { return name; } @@ -58,7 +58,7 @@ public class Model200Response { * Get propertyClass * @return propertyClass **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getPropertyClass() { return propertyClass; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java index 6eddaf96ac6..daa1f75b5c7 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -42,7 +42,7 @@ public class ModelApiResponse { * Get code * @return code **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getCode() { return code; } @@ -60,7 +60,7 @@ public class ModelApiResponse { * Get type * @return type **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getType() { return type; } @@ -78,7 +78,7 @@ public class ModelApiResponse { * Get message * @return message **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getMessage() { return message; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java index 26925e54c65..299742d50f2 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java @@ -37,7 +37,7 @@ public class ModelReturn { * Get _return * @return _return **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getReturn() { return _return; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java index a4ddcaef6b3..ff901a298a6 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java @@ -46,7 +46,7 @@ public class Name { * Get name * @return name **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public Integer getName() { return name; } @@ -59,7 +59,7 @@ public class Name { * Get snakeCase * @return snakeCase **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getSnakeCase() { return snakeCase; } @@ -73,7 +73,7 @@ public class Name { * Get property * @return property **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getProperty() { return property; } @@ -86,7 +86,7 @@ public class Name { * Get _123Number * @return _123Number **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer get123Number() { return _123Number; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java index 07eb245e799..75b2331d52b 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java @@ -37,7 +37,7 @@ public class NumberOnly { * Get justNumber * @return justNumber **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public BigDecimal getJustNumber() { return justNumber; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java index 732470801fe..2e9a960e5ca 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java @@ -84,7 +84,7 @@ public class Order { * Get id * @return id **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -102,7 +102,7 @@ public class Order { * Get petId * @return petId **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getPetId() { return petId; } @@ -120,7 +120,7 @@ public class Order { * Get quantity * @return quantity **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getQuantity() { return quantity; } @@ -138,7 +138,7 @@ public class Order { * Get shipDate * @return shipDate **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OffsetDateTime getShipDate() { return shipDate; } @@ -156,7 +156,7 @@ public class Order { * Order Status * @return status **/ - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") public StatusEnum getStatus() { return status; } @@ -174,7 +174,7 @@ public class Order { * Get complete * @return complete **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Boolean getComplete() { return complete; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java index 98d279c74ea..aad6032fca5 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java @@ -87,7 +87,7 @@ public class Pet { * Get id * @return id **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -105,7 +105,7 @@ public class Pet { * Get category * @return category **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Category getCategory() { return category; } @@ -146,7 +146,7 @@ public class Pet { * Get photoUrls * @return photoUrls **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public List getPhotoUrls() { return photoUrls; } @@ -169,7 +169,7 @@ public class Pet { * Get tags * @return tags **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getTags() { return tags; } @@ -187,7 +187,7 @@ public class Pet { * pet status in the store * @return status **/ - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") public StatusEnum getStatus() { return status; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 17704aaa98b..5aa0e9275a2 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -34,7 +34,7 @@ public class ReadOnlyFirst { * Get bar * @return bar **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getBar() { return bar; } @@ -48,7 +48,7 @@ public class ReadOnlyFirst { * Get baz * @return baz **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getBaz() { return baz; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java index 29e3c93931d..527fc647eaf 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -36,7 +36,7 @@ public class SpecialModelName { * Get specialPropertyName * @return specialPropertyName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getSpecialPropertyName() { return specialPropertyName; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java index 8ad6341b843..94764acde85 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java @@ -39,7 +39,7 @@ public class Tag { * Get id * @return id **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -57,7 +57,7 @@ public class Tag { * Get name * @return name **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getName() { return name; } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java index 98ac173d267..5bedd26f272 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java @@ -57,7 +57,7 @@ public class User { * Get id * @return id **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -75,7 +75,7 @@ public class User { * Get username * @return username **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getUsername() { return username; } @@ -93,7 +93,7 @@ public class User { * Get firstName * @return firstName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFirstName() { return firstName; } @@ -111,7 +111,7 @@ public class User { * Get lastName * @return lastName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getLastName() { return lastName; } @@ -129,7 +129,7 @@ public class User { * Get email * @return email **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getEmail() { return email; } @@ -147,7 +147,7 @@ public class User { * Get password * @return password **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getPassword() { return password; } @@ -165,7 +165,7 @@ public class User { * Get phone * @return phone **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getPhone() { return phone; } @@ -183,7 +183,7 @@ public class User { * User Status * @return userStatus **/ - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") public Integer getUserStatus() { return userStatus; } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index f51298081fe..08b909ba04b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -50,7 +50,7 @@ public class FakeClassnameTags123Api { } // create path and map variables - String localVarPath = "/fake_classname_test".replaceAll("\\{format\\}","json"); + String localVarPath = "/fake_classname_test"; // query params List localVarQueryParams = new ArrayList(); diff --git a/samples/client/petstore/javascript/src/api/Fake_classname_tags123Api.js b/samples/client/petstore/javascript/src/api/Fake_classname_tags123Api.js index 60826be9b1f..87caab43ce8 100644 --- a/samples/client/petstore/javascript/src/api/Fake_classname_tags123Api.js +++ b/samples/client/petstore/javascript/src/api/Fake_classname_tags123Api.js @@ -63,7 +63,7 @@ var postBody = body; // verify the required parameter 'body' is set - if (body == undefined || body == null) { + if (body === undefined || body === null) { throw new Error("Missing the required parameter 'body' when calling testClassname"); } diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m index c0ca97c3480..36a2a6d700a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m @@ -60,9 +60,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -132,9 +129,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/{petId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (petId != nil) { pathParams[@"petId"] = petId; @@ -195,9 +189,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; completionHandler: (void (^)(NSArray* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByStatus"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -256,9 +247,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; completionHandler: (void (^)(NSArray* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/findByTags"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -328,9 +316,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/{petId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (petId != nil) { pathParams[@"petId"] = petId; @@ -388,9 +373,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -463,9 +445,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/{petId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (petId != nil) { pathParams[@"petId"] = petId; @@ -546,9 +525,6 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet/{petId}/uploadImage"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (petId != nil) { pathParams[@"petId"] = petId; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m index 2a17173f83a..ebf27ab982a 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m @@ -71,9 +71,6 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order/{orderId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (orderId != nil) { pathParams[@"orderId"] = orderId; @@ -129,9 +126,6 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; (void (^)(NSDictionary* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/inventory"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -197,9 +191,6 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order/{orderId}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (orderId != nil) { pathParams[@"orderId"] = orderId; @@ -257,9 +248,6 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m index e1acf3af007..2a1c4ecda81 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m @@ -60,9 +60,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -118,9 +115,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -176,9 +170,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -245,9 +236,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (username != nil) { pathParams[@"username"] = username; @@ -316,9 +304,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (username != nil) { pathParams[@"username"] = username; @@ -379,9 +364,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; completionHandler: (void (^)(NSString* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/login"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -440,9 +422,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/logout"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary* queryParams = [[NSMutableDictionary alloc] init]; @@ -511,9 +490,6 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/{username}"]; - // remove format in URL if needed - [resourcePath replaceOccurrencesOfString:@".{format}" withString:@".json" options:0 range:NSMakeRange(0,resourcePath.length)]; - NSMutableDictionary *pathParams = [[NSMutableDictionary alloc] init]; if (username != nil) { pathParams[@"username"] = username; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m index f757e139d0e..4b1d014d2bc 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.m @@ -89,7 +89,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { #pragma mark - Task Methods - (NSURLSessionDataTask*) taskWithCompletionBlock: (NSURLRequest *)request completionBlock: (void (^)(id, NSError *))completionBlock { - + NSURLSessionDataTask *task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { SWGDebugLogResponse(response, responseObject,request,error); if(!error) { @@ -104,7 +104,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; completionBlock(nil, augmentedError); }]; - + return task; } @@ -135,7 +135,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { completionBlock(file, nil); }]; - + return task; } @@ -222,7 +222,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { [self postProcessRequest:request]; - + NSURLSessionTask *task = nil; if ([self.downloadTaskResponseTypes containsObject:responseType]) { @@ -241,9 +241,9 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { completionBlock(response, error); }]; } - + [task resume]; - + return task; } @@ -330,7 +330,7 @@ static NSString * SWG__fileNameForResponse(NSURLResponse *response) { NSMutableDictionary *headersWithAuth = [NSMutableDictionary dictionaryWithDictionary:*headers]; NSMutableDictionary *querysWithAuth = [NSMutableDictionary dictionaryWithDictionary:*querys]; - + id config = self.configuration; for (NSString *auth in authSettings) { NSDictionary *authSetting = config.authSettings[auth]; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeClassnameTags123Api.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeClassnameTags123Api.pm index 568c14216c7..ca6e2fe57c8 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeClassnameTags123Api.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeClassnameTags123Api.pm @@ -83,7 +83,6 @@ sub test_classname { # parse inputs my $_resource_path = '/fake_classname_test'; - $_resource_path =~ s/{format}/json/; # default format to json my $_method = 'PATCH'; my $query_params = {}; diff --git a/samples/client/petstore/python/petstore_api/apis/fake_classname_tags_123_api.py b/samples/client/petstore/python/petstore_api/apis/fake_classname_tags_123_api.py index 1797c8c7a91..429f3ad8819 100644 --- a/samples/client/petstore/python/petstore_api/apis/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python/petstore_api/apis/fake_classname_tags_123_api.py @@ -106,7 +106,6 @@ class FakeClassnameTags123Api(object): collection_formats = {} - resource_path = '/fake_classname_test'.replace('{format}', 'json') path_params = {} query_params = {} @@ -130,7 +129,7 @@ class FakeClassnameTags123Api(object): # Authentication setting auth_settings = [] - return self.api_client.call_api(resource_path, 'PATCH', + return self.api_client.call_api('/fake_classname_test', 'PATCH', path_params, query_params, header_params, diff --git a/samples/client/petstore/qt5cpp/client/SWGHelpers.cpp b/samples/client/petstore/qt5cpp/client/SWGHelpers.cpp index 83b0c7f66b7..5b7dd31fb98 100644 --- a/samples/client/petstore/qt5cpp/client/SWGHelpers.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGHelpers.cpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace Swagger { diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 33eebedc093..ea58b920fc2 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -41,7 +41,7 @@ module Petstore # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling FakeClassnameTags123Api.test_classname" if body.nil? # resource path - local_var_path = "/fake_classname_test".sub('{format}','json') + local_var_path = "/fake_classname_test" # query parameters query_params = {} diff --git a/samples/client/petstore/scala/pom.xml b/samples/client/petstore/scala/pom.xml index 27055cbbdc6..f8c0f909c14 100644 --- a/samples/client/petstore/scala/pom.xml +++ b/samples/client/petstore/scala/pom.xml @@ -210,7 +210,7 @@ 1.2 2.2 1.19 - 1.5.9 + 1.5.12 1.0.5 1.0.0 2.4.2 diff --git a/samples/client/petstore/spring-cloud/pom.xml b/samples/client/petstore/spring-cloud/pom.xml index 3fbbe9f7017..80f9232eed3 100644 --- a/samples/client/petstore/spring-cloud/pom.xml +++ b/samples/client/petstore/spring-cloud/pom.xml @@ -69,4 +69,4 @@ test - \ No newline at end of file + diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index b29cedcf817..b01adc6849e 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -166,16 +166,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" } ]}, {contentType=application/xml, example= 123456789 doggie @@ -189,16 +189,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" } ]}, {contentType=application/xml, example= 123456789 doggie @@ -257,16 +257,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" }}, {contentType=application/xml, example= 123456789 doggie @@ -280,16 +280,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" }}, {contentType=application/xml, example= 123456789 doggie diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 6e2c98864b1..3a675425408 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -68,10 +68,10 @@ public class StoreAPI: APIBase { - type: apiKey api_key - name: api_key - examples: [{contentType=application/json, example={ - "key" : 123 + "key" : 0 }}, {contentType=application/xml, example=}] - examples: [{contentType=application/json, example={ - "key" : 123 + "key" : 0 }}, {contentType=application/xml, example=}] - returns: RequestBuilder<[String:Int32]> @@ -109,12 +109,12 @@ public class StoreAPI: APIBase { - GET /store/order/{orderId} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -124,12 +124,12 @@ public class StoreAPI: APIBase { true }] - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -177,12 +177,12 @@ public class StoreAPI: APIBase { - POST /store/order - - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -192,12 +192,12 @@ public class StoreAPI: APIBase { true }] - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index 0891f2cd372..e4aacc5b01c 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -171,9 +171,9 @@ public class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 123, + "userStatus" : 6, "phone" : "aeiou", - "id" : 123456789, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}, {contentType=application/xml, example= @@ -190,9 +190,9 @@ public class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 123, + "userStatus" : 6, "phone" : "aeiou", - "id" : 123456789, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}, {contentType=application/xml, example= diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index 5527956a09d..dd512ab857b 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -236,16 +236,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" } ]}, {contentType=application/xml, example= 123456789 doggie @@ -259,16 +259,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" } ]}, {contentType=application/xml, example= 123456789 doggie @@ -344,16 +344,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" }}, {contentType=application/xml, example= 123456789 doggie @@ -367,16 +367,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" }}, {contentType=application/xml, example= 123456789 doggie diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index b6c59b7aff5..5cb8d755a15 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -102,10 +102,10 @@ public class StoreAPI: APIBase { - type: apiKey api_key - name: api_key - examples: [{contentType=application/json, example={ - "key" : 123 + "key" : 0 }}, {contentType=application/xml, example=}] - examples: [{contentType=application/json, example={ - "key" : 123 + "key" : 0 }}, {contentType=application/xml, example=}] - returns: RequestBuilder<[String:Int32]> @@ -160,12 +160,12 @@ public class StoreAPI: APIBase { - GET /store/order/{orderId} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -175,12 +175,12 @@ public class StoreAPI: APIBase { true }] - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -245,12 +245,12 @@ public class StoreAPI: APIBase { - POST /store/order - - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -260,12 +260,12 @@ public class StoreAPI: APIBase { true }] - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index 07c05056ea3..1110a6a0377 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -257,9 +257,9 @@ public class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 123, + "userStatus" : 6, "phone" : "aeiou", - "id" : 123456789, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}, {contentType=application/xml, example= @@ -276,9 +276,9 @@ public class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 123, + "userStatus" : 6, "phone" : "aeiou", - "id" : 123456789, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}, {contentType=application/xml, example= diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index 0fac18f1f0e..4f0048bb1e8 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -244,16 +244,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" } ]}, {contentType=application/xml, example= 123456789 doggie @@ -267,16 +267,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" } ]}, {contentType=application/xml, example= 123456789 doggie @@ -354,16 +354,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" }}, {contentType=application/xml, example= 123456789 doggie @@ -377,16 +377,16 @@ public class PetAPI: APIBase { - examples: [{contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 123456789, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 123456789 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 123456789 + "id" : 1 } ], - "status" : "aeiou" + "status" : "available" }}, {contentType=application/xml, example= 123456789 doggie diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index a6c71ed31b6..ec2b44008e6 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -106,10 +106,10 @@ public class StoreAPI: APIBase { - type: apiKey api_key - name: api_key - examples: [{contentType=application/json, example={ - "key" : 123 + "key" : 0 }}, {contentType=application/xml, example=}] - examples: [{contentType=application/json, example={ - "key" : 123 + "key" : 0 }}, {contentType=application/xml, example=}] - returns: RequestBuilder<[String:Int32]> @@ -166,12 +166,12 @@ public class StoreAPI: APIBase { - GET /store/order/{orderId} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -181,12 +181,12 @@ public class StoreAPI: APIBase { true }] - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -253,12 +253,12 @@ public class StoreAPI: APIBase { - POST /store/order - - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 @@ -268,12 +268,12 @@ public class StoreAPI: APIBase { true }] - examples: [{contentType=application/json, example={ - "petId" : 123456789, - "quantity" : 123, - "id" : 123456789, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : true, - "status" : "aeiou" + "status" : "placed" }}, {contentType=application/xml, example= 123456789 123456789 diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index e4782e6f499..a4cbb8940be 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -267,9 +267,9 @@ public class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 123, + "userStatus" : 6, "phone" : "aeiou", - "id" : 123456789, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}, {contentType=application/xml, example= @@ -286,9 +286,9 @@ public class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 123, + "userStatus" : 6, "phone" : "aeiou", - "id" : 123456789, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}, {contentType=application/xml, example= diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index dbf493f1fc6..091e0d45664 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -134,14 +134,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 7, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 4 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 5 + "id" : 1 } ], "status" : "available" } ]}] @@ -157,14 +157,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 7, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 4 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 5 + "id" : 1 } ], "status" : "available" } ]}] @@ -221,14 +221,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 3, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 2 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 9 + "id" : 1 } ], "status" : "available" } ]}] @@ -244,14 +244,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 3, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 2 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 9 + "id" : 1 } ], "status" : "available" } ]}] @@ -308,14 +308,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 8, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 2 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 8 + "id" : 1 } ], "status" : "available" }}] @@ -331,14 +331,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 8, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 2 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 8 + "id" : 1 } ], "status" : "available" }}] @@ -471,7 +471,7 @@ open class PetAPI: APIBase { - type: oauth2 - name: petstore_auth - examples: [{contentType=application/json, example={ - "code" : 9, + "code" : 0, "type" : "aeiou", "message" : "aeiou" }}] diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index e5c05eb3f68..0b394d213d1 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -66,7 +66,7 @@ open class StoreAPI: APIBase { - type: apiKey api_key - name: api_key - examples: [{contentType=application/json, example={ - "key" : 5 + "key" : 0 }}] - returns: RequestBuilder<[String:Int32]> @@ -109,8 +109,8 @@ open class StoreAPI: APIBase { aeiou true }, {contentType=application/json, example={ - "petId" : 8, - "quantity" : 9, + "petId" : 6, + "quantity" : 1, "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, @@ -124,8 +124,8 @@ open class StoreAPI: APIBase { aeiou true }, {contentType=application/json, example={ - "petId" : 8, - "quantity" : 9, + "petId" : 6, + "quantity" : 1, "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, @@ -176,8 +176,8 @@ open class StoreAPI: APIBase { true }, {contentType=application/json, example={ "petId" : 6, - "quantity" : 6, - "id" : 7, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, "status" : "placed" @@ -191,8 +191,8 @@ open class StoreAPI: APIBase { true }, {contentType=application/json, example={ "petId" : 6, - "quantity" : 6, - "id" : 7, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, "status" : "placed" diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index 4047e9a5fa8..c21366cce7d 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -181,9 +181,9 @@ open class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 8, + "userStatus" : 6, "phone" : "aeiou", - "id" : 6, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}] @@ -200,9 +200,9 @@ open class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 8, + "userStatus" : 6, "phone" : "aeiou", - "id" : 6, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}] diff --git a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index 9def73d93f1..1b4f331fc1d 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -187,14 +187,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 5, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 5 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 4 + "id" : 1 } ], "status" : "available" } ]}] @@ -210,14 +210,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 5, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 5 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 4 + "id" : 1 } ], "status" : "available" } ]}] @@ -294,11 +294,11 @@ open class PetAPI: APIBase { "id" : 0, "category" : { "name" : "aeiou", - "id" : 3 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 8 + "id" : 1 } ], "status" : "available" } ]}] @@ -317,11 +317,11 @@ open class PetAPI: APIBase { "id" : 0, "category" : { "name" : "aeiou", - "id" : 3 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 8 + "id" : 1 } ], "status" : "available" } ]}] @@ -398,11 +398,11 @@ open class PetAPI: APIBase { "id" : 0, "category" : { "name" : "aeiou", - "id" : 8 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 7 + "id" : 1 } ], "status" : "available" }}] @@ -421,11 +421,11 @@ open class PetAPI: APIBase { "id" : 0, "category" : { "name" : "aeiou", - "id" : 8 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 7 + "id" : 1 } ], "status" : "available" }}] @@ -613,7 +613,7 @@ open class PetAPI: APIBase { - type: oauth2 - name: petstore_auth - examples: [{contentType=application/json, example={ - "code" : 7, + "code" : 0, "type" : "aeiou", "message" : "aeiou" }}] diff --git a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 8d606e128a1..13f36567382 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -100,7 +100,7 @@ open class StoreAPI: APIBase { - type: apiKey api_key - name: api_key - examples: [{contentType=application/json, example={ - "key" : 7 + "key" : 0 }}] - returns: RequestBuilder<[String:Int32]> @@ -161,7 +161,7 @@ open class StoreAPI: APIBase { true }, {contentType=application/json, example={ "petId" : 6, - "quantity" : 5, + "quantity" : 1, "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, @@ -176,7 +176,7 @@ open class StoreAPI: APIBase { true }, {contentType=application/json, example={ "petId" : 6, - "quantity" : 5, + "quantity" : 1, "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, @@ -243,9 +243,9 @@ open class StoreAPI: APIBase { aeiou true }, {contentType=application/json, example={ - "petId" : 9, - "quantity" : 9, - "id" : 3, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, "status" : "placed" @@ -258,9 +258,9 @@ open class StoreAPI: APIBase { aeiou true }, {contentType=application/json, example={ - "petId" : 9, - "quantity" : 9, - "id" : 3, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, "status" : "placed" diff --git a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index a468f08bc55..02bd372ac49 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -267,7 +267,7 @@ open class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 5, + "userStatus" : 6, "phone" : "aeiou", "id" : 0, "email" : "aeiou", @@ -286,7 +286,7 @@ open class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 5, + "userStatus" : 6, "phone" : "aeiou", "id" : 0, "email" : "aeiou", diff --git a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index 15cc157b59b..5c457e4eb02 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -193,7 +193,7 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 6, + "id" : 0, "category" : { "name" : "aeiou", "id" : 6 @@ -216,7 +216,7 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 6, + "id" : 0, "category" : { "name" : "aeiou", "id" : 6 @@ -299,14 +299,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 2, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 1 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 2 + "id" : 1 } ], "status" : "available" } ]}] @@ -322,14 +322,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example=[ { "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 2, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 1 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 2 + "id" : 1 } ], "status" : "available" } ]}] @@ -405,14 +405,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 8, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 7 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 7 + "id" : 1 } ], "status" : "available" }}] @@ -428,14 +428,14 @@ open class PetAPI: APIBase { }, {contentType=application/json, example={ "photoUrls" : [ "aeiou" ], "name" : "doggie", - "id" : 8, + "id" : 0, "category" : { "name" : "aeiou", - "id" : 7 + "id" : 6 }, "tags" : [ { "name" : "aeiou", - "id" : 7 + "id" : 1 } ], "status" : "available" }}] @@ -629,7 +629,7 @@ open class PetAPI: APIBase { - type: oauth2 - name: petstore_auth - examples: [{contentType=application/json, example={ - "code" : 9, + "code" : 0, "type" : "aeiou", "message" : "aeiou" }}] diff --git a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 13ad904e749..ffbf34c9cd8 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -104,7 +104,7 @@ open class StoreAPI: APIBase { - type: apiKey api_key - name: api_key - examples: [{contentType=application/json, example={ - "key" : 9 + "key" : 0 }}] - returns: RequestBuilder<[String:Int32]> @@ -166,9 +166,9 @@ open class StoreAPI: APIBase { aeiou true }, {contentType=application/json, example={ - "petId" : 0, - "quantity" : 0, - "id" : 2, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, "status" : "placed" @@ -181,9 +181,9 @@ open class StoreAPI: APIBase { aeiou true }, {contentType=application/json, example={ - "petId" : 0, - "quantity" : 0, - "id" : 2, + "petId" : 6, + "quantity" : 1, + "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, "status" : "placed" @@ -251,8 +251,8 @@ open class StoreAPI: APIBase { aeiou true }, {contentType=application/json, example={ - "petId" : 4, - "quantity" : 3, + "petId" : 6, + "quantity" : 1, "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, @@ -266,8 +266,8 @@ open class StoreAPI: APIBase { aeiou true }, {contentType=application/json, example={ - "petId" : 4, - "quantity" : 3, + "petId" : 6, + "quantity" : 1, "id" : 0, "shipDate" : "2000-01-23T04:56:07.000+00:00", "complete" : false, diff --git a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index 0961f6d8efa..a2a0cd23970 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -277,9 +277,9 @@ open class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 2, + "userStatus" : 6, "phone" : "aeiou", - "id" : 7, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}] @@ -296,9 +296,9 @@ open class UserAPI: APIBase { "firstName" : "aeiou", "lastName" : "aeiou", "password" : "aeiou", - "userStatus" : 2, + "userStatus" : 6, "phone" : "aeiou", - "id" : 7, + "id" : 0, "email" : "aeiou", "username" : "aeiou" }}] diff --git a/samples/client/petstore/typescript-angular2/npm/README.md b/samples/client/petstore/typescript-angular2/npm/README.md index b92e4be434d..e983ce170f6 100644 --- a/samples/client/petstore/typescript-angular2/npm/README.md +++ b/samples/client/petstore/typescript-angular2/npm/README.md @@ -1,4 +1,4 @@ -## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703132058 +## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703151645 ### Building @@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's. _published:_ ``` -npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703132058 --save +npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201703151645 --save ``` _unPublished (not recommended):_ diff --git a/samples/client/petstore/typescript-angular2/npm/package.json b/samples/client/petstore/typescript-angular2/npm/package.json index be3f2281b9e..307db0564d0 100644 --- a/samples/client/petstore/typescript-angular2/npm/package.json +++ b/samples/client/petstore/typescript-angular2/npm/package.json @@ -1,6 +1,6 @@ { "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1-SNAPSHOT.201703132058", + "version": "0.0.1-SNAPSHOT.201703151645", "description": "swagger client for @swagger/angular2-typescript-petstore", "author": "Swagger Codegen Contributors", "keywords": [ diff --git a/samples/client/petstore/typescript-jquery/npm/package.json b/samples/client/petstore/typescript-jquery/npm/package.json index 89b35a0787a..6db14a66a2a 100644 --- a/samples/client/petstore/typescript-jquery/npm/package.json +++ b/samples/client/petstore/typescript-jquery/npm/package.json @@ -1,6 +1,6 @@ { "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1-SNAPSHOT.201703061507", + "version": "0.0.1-SNAPSHOT.201703151645", "description": "JQuery client for @swagger/angular2-typescript-petstore", "main": "api.js", "scripts": { diff --git a/samples/html/index.html b/samples/html/index.html index 57726e2ecf8..df37d5bf5b1 100644 --- a/samples/html/index.html +++ b/samples/html/index.html @@ -356,18 +356,18 @@ font-style: italic;

Example data

Content-Type: application/json
[ {
-  "tags" : [ {
-    "id" : 7,
-    "name" : "aeiou"
-  } ],
-  "id" : 2,
-  "category" : {
-    "id" : 2,
-    "name" : "aeiou"
-  },
-  "status" : "available",
+  "photoUrls" : [ "aeiou" ],
   "name" : "doggie",
-  "photoUrls" : [ "aeiou" ]
+  "id" : 0,
+  "category" : {
+    "name" : "aeiou",
+    "id" : 6
+  },
+  "tags" : [ {
+    "name" : "aeiou",
+    "id" : 1
+  } ],
+  "status" : "available"
 } ]

Produces

@@ -429,18 +429,18 @@ font-style: italic;

Example data

Content-Type: application/json
[ {
-  "tags" : [ {
-    "id" : 1,
-    "name" : "aeiou"
-  } ],
-  "id" : 9,
-  "category" : {
-    "id" : 4,
-    "name" : "aeiou"
-  },
-  "status" : "available",
+  "photoUrls" : [ "aeiou" ],
   "name" : "doggie",
-  "photoUrls" : [ "aeiou" ]
+  "id" : 0,
+  "category" : {
+    "name" : "aeiou",
+    "id" : 6
+  },
+  "tags" : [ {
+    "name" : "aeiou",
+    "id" : 1
+  } ],
+  "status" : "available"
 } ]

Produces

@@ -502,18 +502,18 @@ font-style: italic;

Example data

Content-Type: application/json
{
-  "tags" : [ {
-    "id" : 5,
-    "name" : "aeiou"
-  } ],
-  "id" : 8,
-  "category" : {
-    "id" : 3,
-    "name" : "aeiou"
-  },
-  "status" : "available",
+  "photoUrls" : [ "aeiou" ],
   "name" : "doggie",
-  "photoUrls" : [ "aeiou" ]
+  "id" : 0,
+  "category" : {
+    "name" : "aeiou",
+    "id" : 6
+  },
+  "tags" : [ {
+    "name" : "aeiou",
+    "id" : 1
+  } ],
+  "status" : "available"
 }

Produces

@@ -679,9 +679,9 @@ font-style: italic;

Example data

Content-Type: application/json
{
-  "message" : "aeiou",
-  "code" : 3,
-  "type" : "aeiou"
+  "code" : 0,
+  "type" : "aeiou",
+  "message" : "aeiou"
 }

Produces

@@ -762,7 +762,7 @@ font-style: italic;

Example data

Content-Type: application/json
{
-  "key" : 9
+  "key" : 0
 }

Produces

@@ -818,12 +818,12 @@ font-style: italic;

Example data

Content-Type: application/json
{
-  "id" : 5,
-  "petId" : 8,
+  "petId" : 6,
+  "quantity" : 1,
+  "id" : 0,
+  "shipDate" : "2000-01-23T04:56:07.000+00:00",
   "complete" : false,
-  "status" : "placed",
-  "quantity" : 4,
-  "shipDate" : "2000-01-23T04:56:07.000+00:00"
+  "status" : "placed"
 }

Produces

@@ -887,12 +887,12 @@ font-style: italic;

Example data

Content-Type: application/json
{
-  "id" : 6,
-  "petId" : 9,
+  "petId" : 6,
+  "quantity" : 1,
+  "id" : 0,
+  "shipDate" : "2000-01-23T04:56:07.000+00:00",
   "complete" : false,
-  "status" : "placed",
-  "quantity" : 2,
-  "shipDate" : "2000-01-23T04:56:07.000+00:00"
+  "status" : "placed"
 }

Produces

@@ -1109,14 +1109,14 @@ font-style: italic;

Example data

Content-Type: application/json
{
-  "id" : 4,
-  "lastName" : "aeiou",
-  "phone" : "aeiou",
-  "username" : "aeiou",
-  "email" : "aeiou",
-  "userStatus" : 1,
   "firstName" : "aeiou",
-  "password" : "aeiou"
+  "lastName" : "aeiou",
+  "password" : "aeiou",
+  "userStatus" : 6,
+  "phone" : "aeiou",
+  "id" : 0,
+  "email" : "aeiou",
+  "username" : "aeiou"
 }

Produces

diff --git a/samples/html2/index.html b/samples/html2/index.html index d4754c0d84c..8e6032c4fef 100644 --- a/samples/html2/index.html +++ b/samples/html2/index.html @@ -7293,7 +7293,7 @@ except ApiException as e:
- Generated 2017-03-13T21:00:41.149+01:00 + Generated 2017-03-15T16:43:35.978+01:00
diff --git a/samples/server/petstore/aspnetcore/IO.Swagger.sln b/samples/server/petstore/aspnetcore/IO.Swagger.sln index 4b5556c3c4e..90bfe85c64c 100644 --- a/samples/server/petstore/aspnetcore/IO.Swagger.sln +++ b/samples/server/petstore/aspnetcore/IO.Swagger.sln @@ -7,7 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution global.json = global.json EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.xproj", "{94E80C7B-1E0B-4A99-9EDC-AA6CADE4B45A}" +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.xproj", "{4AD738F8-0EE6-48AF-9501-113739BD4D31}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,10 +15,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {94E80C7B-1E0B-4A99-9EDC-AA6CADE4B45A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {94E80C7B-1E0B-4A99-9EDC-AA6CADE4B45A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {94E80C7B-1E0B-4A99-9EDC-AA6CADE4B45A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {94E80C7B-1E0B-4A99-9EDC-AA6CADE4B45A}.Release|Any CPU.Build.0 = Release|Any CPU + {4AD738F8-0EE6-48AF-9501-113739BD4D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4AD738F8-0EE6-48AF-9501-113739BD4D31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4AD738F8-0EE6-48AF-9501-113739BD4D31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4AD738F8-0EE6-48AF-9501-113739BD4D31}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/server/petstore/aspnetcore/src/IO.Swagger/IO.Swagger.xproj b/samples/server/petstore/aspnetcore/src/IO.Swagger/IO.Swagger.xproj index c22ef91d084..85c75e658df 100644 --- a/samples/server/petstore/aspnetcore/src/IO.Swagger/IO.Swagger.xproj +++ b/samples/server/petstore/aspnetcore/src/IO.Swagger/IO.Swagger.xproj @@ -6,7 +6,7 @@
- {94E80C7B-1E0B-4A99-9EDC-AA6CADE4B45A} + {4AD738F8-0EE6-48AF-9501-113739BD4D31} IO.Swagger .\obj .\bin\ diff --git a/samples/server/petstore/flaskConnexion-python2/swagger_server/swagger/swagger.yaml b/samples/server/petstore/flaskConnexion-python2/swagger_server/swagger/swagger.yaml index a12fa87d872..92590b31bc1 100644 --- a/samples/server/petstore/flaskConnexion-python2/swagger_server/swagger/swagger.yaml +++ b/samples/server/petstore/flaskConnexion-python2/swagger_server/swagger/swagger.yaml @@ -108,11 +108,11 @@ paths: type: "array" items: type: "string" - default: "available" enum: - "available" - "pending" - "sold" + default: "available" collectionFormat: "csv" responses: 200: diff --git a/samples/server/petstore/flaskConnexion/swagger_server/swagger/swagger.yaml b/samples/server/petstore/flaskConnexion/swagger_server/swagger/swagger.yaml index a12fa87d872..92590b31bc1 100644 --- a/samples/server/petstore/flaskConnexion/swagger_server/swagger/swagger.yaml +++ b/samples/server/petstore/flaskConnexion/swagger_server/swagger/swagger.yaml @@ -108,11 +108,11 @@ paths: type: "array" items: type: "string" - default: "available" enum: - "available" - "pending" - "sold" + default: "available" collectionFormat: "csv" responses: 200: diff --git a/samples/server/petstore/go-api-server/go/README.md b/samples/server/petstore/go-api-server/go/README.md index acae960902e..39fee404e76 100644 --- a/samples/server/petstore/go-api-server/go/README.md +++ b/samples/server/petstore/go-api-server/go/README.md @@ -13,7 +13,7 @@ To see how to make this your own, look here: [README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md) - API version: 1.0.0 -- Build date: 2017-03-13T21:03:08.652+01:00 +- Build date: 2017-03-15T16:43:30.840+01:00 ### Running the server diff --git a/samples/server/petstore/java-msf4j/pom.xml b/samples/server/petstore/java-msf4j/pom.xml index d25dba1ac73..84aac08e9d3 100644 --- a/samples/server/petstore/java-msf4j/pom.xml +++ b/samples/server/petstore/java-msf4j/pom.xml @@ -1,14 +1,17 @@ + + org.wso2.msf4j msf4j-service - 2.0.0 +2.0.0 + 4.0.0 io.swagger - swagger-msf4j-server + swagger-jaxrs-server jar - swagger-msf4j-server + swagger-jaxrs-server 1.0.0 src/main/java diff --git a/samples/server/petstore/java-play-framework/.swagger-codegen-ignore b/samples/server/petstore/java-play-framework/.swagger-codegen-ignore new file mode 100644 index 00000000000..c5fa491b4c5 --- /dev/null +++ b/samples/server/petstore/java-play-framework/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# 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: +#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/java-play-framework/LICENSE b/samples/server/petstore/java-play-framework/LICENSE new file mode 100644 index 00000000000..4baedcb95f3 --- /dev/null +++ b/samples/server/petstore/java-play-framework/LICENSE @@ -0,0 +1,8 @@ +This software is licensed under the Apache 2 license, quoted below. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with +the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +language governing permissions and limitations under the License. \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/README b/samples/server/petstore/java-play-framework/README new file mode 100644 index 00000000000..2fce02950d2 --- /dev/null +++ b/samples/server/petstore/java-play-framework/README @@ -0,0 +1,4 @@ +This is your new Play application +================================= + +This file will be packaged with your application when using `activator dist`. \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Category.java b/samples/server/petstore/java-play-framework/app/apimodels/Category.java new file mode 100644 index 00000000000..bde93b1ceb8 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/apimodels/Category.java @@ -0,0 +1,96 @@ +package apimodels; + +import java.util.Objects; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; +import com.fasterxml.jackson.annotation.*; +/** + * Category + */ + +public class Category { + @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 + **/ + @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 + **/ + @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/java-play-framework/app/apimodels/Order.java b/samples/server/petstore/java-play-framework/app/apimodels/Order.java new file mode 100644 index 00000000000..6d8b7abf1bc --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/apimodels/Order.java @@ -0,0 +1,222 @@ +package apimodels; + +import java.util.Objects; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import javax.validation.constraints.*; +import com.fasterxml.jackson.annotation.*; +/** + * Order + */ + +public class Order { + @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 = null; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return 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 + **/ + @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 + **/ + @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 + **/ + @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 + **/ + @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 + **/ + @ApiModelProperty(value = "") + public Boolean getComplete() { + 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/java-play-framework/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework/app/apimodels/Pet.java new file mode 100644 index 00000000000..a9bf2532e7e --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/apimodels/Pet.java @@ -0,0 +1,237 @@ +package apimodels; + +import java.util.Objects; +import apimodels.Category; +import apimodels.Tag; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import javax.validation.constraints.*; +import com.fasterxml.jackson.annotation.*; +/** + * Pet + */ + +public class Pet { + @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 = new ArrayList(); + + /** + * 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 + **/ + @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 + **/ + @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 + **/ + @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 + **/ + @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) { + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return 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 + **/ + @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/java-play-framework/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework/app/apimodels/Tag.java new file mode 100644 index 00000000000..4c6effbdec6 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/apimodels/Tag.java @@ -0,0 +1,96 @@ +package apimodels; + +import java.util.Objects; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; +import com.fasterxml.jackson.annotation.*; +/** + * Tag + */ + +public class Tag { + @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 + **/ + @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 + **/ + @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/java-play-framework/app/apimodels/User.java b/samples/server/petstore/java-play-framework/app/apimodels/User.java new file mode 100644 index 00000000000..9426d1b0356 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/apimodels/User.java @@ -0,0 +1,234 @@ +package apimodels; + +import java.util.Objects; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; +import com.fasterxml.jackson.annotation.*; +/** + * User + */ + +public class User { + @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 + **/ + @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 + **/ + @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 + **/ + @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 + **/ + @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 + **/ + @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 + **/ + @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 + **/ + @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 + **/ + @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/java-play-framework/app/controllers/ApiDocController.java b/samples/server/petstore/java-play-framework/app/controllers/ApiDocController.java new file mode 100644 index 00000000000..60534355ae3 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/controllers/ApiDocController.java @@ -0,0 +1,15 @@ +package controllers; + +import javax.inject.*; +import play.mvc.*; + +public class ApiDocController extends Controller { + + @Inject + private ApiDocController() { + } + + public Result api() { + return redirect(String.format("/assets/lib/swagger-ui/index.html?/url=%s/api-docs", "")); + } +} diff --git a/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java b/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java new file mode 100644 index 00000000000..b707b720c7b --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/controllers/PetApiController.java @@ -0,0 +1,248 @@ +package controllers; + +import java.io.File; +import apimodels.Pet; + +import io.swagger.annotations.*; +import play.mvc.Controller; +import play.mvc.Result; +import play.mvc.Http; +import java.util.List; +import java.util.ArrayList; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.JsonNode; +import com.google.inject.Inject; +import java.io.IOException; +import swagger.SwaggerUtils; +import javafx.util.Pair; +import com.fasterxml.jackson.core.type.TypeReference; + +import javax.validation.constraints.*; + + +@Api(value = "Pet", description = "the Pet API") +public class PetApiController extends Controller { + + private PetApiControllerImp imp; + private ObjectMapper mapper; + + @Inject + private PetApiController(PetApiControllerImp imp) { + this.imp = imp; + mapper = new ObjectMapper(); + } + + + @ApiOperation(value = "Add a new pet to the store", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "body", value = "Pet object that needs to be added to the store", dataType = "apimodels.Pet", paramType = "body") + }) + public Result addPet() throws IOException { + JsonNode nodebody = request().body().asJson(); + Pet body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), Pet.class); + + } else { + body = null; + } + imp.addPet(body); + + return ok(); + } + + @ApiOperation(value = "Deletes a pet", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid pet value") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header") + }) + public Result deletePet(@ApiParam(value = "Pet id to delete", required = true ) Long petId) { + String valueapiKey = request().getHeader("api_key"); + String apiKey; + if (valueapiKey != null) { + apiKey = (String)valueapiKey; + + } else { + apiKey = ""; + } + imp.deletePet(petId, apiKey); + + return ok(); + } + + @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "status", value = "Status values that need to be considered for filter", defaultValue = "available", dataType = "List", paramType = "query") + }) + public Result findPetsByStatus() { + //TODO: Maybe implement this in the future if we can support collection in the body params: see bug in swagger-play: https://github.com/swagger-api/swagger-play/issues/130 + //TODO: Tt seems it is not detected that it's a list based on the collectionFormat field? + //WIP when both bugs will be fixed + //List statusPair = SwaggerUtils.parameterToPairs("multi", "status", request().getQueryString("status")); + List status = new ArrayList(); + //for (Pair pair : statusPair) { + // status.add(pair.getValue()); + //} + List obj = imp.findPetsByStatus(status); + JsonNode result = mapper.valueToTree(obj); + return ok(result); + + } + + @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 = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "tags", value = "Tags to filter by", dataType = "List", paramType = "query") + }) + public Result findPetsByTags() { + //TODO: Maybe implement this in the future if we can support collection in the body params: see bug in swagger-play: https://github.com/swagger-api/swagger-play/issues/130 + //TODO: Tt seems it is not detected that it's a list based on the collectionFormat field? + //WIP when both bugs will be fixed + //List tagsPair = SwaggerUtils.parameterToPairs("multi", "tags", request().getQueryString("tags")); + List tags = new ArrayList(); + //for (Pair pair : tagsPair) { + // tags.add(pair.getValue()); + //} + List obj = imp.findPetsByTags(tags); + JsonNode result = mapper.valueToTree(obj); + return ok(result); + + } + + @ApiOperation(value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", response = Pet.class, authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }), + @Authorization(value = "api_key") + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), + @ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) + @ApiImplicitParams({ + + }) + public Result getPetById(@ApiParam(value = "ID of pet that needs to be fetched", required = true ) Long petId) { + Pet obj = imp.getPetById(petId); + JsonNode result = mapper.valueToTree(obj); + return ok(result); + + } + + @ApiOperation(value = "Update an existing pet", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "body", value = "Pet object that needs to be added to the store", dataType = "apimodels.Pet", paramType = "body") + }) + public Result updatePet() throws IOException { + JsonNode nodebody = request().body().asJson(); + Pet body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), Pet.class); + + } else { + body = null; + } + imp.updatePet(body); + + return ok(); + } + + @ApiOperation(value = "Updates a pet in the store with form data", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "name", value = "Updated name of the pet", dataType = "String", paramType = "form"), + @ApiImplicitParam(name = "status", value = "Updated status of the pet", dataType = "String", paramType = "form") + }) + public Result updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true ) String petId) { + String valuename = ((String[]) request().body().asMultipartFormData().asFormUrlEncoded().get("name"))[0]; + String name; + if (valuename != null) { + name = (String)valuename; + + } else { + name = ""; + } + String valuestatus = ((String[]) request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0]; + String status; + if (valuestatus != null) { + status = (String)valuestatus; + + } else { + status = ""; + } + imp.updatePetWithForm(petId, name, status); + + return ok(); + } + + @ApiOperation(value = "uploads an image", notes = "", authorizations = { + @Authorization(value = "petstore_auth", scopes = { + @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "additionalMetadata", value = "Additional data to pass to server", dataType = "String", paramType = "form"), + @ApiImplicitParam(name = "file", value = "file to upload", dataType = "apimodels.File", paramType = "form") + }) + public Result uploadFile(@ApiParam(value = "ID of pet to update", required = true ) Long petId) { + String valueadditionalMetadata = ((String[]) request().body().asMultipartFormData().asFormUrlEncoded().get("additionalMetadata"))[0]; + String additionalMetadata; + if (valueadditionalMetadata != null) { + additionalMetadata = (String)valueadditionalMetadata; + + } else { + additionalMetadata = ""; + } + Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file"); + imp.uploadFile(petId, additionalMetadata, file); + + return ok(); + } +} diff --git a/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImp.java b/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImp.java new file mode 100644 index 00000000000..70c34a3a867 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/controllers/PetApiControllerImp.java @@ -0,0 +1,53 @@ +package controllers; + +import java.io.File; +import apimodels.Pet; + +import play.mvc.Http; +import java.util.List; +import java.util.ArrayList; +import java.util.HashMap; +import javax.validation.constraints.*; + +public class PetApiControllerImp { + void addPet(Pet body) { + //Do your magic!!! + + } + + void deletePet( Long petId, String apiKey) { + //Do your magic!!! + + } + + List findPetsByStatus( List status) { + //Do your magic!!! + return new ArrayList(); + } + + List findPetsByTags( List tags) { + //Do your magic!!! + return new ArrayList(); + } + + Pet getPetById( Long petId) { + //Do your magic!!! + return new Pet(); + } + + void updatePet(Pet body) { + //Do your magic!!! + + } + + void updatePetWithForm( String petId, String name, String status) { + //Do your magic!!! + + } + + void uploadFile( Long petId, String additionalMetadata, Http.MultipartFormData.FilePart file) { + //Do your magic!!! + + } + +} diff --git a/samples/server/petstore/java-play-framework/app/controllers/StoreApiController.java b/samples/server/petstore/java-play-framework/app/controllers/StoreApiController.java new file mode 100644 index 00000000000..02d1c118ec7 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/controllers/StoreApiController.java @@ -0,0 +1,97 @@ +package controllers; + +import java.util.Map; +import apimodels.Order; + +import io.swagger.annotations.*; +import play.mvc.Controller; +import play.mvc.Result; +import play.mvc.Http; +import java.util.List; +import java.util.ArrayList; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.JsonNode; +import com.google.inject.Inject; +import java.io.IOException; +import swagger.SwaggerUtils; +import javafx.util.Pair; +import com.fasterxml.jackson.core.type.TypeReference; + +import javax.validation.constraints.*; + + +@Api(value = "Store", description = "the Store API") +public class StoreApiController extends Controller { + + private StoreApiControllerImp imp; + private ObjectMapper mapper; + + @Inject + private StoreApiController(StoreApiControllerImp imp) { + this.imp = imp; + mapper = new ObjectMapper(); + } + + + @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) + @ApiImplicitParams({ + + }) + public Result deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required = true ) String orderId) { + imp.deleteOrder(orderId); + + return ok(); + } + + @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { + @Authorization(value = "api_key") + }, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Integer.class) }) + public Result getInventory() { + Map obj = imp.getInventory(); + JsonNode result = mapper.valueToTree(obj); + return ok(result); + + } + + @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={ }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), + @ApiResponse(code = 404, message = "Order not found", response = Order.class) }) + @ApiImplicitParams({ + + }) + public Result getOrderById(@ApiParam(value = "ID of pet that needs to be fetched", required = true ) String orderId) { + Order obj = imp.getOrderById(orderId); + JsonNode result = mapper.valueToTree(obj); + return ok(result); + + } + + @ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "body", value = "order placed for purchasing the pet", dataType = "apimodels.Order", paramType = "body") + }) + public Result placeOrder() throws IOException { + JsonNode nodebody = request().body().asJson(); + Order body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), Order.class); + + } else { + body = null; + } + Order obj = imp.placeOrder(body); + JsonNode result = mapper.valueToTree(obj); + return ok(result); + + } +} diff --git a/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImp.java b/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImp.java new file mode 100644 index 00000000000..d2add2ecc87 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/controllers/StoreApiControllerImp.java @@ -0,0 +1,33 @@ +package controllers; + +import java.util.Map; +import apimodels.Order; + +import play.mvc.Http; +import java.util.List; +import java.util.ArrayList; +import java.util.HashMap; +import javax.validation.constraints.*; + +public class StoreApiControllerImp { + void deleteOrder( String orderId) { + //Do your magic!!! + + } + + Map getInventory() { + //Do your magic!!! + return new HashMap(); + } + + Order getOrderById( String orderId) { + //Do your magic!!! + return new Order(); + } + + Order placeOrder(Order body) { + //Do your magic!!! + return new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java new file mode 100644 index 00000000000..5693ac81fbd --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java @@ -0,0 +1,184 @@ +package controllers; + +import java.util.List; +import apimodels.User; + +import io.swagger.annotations.*; +import play.mvc.Controller; +import play.mvc.Result; +import play.mvc.Http; +import java.util.List; +import java.util.ArrayList; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.JsonNode; +import com.google.inject.Inject; +import java.io.IOException; +import swagger.SwaggerUtils; +import javafx.util.Pair; +import com.fasterxml.jackson.core.type.TypeReference; + +import javax.validation.constraints.*; + + +@Api(value = "User", description = "the User API") +public class UserApiController extends Controller { + + private UserApiControllerImp imp; + private ObjectMapper mapper; + + @Inject + private UserApiController(UserApiControllerImp imp) { + this.imp = imp; + mapper = new ObjectMapper(); + } + + + @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "body", value = "Created user object", dataType = "apimodels.User", paramType = "body") + }) + public Result createUser() throws IOException { + JsonNode nodebody = request().body().asJson(); + User body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), User.class); + + } else { + body = null; + } + imp.createUser(body); + + return ok(); + } + + @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "body", value = "List of user object", dataType = "List", paramType = "body") + }) + public Result createUsersWithArrayInput() throws IOException { + JsonNode nodebody = request().body().asJson(); + List body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), new TypeReference>>(){}); + + } else { + body = null; + } + imp.createUsersWithArrayInput(body); + + return ok(); + } + + @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "body", value = "List of user object", dataType = "List", paramType = "body") + }) + public Result createUsersWithListInput() throws IOException { + JsonNode nodebody = request().body().asJson(); + List body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), new TypeReference>>(){}); + + } else { + body = null; + } + imp.createUsersWithListInput(body); + + return ok(); + } + + @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) + @ApiImplicitParams({ + + }) + public Result deleteUser(@ApiParam(value = "The name that needs to be deleted", required = true ) String username) { + imp.deleteUser(username); + + return ok(); + } + + @ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), + @ApiResponse(code = 404, message = "User not found", response = User.class) }) + @ApiImplicitParams({ + + }) + public Result getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ", required = true ) String username) { + User obj = imp.getUserByName(username); + JsonNode result = mapper.valueToTree(obj); + return ok(result); + + } + + @ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "username", value = "The user name for login", dataType = "String", paramType = "query"), + @ApiImplicitParam(name = "password", value = "The password for login in clear text", dataType = "String", paramType = "query") + }) + public Result loginUser() { + String valueusername = request().getQueryString("username"); + String username; + if (valueusername != null) { + username = (String)valueusername; + + } else { + username = ""; + } + String valuepassword = request().getQueryString("password"); + String password; + if (valuepassword != null) { + password = (String)valuepassword; + + } else { + password = ""; + } + String obj = imp.loginUser(username, password); + JsonNode result = mapper.valueToTree(obj); + return ok(result); + + } + + @ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 0, message = "successful operation") }) + public Result logoutUser() { + imp.logoutUser(); + + return ok(); + } + + @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", tags={ }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) + @ApiImplicitParams({ + @ApiImplicitParam(name = "body", value = "Updated user object", dataType = "apimodels.User", paramType = "body") + }) + public Result updateUser(@ApiParam(value = "name that need to be deleted", required = true ) String username) throws IOException { + JsonNode nodebody = request().body().asJson(); + User body; + if (nodebody != null) { + body = mapper.readValue(nodebody.toString(), User.class); + + } else { + body = null; + } + imp.updateUser(username, body); + + return ok(); + } +} diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java new file mode 100644 index 00000000000..2c2180af5d0 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java @@ -0,0 +1,53 @@ +package controllers; + +import java.util.List; +import apimodels.User; + +import play.mvc.Http; +import java.util.List; +import java.util.ArrayList; +import java.util.HashMap; +import javax.validation.constraints.*; + +public class UserApiControllerImp { + void createUser(User body) { + //Do your magic!!! + + } + + void createUsersWithArrayInput(List body) { + //Do your magic!!! + + } + + void createUsersWithListInput(List body) { + //Do your magic!!! + + } + + void deleteUser( String username) { + //Do your magic!!! + + } + + User getUserByName( String username) { + //Do your magic!!! + return new User(); + } + + String loginUser( String username, String password) { + //Do your magic!!! + return new String(); + } + + void logoutUser() { + //Do your magic!!! + + } + + void updateUser( String username, User body) { + //Do your magic!!! + + } + +} diff --git a/samples/server/petstore/java-play-framework/app/swagger/SwaggerUtils.java b/samples/server/petstore/java-play-framework/app/swagger/SwaggerUtils.java new file mode 100644 index 00000000000..99f8d84b739 --- /dev/null +++ b/samples/server/petstore/java-play-framework/app/swagger/SwaggerUtils.java @@ -0,0 +1,108 @@ +package swagger; + +import javafx.util.Pair; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +public class SwaggerUtils { + + /** + * Format to {@code Pair} objects. + * + * @param collectionFormat collection format (e.g. csv, tsv) + * @param name Name + * @param value Value + * @return A list of Pair objects + */ + public static List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection = null; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format + collectionFormat = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv + + // create the params based on the collection format + if (collectionFormat.equals("multi")) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if (collectionFormat.equals("csv")) { + delimiter = ","; + } else if (collectionFormat.equals("ssv")) { + delimiter = " "; + } else if (collectionFormat.equals("tsv")) { + delimiter = "\t"; + } else if (collectionFormat.equals("pipes")) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public static String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDatetime((Date) param); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection)param) { + if (b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Format the given Date object into string (Datetime format). + * + * @param date Date object + * @return Formatted datetime in string representation + */ + public static String formatDatetime(Date date) { + return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX").format(date); + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/build.sbt b/samples/server/petstore/java-play-framework/build.sbt new file mode 100644 index 00000000000..6d54164e40e --- /dev/null +++ b/samples/server/petstore/java-play-framework/build.sbt @@ -0,0 +1,16 @@ +name := """swagger-java-playframework""" + +version := "1.0-SNAPSHOT" + +lazy val root = (project in file(".")).enablePlugins(PlayJava) + +scalaVersion := "2.11.7" + +libraryDependencies ++= Seq( +javaJdbc, +cache, +javaWs, +"io.swagger" %% "swagger-play2" % "1.5.3", +"org.webjars" % "swagger-ui" % "2.2.8", +"javax.validation" % "validation-api" % "1.1.0.Final" +) diff --git a/samples/server/petstore/java-play-framework/conf/application.conf b/samples/server/petstore/java-play-framework/conf/application.conf new file mode 100644 index 00000000000..56ec60e771a --- /dev/null +++ b/samples/server/petstore/java-play-framework/conf/application.conf @@ -0,0 +1,361 @@ +springfox.documentation.swagger.v2.path=/api-docs +server.contextPath=/ +server.port=9000 +spring.jackson.date-format=io.swagger.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false + +# This is the main configuration file for the application. +# https://www.playframework.com/documentation/latest/ConfigFile +# ~~~~~ +# Play uses HOCON as its configuration file format. HOCON has a number +# of advantages over other config formats, but there are two things that +# can be used when modifying settings. +# +# You can include other configuration files in this main application.conf file: +#include "extra-config.conf" +# +# You can declare variables and substitute for them: +#mykey = ${some.value} +# +# And if an environment variable exists when there is no other subsitution, then +# HOCON will fall back to substituting environment variable: +#mykey = ${JAVA_HOME} + +## Akka +# https://www.playframework.com/documentation/latest/ScalaAkka#Configuration +# https://www.playframework.com/documentation/latest/JavaAkka#Configuration +# ~~~~~ +# Play uses Akka internally and exposes Akka Streams and actors in Websockets and +# other streaming HTTP responses. +akka { +# "akka.log-config-on-start" is extraordinarly useful because it log the complete +# configuration at INFO level, including defaults and overrides, so it s worth +# putting at the very top. +# +# Put the following in your conf/logback.xml file: +# +# +# +# And then uncomment this line to debug the configuration. +# +#log-config-on-start = true +} + +api.version="1.0" + +## Secret key +# http://www.playframework.com/documentation/latest/ApplicationSecret +# ~~~~~ +# The secret key is used to sign Play's session cookie. +# This must be changed for production, but we don't recommend you change it in this file. +play.crypto.secret = "changeme" + +## Modules +# https://www.playframework.com/documentation/latest/Modules +# ~~~~~ +# Control which modules are loaded when Play starts. Note that modules are +# the replacement for "GlobalSettings", which are deprecated in 2.5.x. +# Please see https://www.playframework.com/documentation/latest/GlobalSettings +# for more information. +# +# You can also extend Play functionality by using one of the publically available +# Play modules: https://playframework.com/documentation/latest/ModuleDirectory +play.modules { +# By default, Play will load any class called Module that is defined +# in the root package (the "app" directory), or you can define them +# explicitly below. +# If there are any built-in modules that you want to disable, you can list them here. +enabled += "play.modules.swagger.SwaggerModule" + +# If there are any built-in modules that you want to disable, you can list them here. +#disabled += "" +} + +## IDE +# https://www.playframework.com/documentation/latest/IDE +# ~~~~~ +# Depending on your IDE, you can add a hyperlink for errors that will jump you +# directly to the code location in the IDE in dev mode. The following line makes +# use of the IntelliJ IDEA REST interface: +#play.editor="http://localhost:63342/api/file/?file=%s&line=%s" + +## Internationalisation +# https://www.playframework.com/documentation/latest/JavaI18N +# https://www.playframework.com/documentation/latest/ScalaI18N +# ~~~~~ +# Play comes with its own i18n settings, which allow the user's preferred language +# to map through to internal messages, or allow the language to be stored in a cookie. +play.i18n { +# The application languages +langs = [ "en" ] + +# Whether the language cookie should be secure or not +#langCookieSecure = true + +# Whether the HTTP only attribute of the cookie should be set to true +#langCookieHttpOnly = true +} + +## Play HTTP settings +# ~~~~~ +play.http { +## Router +# https://www.playframework.com/documentation/latest/JavaRouting +# https://www.playframework.com/documentation/latest/ScalaRouting +# ~~~~~ +# Define the Router object to use for this application. +# This router will be looked up first when the application is starting up, +# so make sure this is the entry point. +# Furthermore, it's assumed your route file is named properly. +# So for an application router like `my.application.Router`, +# you may need to define a router file `conf/my.application.routes`. +# Default to Routes in the root package (aka "apps" folder) (and conf/routes) +#router = my.application.Router + +## Action Creator +# https://www.playframework.com/documentation/latest/JavaActionCreator +# ~~~~~ +#actionCreator = null + +## ErrorHandler +# https://www.playframework.com/documentation/latest/JavaRouting +# https://www.playframework.com/documentation/latest/ScalaRouting +# ~~~~~ +# If null, will attempt to load a class called ErrorHandler in the root package, +#errorHandler = null + +## Filters +# https://www.playframework.com/documentation/latest/ScalaHttpFilters +# https://www.playframework.com/documentation/latest/JavaHttpFilters +# ~~~~~ +# Filters run code on every request. They can be used to perform +# common logic for all your actions, e.g. adding common headers. +# Defaults to "Filters" in the root package (aka "apps" folder) +# Alternatively you can explicitly register a class here. +#filters = my.application.Filters + +## Session & Flash +# https://www.playframework.com/documentation/latest/JavaSessionFlash +# https://www.playframework.com/documentation/latest/ScalaSessionFlash +# ~~~~~ +session { +# Sets the cookie to be sent only over HTTPS. +#secure = true + +# Sets the cookie to be accessed only by the server. +#httpOnly = true + +# Sets the max-age field of the cookie to 5 minutes. +# NOTE: this only sets when the browser will discard the cookie. Play will consider any +# cookie value with a valid signature to be a valid session forever. To implement a server side session timeout, +# you need to put a timestamp in the session and check it at regular intervals to possibly expire it. +#maxAge = 300 + +# Sets the domain on the session cookie. +#domain = "example.com" +} + +flash { +# Sets the cookie to be sent only over HTTPS. +#secure = true + +# Sets the cookie to be accessed only by the server. +#httpOnly = true +} +} + +## Netty Provider +# https://www.playframework.com/documentation/latest/SettingsNetty +# ~~~~~ +play.server.netty { +# Whether the Netty wire should be logged +#log.wire = true + +# If you run Play on Linux, you can use Netty's native socket transport +# for higher performance with less garbage. +#transport = "native" +} + +## WS (HTTP Client) +# https://www.playframework.com/documentation/latest/ScalaWS#Configuring-WS +# ~~~~~ +# The HTTP client primarily used for REST APIs. The default client can be +# configured directly, but you can also create different client instances +# with customized settings. You must enable this by adding to build.sbt: +# +# libraryDependencies += ws // or javaWs if using java +# +play.ws { +# Sets HTTP requests not to follow 302 requests +#followRedirects = false + +# Sets the maximum number of open HTTP connections for the client. +#ahc.maxConnectionsTotal = 50 + +## WS SSL +# https://www.playframework.com/documentation/latest/WsSSL +# ~~~~~ +ssl { +# Configuring HTTPS with Play WS does not require programming. You can +# set up both trustManager and keyManager for mutual authentication, and +# turn on JSSE debugging in development with a reload. +#debug.handshake = true +#trustManager = { +# stores = [ +# { type = "JKS", path = "exampletrust.jks" } +# ] +#} +} +} + +## Cache +# https://www.playframework.com/documentation/latest/JavaCache +# https://www.playframework.com/documentation/latest/ScalaCache +# ~~~~~ +# Play comes with an integrated cache API that can reduce the operational +# overhead of repeated requests. You must enable this by adding to build.sbt: +# +# libraryDependencies += cache +# +play.cache { +# If you want to bind several caches, you can bind the individually +#bindCaches = ["db-cache", "user-cache", "session-cache"] +} + +## Filters +# https://www.playframework.com/documentation/latest/Filters +# ~~~~~ +# There are a number of built-in filters that can be enabled and configured +# to give Play greater security. You must enable this by adding to build.sbt: +# +# libraryDependencies += filters +# +play.filters { +## CORS filter configuration +# https://www.playframework.com/documentation/latest/CorsFilter +# ~~~~~ +# CORS is a protocol that allows web applications to make requests from the browser +# across different domains. +# NOTE: You MUST apply the CORS configuration before the CSRF filter, as CSRF has +# dependencies on CORS settings. +cors { +# Filter paths by a whitelist of path prefixes +#pathPrefixes = ["/some/path", ...] + +# The allowed origins. If null, all origins are allowed. +#allowedOrigins = ["http://www.example.com"] + +# The allowed HTTP methods. If null, all methods are allowed +#allowedHttpMethods = ["GET", "POST"] +} + +## CSRF Filter +# https://www.playframework.com/documentation/latest/ScalaCsrf#Applying-a-global-CSRF-filter +# https://www.playframework.com/documentation/latest/JavaCsrf#Applying-a-global-CSRF-filter +# ~~~~~ +# Play supports multiple methods for verifying that a request is not a CSRF request. +# The primary mechanism is a CSRF token. This token gets placed either in the query string +# or body of every form submitted, and also gets placed in the users session. +# Play then verifies that both tokens are present and match. +csrf { +# Sets the cookie to be sent only over HTTPS +#cookie.secure = true + +# Defaults to CSRFErrorHandler in the root package. +#errorHandler = MyCSRFErrorHandler +} + +## Security headers filter configuration +# https://www.playframework.com/documentation/latest/SecurityHeaders +# ~~~~~ +# Defines security headers that prevent XSS attacks. +# If enabled, then all options are set to the below configuration by default: +headers { +# The X-Frame-Options header. If null, the header is not set. +#frameOptions = "DENY" + +# The X-XSS-Protection header. If null, the header is not set. +#xssProtection = "1; mode=block" + +# The X-Content-Type-Options header. If null, the header is not set. +#contentTypeOptions = "nosniff" + +# The X-Permitted-Cross-Domain-Policies header. If null, the header is not set. +#permittedCrossDomainPolicies = "master-only" + +# The Content-Security-Policy header. If null, the header is not set. +#contentSecurityPolicy = "default-src 'self'" +} + +## Allowed hosts filter configuration +# https://www.playframework.com/documentation/latest/AllowedHostsFilter +# ~~~~~ +# Play provides a filter that lets you configure which hosts can access your application. +# This is useful to prevent cache poisoning attacks. +hosts { +# Allow requests to example.com, its subdomains, and localhost:9000. +#allowed = [".example.com", "localhost:9000"] +} +} + +## Evolutions +# https://www.playframework.com/documentation/latest/Evolutions +# ~~~~~ +# Evolutions allows database scripts to be automatically run on startup in dev mode +# for database migrations. You must enable this by adding to build.sbt: +# +# libraryDependencies += evolutions +# +play.evolutions { +# You can disable evolutions for a specific datasource if necessary +#db.default.enabled = false +} + +## Database Connection Pool +# https://www.playframework.com/documentation/latest/SettingsJDBC +# ~~~~~ +# Play doesn't require a JDBC database to run, but you can easily enable one. +# +# libraryDependencies += jdbc +# +play.db { +# The combination of these two settings results in "db.default" as the +# default JDBC pool: +#config = "db" +#default = "default" + +# Play uses HikariCP as the default connection pool. You can override +# settings by changing the prototype: +prototype { +# Sets a fixed JDBC connection pool size of 50 +#hikaricp.minimumIdle = 50 +#hikaricp.maximumPoolSize = 50 +} +} + +## JDBC Datasource +# https://www.playframework.com/documentation/latest/JavaDatabase +# https://www.playframework.com/documentation/latest/ScalaDatabase +# ~~~~~ +# Once JDBC datasource is set up, you can work with several different +# database options: +# +# Slick (Scala preferred option): https://www.playframework.com/documentation/latest/PlaySlick +# JPA (Java preferred option): https://playframework.com/documentation/latest/JavaJPA +# EBean: https://playframework.com/documentation/latest/JavaEbean +# Anorm: https://www.playframework.com/documentation/latest/ScalaAnorm +# +db { +# You can declare as many datasources as you want. +# By convention, the default datasource is named `default` + +# https://www.playframework.com/documentation/latest/Developing-with-the-H2-Database +#default.driver = org.h2.Driver +#default.url = "jdbc:h2:mem:play" +#default.username = sa +#default.password = "" + +# You can turn on SQL logging for any datasource +# https://www.playframework.com/documentation/latest/Highlights25#Logging-SQL-statements +#default.logSql=true +} diff --git a/samples/server/petstore/java-play-framework/conf/logback.xml b/samples/server/petstore/java-play-framework/conf/logback.xml new file mode 100644 index 00000000000..01f301ab73a --- /dev/null +++ b/samples/server/petstore/java-play-framework/conf/logback.xml @@ -0,0 +1,41 @@ + + + + + + + ${application.home:-.}/logs/application.log + + %date [%level] from %logger in %thread - %message%n%xException + + + + + + %coloredLevel %logger{15} - %message%n%xException{10} + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/server/petstore/java-play-framework/conf/routes b/samples/server/petstore/java-play-framework/conf/routes new file mode 100644 index 00000000000..25f8880e2d5 --- /dev/null +++ b/samples/server/petstore/java-play-framework/conf/routes @@ -0,0 +1,40 @@ +# Routes +# This file defines all application routes (Higher priority routes first) +# ~~~~ + +GET /api controllers.ApiDocController.api + + +#Functions for Pet API +POST /pet controllers.PetApiController.addPet() +DELETE /pet/:petId controllers.PetApiController.deletePet(petId: Long) +GET /pet/findByStatus controllers.PetApiController.findPetsByStatus() +GET /pet/findByTags controllers.PetApiController.findPetsByTags() +GET /pet/:petId controllers.PetApiController.getPetById(petId: Long) +PUT /pet controllers.PetApiController.updatePet() +POST /pet/:petId controllers.PetApiController.updatePetWithForm(petId: String) +POST /pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long) + +#Functions for Store API +DELETE /store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String) +GET /store/inventory controllers.StoreApiController.getInventory() +GET /store/order/:orderId controllers.StoreApiController.getOrderById(orderId: String) +POST /store/order controllers.StoreApiController.placeOrder() + +#Functions for User API +POST /user controllers.UserApiController.createUser() +POST /user/createWithArray controllers.UserApiController.createUsersWithArrayInput() +POST /user/createWithList controllers.UserApiController.createUsersWithListInput() +DELETE /user/:username controllers.UserApiController.deleteUser(username: String) +GET /user/:username controllers.UserApiController.getUserByName(username: String) +GET /user/login controllers.UserApiController.loginUser() +GET /user/logout controllers.UserApiController.logoutUser() +PUT /user/:username controllers.UserApiController.updateUser(username: String) + +# Map static resources from the /public folder to the /assets URL path +GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset) + +GET /api-docs controllers.ApiHelpController.getResources +GET /api-docs.json/Pet controllers.ApiHelpController.getResource(path = "/Pet") +GET /api-docs.json/Store controllers.ApiHelpController.getResource(path = "/Store") +GET /api-docs.json/User controllers.ApiHelpController.getResource(path = "/User") diff --git a/samples/server/petstore/java-play-framework/project/build.properties b/samples/server/petstore/java-play-framework/project/build.properties new file mode 100644 index 00000000000..59e7c05b62f --- /dev/null +++ b/samples/server/petstore/java-play-framework/project/build.properties @@ -0,0 +1 @@ +sbt.version=0.13.11 \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/project/plugins.sbt b/samples/server/petstore/java-play-framework/project/plugins.sbt new file mode 100644 index 00000000000..ca73a99c721 --- /dev/null +++ b/samples/server/petstore/java-play-framework/project/plugins.sbt @@ -0,0 +1,2 @@ +// The Play plugin +addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.10") diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java index ede723f3935..aabc894b537 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java @@ -15,6 +15,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; import javax.validation.constraints.*; @@ -27,30 +29,44 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Add a new pet to the store", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) public void addPet(Pet body); @DELETE @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Deletes a pet", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid pet value") }) public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); @GET @Path("/pet/findByStatus") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by status", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) public List findPetsByStatus(@QueryParam("status") @NotNull List status); @GET @Path("/pet/findByTags") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by tags", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) public List findPetsByTags(@QueryParam("tags") @NotNull List tags); @GET @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Find pet by ID", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) public Pet getPetById(@PathParam("petId") Long petId); @PUT @@ -58,6 +74,10 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Update an existing pet", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) public void updatePet(Pet body); @POST @@ -65,6 +85,8 @@ public interface PetApi { @Consumes({ "application/x-www-form-urlencoded" }) @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status); @POST @@ -72,6 +94,8 @@ public interface PetApi { @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) @ApiOperation(value = "uploads an image", tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java index 8462b041b30..b440257ffb1 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java @@ -14,6 +14,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; import javax.validation.constraints.*; @@ -25,24 +27,36 @@ public interface StoreApi { @Path("/store/order/{orderId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Delete purchase order by ID", tags={ "store", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) public void deleteOrder(@PathParam("orderId") String orderId); @GET @Path("/store/inventory") @Produces({ "application/json" }) @ApiOperation(value = "Returns pet inventories by status", tags={ "store", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) public Map getInventory(); @GET @Path("/store/order/{orderId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Find purchase order by ID", tags={ "store", }) - public Order getOrderById(@PathParam("orderId") Long orderId); + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) + public Order getOrderById(@PathParam("orderId") @Min(1) @Max(5) Long orderId); @POST @Path("/store/order") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Place an order for a pet", tags={ "store" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) public Order placeOrder(Order body); } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java index a6d362e3775..6f3551da6ac 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/UserApi.java @@ -14,6 +14,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; import javax.validation.constraints.*; @@ -25,48 +27,69 @@ public interface UserApi { @Path("/user") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Create user", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) public void createUser(User body); @POST @Path("/user/createWithArray") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Creates list of users with given input array", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) public void createUsersWithArrayInput(List body); @POST @Path("/user/createWithList") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Creates list of users with given input array", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) public void createUsersWithListInput(List body); @DELETE @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Delete user", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) public void deleteUser(@PathParam("username") String username); @GET @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Get user by user name", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) public User getUserByName(@PathParam("username") String username); @GET @Path("/user/login") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Logs user into the system", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); @GET @Path("/user/logout") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Logs out current logged in user session", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) public void logoutUser(); @PUT @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Updated user", tags={ "user" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) public void updateUser(@PathParam("username") String username, User body); } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java index deaf2da1115..c6076fb8df8 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java @@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="A category for a pet") public class Category { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String name = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java index d8074c75102..4877f3ace31 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -15,11 +15,11 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="Describes the result of uploading an image resource") public class ModelApiResponse { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer code = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String type = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String message = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java index 18ede7173c2..a5bdf93b6f3 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.util.Date; import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; @@ -15,14 +16,14 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="An order for a pets from the pet store") public class Order { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long petId = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer quantity = null; - @ApiModelProperty(example = "null", value = "") - private javax.xml.datatype.XMLGregorianCalendar shipDate = null; + @ApiModelProperty(value = "") + private Date shipDate = null; @XmlType(name="StatusEnum") @XmlEnum(String.class) @@ -56,9 +57,9 @@ public enum StatusEnum { } } - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") private StatusEnum status = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Boolean complete = false; /** @@ -116,15 +117,15 @@ public enum StatusEnum { * Get shipDate * @return shipDate **/ - public javax.xml.datatype.XMLGregorianCalendar getShipDate() { + public Date getShipDate() { return shipDate; } - public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) { + public void setShipDate(Date shipDate) { this.shipDate = shipDate; } - public Order shipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) { + public Order shipDate(Date shipDate) { this.shipDate = shipDate; return this; } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java index bb02aa5ea2c..15f9322a95a 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java @@ -19,15 +19,15 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="A pet for sale in the pet store") public class Pet { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Category category = null; @ApiModelProperty(example = "doggie", required = true, value = "") private String name = null; - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private List photoUrls = new ArrayList(); - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List tags = new ArrayList(); @XmlType(name="StatusEnum") @@ -62,7 +62,7 @@ public enum StatusEnum { } } - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") private StatusEnum status = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java index caf601e42cf..a0bfd24470f 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java @@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="A tag for a pet") public class Tag { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String name = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java index 5cfc2944314..74b908a3aa3 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java @@ -15,21 +15,21 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="A User who is purchasing from the pet store") public class User { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String username = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String firstName = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String lastName = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String email = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String password = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String phone = null; - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") private Integer userStatus = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java index 6359d8b0df5..92a3fc286e3 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java @@ -29,7 +29,7 @@ public class Category { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -46,7 +46,7 @@ public class Category { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java index d8495139bb3..becb77ed19e 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -30,7 +30,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { return code; @@ -47,7 +47,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { return type; @@ -64,7 +64,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { return message; diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java index 1351a2a8fad..3c6e962bbd8 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java @@ -66,7 +66,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -83,7 +83,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -100,7 +100,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -117,7 +117,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("shipDate") public java.util.Date getShipDate() { return shipDate; @@ -135,7 +135,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -152,7 +152,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java index 284fc469e8e..c8868b563d0 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java @@ -70,7 +70,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -87,7 +87,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -122,7 +122,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") @NotNull public List getPhotoUrls() { @@ -140,7 +140,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -158,7 +158,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java index 0efd1fee3f2..42f36861a08 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java @@ -29,7 +29,7 @@ public class Tag { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -46,7 +46,7 @@ public class Tag { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java index 935f0b642eb..e8cfc7d6b1d 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java @@ -35,7 +35,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -52,7 +52,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { return username; @@ -69,7 +69,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -86,7 +86,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -103,7 +103,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { return email; @@ -120,7 +120,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { return password; @@ -137,7 +137,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -155,7 +155,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java index d42bf02c74f..68701e28cc2 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/PetApi.java @@ -15,6 +15,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; import javax.validation.constraints.*; @@ -27,30 +29,44 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Add a new pet to the store", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) public void addPet(Pet body); @DELETE @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Deletes a pet", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid pet value") }) public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); @GET @Path("/pet/findByStatus") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by status", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid status value") }) public List findPetsByStatus(@QueryParam("status") @NotNull List status); @GET @Path("/pet/findByTags") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by tags", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 400, message = "Invalid tag value") }) public List findPetsByTags(@QueryParam("tags") @NotNull List tags); @GET @Path("/pet/{petId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Find pet by ID", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Pet.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found") }) public Pet getPetById(@PathParam("petId") Long petId); @PUT @@ -58,6 +74,10 @@ public interface PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Update an existing pet", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Pet not found"), + @ApiResponse(code = 405, message = "Validation exception") }) public void updatePet(Pet body); @POST @@ -65,6 +85,8 @@ public interface PetApi { @Consumes({ "application/x-www-form-urlencoded" }) @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Updates a pet in the store with form data", tags={ "pet", }) + @ApiResponses(value = { + @ApiResponse(code = 405, message = "Invalid input") }) public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status); @POST @@ -72,6 +94,8 @@ public interface PetApi { @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) @ApiOperation(value = "uploads an image", tags={ "pet" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java index 4a3ffd1020b..f6f1b34c243 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/StoreApi.java @@ -14,6 +14,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; import javax.validation.constraints.*; @@ -25,24 +27,36 @@ public interface StoreApi { @Path("/store/order/{orderId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Delete purchase order by ID", tags={ "store", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) public void deleteOrder(@PathParam("orderId") String orderId); @GET @Path("/store/inventory") @Produces({ "application/json" }) @ApiOperation(value = "Returns pet inventories by status", tags={ "store", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) public Map getInventory(); @GET @Path("/store/order/{orderId}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Find purchase order by ID", tags={ "store", }) - public Order getOrderById(@PathParam("orderId") Long orderId); + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid ID supplied"), + @ApiResponse(code = 404, message = "Order not found") }) + public Order getOrderById(@PathParam("orderId") @Min(1) @Max(5) Long orderId); @POST @Path("/store/order") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Place an order for a pet", tags={ "store" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Order.class), + @ApiResponse(code = 400, message = "Invalid Order") }) public Order placeOrder(Order body); } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java index a28cc95b58d..172b6938f1d 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/api/UserApi.java @@ -14,6 +14,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; import javax.validation.constraints.*; @@ -25,48 +27,69 @@ public interface UserApi { @Path("/user") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Create user", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) public void createUser(User body); @POST @Path("/user/createWithArray") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Creates list of users with given input array", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) public void createUsersWithArrayInput(List body); @POST @Path("/user/createWithList") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Creates list of users with given input array", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) public void createUsersWithListInput(List body); @DELETE @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Delete user", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) public void deleteUser(@PathParam("username") String username); @GET @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Get user by user name", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = User.class), + @ApiResponse(code = 400, message = "Invalid username supplied"), + @ApiResponse(code = 404, message = "User not found") }) public User getUserByName(@PathParam("username") String username); @GET @Path("/user/login") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Logs user into the system", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = String.class), + @ApiResponse(code = 400, message = "Invalid username/password supplied") }) public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); @GET @Path("/user/logout") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Logs out current logged in user session", tags={ "user", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation") }) public void logoutUser(); @PUT @Path("/user/{username}") @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Updated user", tags={ "user" }) + @ApiResponses(value = { + @ApiResponse(code = 400, message = "Invalid user supplied"), + @ApiResponse(code = 404, message = "User not found") }) public void updateUser(@PathParam("username") String username, User body); } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java index deaf2da1115..c6076fb8df8 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java @@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="A category for a pet") public class Category { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String name = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java index d8074c75102..4877f3ace31 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -15,11 +15,11 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="Describes the result of uploading an image resource") public class ModelApiResponse { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer code = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String type = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String message = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java index 18ede7173c2..a5bdf93b6f3 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.util.Date; import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; @@ -15,14 +16,14 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="An order for a pets from the pet store") public class Order { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long petId = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer quantity = null; - @ApiModelProperty(example = "null", value = "") - private javax.xml.datatype.XMLGregorianCalendar shipDate = null; + @ApiModelProperty(value = "") + private Date shipDate = null; @XmlType(name="StatusEnum") @XmlEnum(String.class) @@ -56,9 +57,9 @@ public enum StatusEnum { } } - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") private StatusEnum status = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Boolean complete = false; /** @@ -116,15 +117,15 @@ public enum StatusEnum { * Get shipDate * @return shipDate **/ - public javax.xml.datatype.XMLGregorianCalendar getShipDate() { + public Date getShipDate() { return shipDate; } - public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) { + public void setShipDate(Date shipDate) { this.shipDate = shipDate; } - public Order shipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) { + public Order shipDate(Date shipDate) { this.shipDate = shipDate; return this; } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java index bb02aa5ea2c..15f9322a95a 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java @@ -19,15 +19,15 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="A pet for sale in the pet store") public class Pet { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Category category = null; @ApiModelProperty(example = "doggie", required = true, value = "") private String name = null; - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private List photoUrls = new ArrayList(); - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List tags = new ArrayList(); @XmlType(name="StatusEnum") @@ -62,7 +62,7 @@ public enum StatusEnum { } } - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") private StatusEnum status = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java index caf601e42cf..a0bfd24470f 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java @@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="A tag for a pet") public class Tag { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String name = null; /** diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java index 5cfc2944314..74b908a3aa3 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java @@ -15,21 +15,21 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="A User who is purchasing from the pet store") public class User { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String username = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String firstName = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String lastName = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String email = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String password = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String phone = null; - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") private Integer userStatus = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeApi.java index 4059c84a622..c0caf421aeb 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeApi.java @@ -2,6 +2,7 @@ package io.swagger.api; import java.math.BigDecimal; import io.swagger.model.Client; +import java.util.Date; import org.joda.time.LocalDate; import java.io.InputStream; @@ -41,7 +42,7 @@ public interface FakeApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied"), @ApiResponse(code = 404, message = "User not found") }) - public void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary", required = false) byte[] binary, @Multipart(value = "date", required = false) LocalDate date, @Multipart(value = "dateTime", required = false) javax.xml.datatype.XMLGregorianCalendar dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback); + public void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary", required = false) byte[] binary, @Multipart(value = "date", required = false) LocalDate date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback); @GET @Path("/fake") diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java index ebf2a57ebf7..e0e30bba646 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/api/FakeClassnameTags123Api.java @@ -13,6 +13,8 @@ import org.apache.cxf.jaxrs.ext.multipart.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.ApiResponse; import io.swagger.jaxrs.PATCH; import javax.validation.constraints.*; @@ -25,6 +27,8 @@ public interface FakeClassnameTags123Api { @Consumes({ "application/json" }) @Produces({ "application/json" }) @ApiOperation(value = "To test class name in snake case", tags={ "fake_classname_tags 123#$%^" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Client testClassname(Client body); } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index b19a90cbc3f..2a684fce3bd 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -16,9 +16,9 @@ import javax.xml.bind.annotation.XmlEnumValue; public class AdditionalPropertiesClass { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Map mapProperty = new HashMap(); - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Map> mapOfMapProperty = new HashMap>(); /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java index 36c52fa27aa..7b8b9faa45e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java @@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Animal { - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private String className = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String color = "red"; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 4d994a64f4c..cf72f92cd9e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -16,7 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; public class ArrayOfArrayOfNumberOnly { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List> arrayArrayNumber = new ArrayList>(); /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 45348bd5bab..6c1b6335d96 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -16,7 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; public class ArrayOfNumberOnly { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List arrayNumber = new ArrayList(); /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java index 48a352899b8..36523b49963 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java @@ -16,11 +16,11 @@ import javax.xml.bind.annotation.XmlEnumValue; public class ArrayTest { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List arrayOfString = new ArrayList(); - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List> arrayArrayOfInteger = new ArrayList>(); - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List> arrayArrayOfModel = new ArrayList>(); /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java index 2dc50b68a86..8d25cc55cb3 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java @@ -13,17 +13,17 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Capitalization { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String smallCamel = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String capitalCamel = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String smallSnake = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String capitalSnake = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String scAETHFlowPoints = null; - @ApiModelProperty(example = "null", value = "Name of the pet ") + @ApiModelProperty(value = "Name of the pet ") private String ATT_NAME = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java index a44b4c3474e..6b05166cc2f 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java @@ -14,7 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Cat extends Animal { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Boolean declawed = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java index 206fb962639..6abf3c9c6cb 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java @@ -13,9 +13,9 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Category { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String name = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java index 522a5f5c835..9f4a079d27a 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java @@ -15,7 +15,7 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="Model for testing model with \"_class\" property") public class ClassModel { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String propertyClass = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java index effac40b532..c3eff86cc82 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java @@ -13,7 +13,7 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Client { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String client = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java index c33b9754f29..80aaf8dcfdd 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java @@ -14,7 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Dog extends Animal { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String breed = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java index 1f72d296c0f..1a76571a267 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java @@ -48,7 +48,7 @@ public enum JustSymbolEnum { } } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private JustSymbolEnum justSymbol = null; @XmlType(name="ArrayEnumEnum") @@ -83,7 +83,7 @@ public enum ArrayEnumEnum { } } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List arrayEnum = new ArrayList(); /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java index 550742ed624..44199a514af 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java @@ -47,7 +47,7 @@ public enum EnumStringEnum { } } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private EnumStringEnum enumString = null; @XmlType(name="EnumIntegerEnum") @@ -82,7 +82,7 @@ public enum EnumIntegerEnum { } } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private EnumIntegerEnum enumInteger = null; @XmlType(name="EnumNumberEnum") @@ -117,9 +117,9 @@ public enum EnumNumberEnum { } } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private EnumNumberEnum enumNumber = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private OuterEnum outerEnum = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java index 1b8717f6ebc..cf49e7062ad 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.math.BigDecimal; +import java.util.Date; import java.util.UUID; import org.joda.time.LocalDate; import javax.validation.constraints.*; @@ -16,31 +17,31 @@ import javax.xml.bind.annotation.XmlEnumValue; public class FormatTest { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer integer = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer int32 = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long int64 = null; - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private BigDecimal number = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Float _float = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Double _double = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String string = null; - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private byte[] _byte = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private byte[] binary = null; - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private LocalDate date = null; - @ApiModelProperty(example = "null", value = "") - private javax.xml.datatype.XMLGregorianCalendar dateTime = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") + private Date dateTime = null; + @ApiModelProperty(value = "") private UUID uuid = null; - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private String password = null; /** @@ -230,15 +231,15 @@ public class FormatTest { * Get dateTime * @return dateTime **/ - public javax.xml.datatype.XMLGregorianCalendar getDateTime() { + public Date getDateTime() { return dateTime; } - public void setDateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) { + public void setDateTime(Date dateTime) { this.dateTime = dateTime; } - public FormatTest dateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) { + public FormatTest dateTime(Date dateTime) { this.dateTime = dateTime; return this; } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index e775fe7aab3..975088e5928 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -13,9 +13,9 @@ import javax.xml.bind.annotation.XmlEnumValue; public class HasOnlyReadOnly { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String bar = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String foo = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java index f851274f064..896bfc54829 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java @@ -16,7 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; public class MapTest { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Map> mapMapOfString = new HashMap>(); @XmlType(name="InnerEnum") @@ -51,7 +51,7 @@ public enum InnerEnum { } } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Map mapOfEnumString = new HashMap(); /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index e22fda79803..51f18692f46 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.model.Animal; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -18,11 +19,11 @@ import javax.xml.bind.annotation.XmlEnumValue; public class MixedPropertiesAndAdditionalPropertiesClass { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private UUID uuid = null; - @ApiModelProperty(example = "null", value = "") - private javax.xml.datatype.XMLGregorianCalendar dateTime = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") + private Date dateTime = null; + @ApiModelProperty(value = "") private Map map = new HashMap(); /** @@ -46,15 +47,15 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * Get dateTime * @return dateTime **/ - public javax.xml.datatype.XMLGregorianCalendar getDateTime() { + public Date getDateTime() { return dateTime; } - public void setDateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) { + public void setDateTime(Date dateTime) { this.dateTime = dateTime; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { this.dateTime = dateTime; return this; } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java index 5d7bf7f6a12..1f2a89db5d3 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java @@ -15,9 +15,9 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="Model for testing model name starting with number") public class Model200Response { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer name = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String propertyClass = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java index ddf2aa0b5a5..536fecd5949 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -13,11 +13,11 @@ import javax.xml.bind.annotation.XmlEnumValue; public class ModelApiResponse { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer code = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String type = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String message = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java index f1fd55b763b..3a56f9c8683 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java @@ -15,7 +15,7 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="Model for testing reserved words") public class ModelReturn { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer _return = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java index 1365022268b..d5edcadd585 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java @@ -15,13 +15,13 @@ import javax.xml.bind.annotation.XmlEnumValue; @ApiModel(description="Model for testing model name same as property name") public class Name { - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private Integer name = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer snakeCase = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String property = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer _123Number = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java index 203830ffd01..60e46381901 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java @@ -14,7 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; public class NumberOnly { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private BigDecimal justNumber = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java index 83e24c1ffe9..0333ed40bf1 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.util.Date; import javax.validation.constraints.*; import io.swagger.annotations.ApiModelProperty; @@ -13,14 +14,14 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Order { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long petId = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Integer quantity = null; - @ApiModelProperty(example = "null", value = "") - private javax.xml.datatype.XMLGregorianCalendar shipDate = null; + @ApiModelProperty(value = "") + private Date shipDate = null; @XmlType(name="StatusEnum") @XmlEnum(String.class) @@ -54,9 +55,9 @@ public enum StatusEnum { } } - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") private StatusEnum status = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Boolean complete = false; /** @@ -114,15 +115,15 @@ public enum StatusEnum { * Get shipDate * @return shipDate **/ - public javax.xml.datatype.XMLGregorianCalendar getShipDate() { + public Date getShipDate() { return shipDate; } - public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) { + public void setShipDate(Date shipDate) { this.shipDate = shipDate; } - public Order shipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) { + public Order shipDate(Date shipDate) { this.shipDate = shipDate; return this; } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java index 41c96154a4b..4d6215faf10 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java @@ -17,15 +17,15 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Pet { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Category category = null; @ApiModelProperty(example = "doggie", required = true, value = "") private String name = null; - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") private List photoUrls = new ArrayList(); - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private List tags = new ArrayList(); @XmlType(name="StatusEnum") @@ -60,7 +60,7 @@ public enum StatusEnum { } } - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") private StatusEnum status = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 769ab0a7c48..f6868a7d344 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -13,9 +13,9 @@ import javax.xml.bind.annotation.XmlEnumValue; public class ReadOnlyFirst { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String bar = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String baz = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java index a4b52b3bfe2..ebf181b8db6 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java @@ -13,7 +13,7 @@ import javax.xml.bind.annotation.XmlEnumValue; public class SpecialModelName { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long specialPropertyName = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java index de1cd154399..40cf3188aa7 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java @@ -13,9 +13,9 @@ import javax.xml.bind.annotation.XmlEnumValue; public class Tag { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String name = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java index 9c4b9d9ae7d..dd95f042ad1 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java @@ -13,21 +13,21 @@ import javax.xml.bind.annotation.XmlEnumValue; public class User { - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private Long id = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String username = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String firstName = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String lastName = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String email = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String password = null; - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") private String phone = null; - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") private Integer userStatus = null; /** diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java index 7c01649234e..cf469b71dd9 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java @@ -3,6 +3,7 @@ package io.swagger.api.impl; import io.swagger.api.*; import java.math.BigDecimal; import io.swagger.model.Client; +import java.util.Date; import org.joda.time.LocalDate; import java.io.InputStream; @@ -25,7 +26,7 @@ public class FakeApiServiceImpl implements FakeApi { return null; } - public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, javax.xml.datatype.XMLGregorianCalendar dateTime, String password, String paramCallback) { + public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, Date dateTime, String password, String paramCallback) { // TODO: Implement... diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java index 6794ae0da5a..85fdecdc662 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java @@ -18,7 +18,7 @@ public class Category { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -30,7 +30,7 @@ public class Category { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java index 2de59f1191e..9a9ff0db8cd 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -19,7 +19,7 @@ public class ModelApiResponse { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { return code; @@ -31,7 +31,7 @@ public class ModelApiResponse { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { return type; @@ -43,7 +43,7 @@ public class ModelApiResponse { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { return message; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java index 4e9acd44a95..4ac001b7e98 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java @@ -47,7 +47,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -59,7 +59,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -71,7 +71,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -83,7 +83,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("shipDate") public Date getShipDate() { return shipDate; @@ -96,7 +96,7 @@ public class Order { * Order Status **/ - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -108,7 +108,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java index 81ea1ca0b24..4e48fb253b1 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java @@ -49,7 +49,7 @@ public class Pet { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -61,7 +61,7 @@ public class Pet { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -86,7 +86,7 @@ public class Pet { /** **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") @NotNull public List getPhotoUrls() { @@ -99,7 +99,7 @@ public class Pet { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -112,7 +112,7 @@ public class Pet { * pet status in the store **/ - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java index f6894199956..750e1a82b1e 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java @@ -18,7 +18,7 @@ public class Tag { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -30,7 +30,7 @@ public class Tag { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java index 0c2be106305..a52524db22a 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java @@ -24,7 +24,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -36,7 +36,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { return username; @@ -48,7 +48,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -60,7 +60,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -72,7 +72,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { return email; @@ -84,7 +84,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { return password; @@ -96,7 +96,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -109,7 +109,7 @@ public class User { * User Status **/ - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java index 6794ae0da5a..85fdecdc662 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java @@ -18,7 +18,7 @@ public class Category { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -30,7 +30,7 @@ public class Category { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java index 2de59f1191e..9a9ff0db8cd 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -19,7 +19,7 @@ public class ModelApiResponse { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { return code; @@ -31,7 +31,7 @@ public class ModelApiResponse { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { return type; @@ -43,7 +43,7 @@ public class ModelApiResponse { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { return message; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java index 5d4300d15f4..84237e713f9 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java @@ -47,7 +47,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -59,7 +59,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -71,7 +71,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -83,7 +83,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("shipDate") public DateTime getShipDate() { return shipDate; @@ -96,7 +96,7 @@ public class Order { * Order Status **/ - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -108,7 +108,7 @@ public class Order { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java index 81ea1ca0b24..4e48fb253b1 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java @@ -49,7 +49,7 @@ public class Pet { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -61,7 +61,7 @@ public class Pet { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -86,7 +86,7 @@ public class Pet { /** **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") @NotNull public List getPhotoUrls() { @@ -99,7 +99,7 @@ public class Pet { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -112,7 +112,7 @@ public class Pet { * pet status in the store **/ - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java index f6894199956..750e1a82b1e 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java @@ -18,7 +18,7 @@ public class Tag { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -30,7 +30,7 @@ public class Tag { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java index 0c2be106305..a52524db22a 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java @@ -24,7 +24,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -36,7 +36,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { return username; @@ -48,7 +48,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -60,7 +60,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -72,7 +72,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { return email; @@ -84,7 +84,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { return password; @@ -96,7 +96,7 @@ public class User { /** **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -109,7 +109,7 @@ public class User { * User Status **/ - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java index f8581b82c1b..5f424e5d9d5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java @@ -2,6 +2,7 @@ package io.swagger.api; import java.math.BigDecimal; import io.swagger.model.Client; +import java.util.Date; import org.joda.time.LocalDate; import javax.ws.rs.*; @@ -42,7 +43,7 @@ public class FakeApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied", response = void.class), @ApiResponse(code = 404, message = "User not found", response = void.class) }) - public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "_double") Double _double,@FormParam(value = "patternWithoutDelimiter") String patternWithoutDelimiter,@FormParam(value = "_byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "_float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") javax.xml.datatype.XMLGregorianCalendar dateTime,@FormParam(value = "password") String password,@FormParam(value = "paramCallback") String paramCallback) { + public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) { return Response.ok().entity("magic!").build(); } @@ -54,7 +55,7 @@ public class FakeApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request", response = void.class), @ApiResponse(code = 404, message = "Not found", response = void.class) }) - public Response testEnumParameters(@FormParam(value = "enumFormStringArray") List enumFormStringArray,@FormParam(value = "enumFormString") String enumFormString,@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@HeaderParam("enum_header_string") String enumHeaderString,@QueryParam("enum_query_string_array") List enumQueryStringArray,@QueryParam("enum_query_string") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@FormParam(value = "enumQueryDouble") Double enumQueryDouble) { + public Response testEnumParameters(@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString,@HeaderParam("enum_header_string_array") List enumHeaderStringArray,@HeaderParam("enum_header_string") String enumHeaderString,@QueryParam("enum_query_string_array") List enumQueryStringArray,@QueryParam("enum_query_string") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@FormParam(value = "enum_query_double") Double enumQueryDouble) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index e30da46f35a..b82b2dcbd04 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -23,7 +23,7 @@ public class AdditionalPropertiesClass { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map getMapProperty() { return mapProperty; } @@ -39,7 +39,7 @@ public class AdditionalPropertiesClass { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map> getMapOfMapProperty() { return mapOfMapProperty; } @@ -49,7 +49,7 @@ public class AdditionalPropertiesClass { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -81,7 +81,7 @@ public class AdditionalPropertiesClass { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java index 64d5951369d..6ffd5169aef 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java @@ -22,7 +22,7 @@ public class Animal { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull public String getClassName() { return className; @@ -39,7 +39,7 @@ public class Animal { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getColor() { return color; } @@ -49,7 +49,7 @@ public class Animal { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -81,7 +81,7 @@ public class Animal { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } 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 index b7fe2f4cc88..200775f0167 100644 --- 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 @@ -15,7 +15,7 @@ public class AnimalFarm extends ArrayList { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -44,7 +44,7 @@ public class AnimalFarm extends ArrayList { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index eca82ce2346..d040bc313e6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -22,7 +22,7 @@ public class ArrayOfArrayOfNumberOnly { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List> getArrayArrayNumber() { return arrayArrayNumber; } @@ -32,7 +32,7 @@ public class ArrayOfArrayOfNumberOnly { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -62,7 +62,7 @@ public class ArrayOfArrayOfNumberOnly { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 0781aaa524f..3f063fc4f50 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -22,7 +22,7 @@ public class ArrayOfNumberOnly { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getArrayNumber() { return arrayNumber; } @@ -32,7 +32,7 @@ public class ArrayOfNumberOnly { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -62,7 +62,7 @@ public class ArrayOfNumberOnly { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java index ec005634cc3..5ffb95ac306 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java @@ -24,7 +24,7 @@ public class ArrayTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getArrayOfString() { return arrayOfString; } @@ -40,7 +40,7 @@ public class ArrayTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -56,7 +56,7 @@ public class ArrayTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List> getArrayArrayOfModel() { return arrayArrayOfModel; } @@ -66,7 +66,7 @@ public class ArrayTest { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -100,7 +100,7 @@ public class ArrayTest { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java index 1259f458e33..70284657096 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java @@ -24,7 +24,7 @@ public class Capitalization { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getSmallCamel() { return smallCamel; } @@ -40,7 +40,7 @@ public class Capitalization { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getCapitalCamel() { return capitalCamel; } @@ -56,7 +56,7 @@ public class Capitalization { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getSmallSnake() { return smallSnake; } @@ -72,7 +72,7 @@ public class Capitalization { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getCapitalSnake() { return capitalSnake; } @@ -88,7 +88,7 @@ public class Capitalization { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getScAETHFlowPoints() { return scAETHFlowPoints; } @@ -105,7 +105,7 @@ public class Capitalization { } - @ApiModelProperty(example = "null", value = "Name of the pet ") + @ApiModelProperty(value = "Name of the pet ") public String getATTNAME() { return ATT_NAME; } @@ -115,7 +115,7 @@ public class Capitalization { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -155,7 +155,7 @@ public class Capitalization { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java index 45f8e305503..595d1dbe434 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java @@ -20,7 +20,7 @@ public class Cat extends Animal { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Boolean getDeclawed() { return declawed; } @@ -30,7 +30,7 @@ public class Cat extends Animal { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -60,7 +60,7 @@ public class Cat extends Animal { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java index 08ce4b59b3a..6e5c714eabb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java @@ -20,7 +20,7 @@ public class Category { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -36,7 +36,7 @@ public class Category { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getName() { return name; } @@ -46,7 +46,7 @@ public class Category { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -78,7 +78,7 @@ public class Category { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java index b185dec45cb..cd0d3976c19 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java @@ -23,7 +23,7 @@ public class ClassModel { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getPropertyClass() { return propertyClass; } @@ -33,7 +33,7 @@ public class ClassModel { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -63,7 +63,7 @@ public class ClassModel { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java index 7680ebe1b58..01f90a6aaeb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java @@ -19,7 +19,7 @@ public class Client { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getClient() { return client; } @@ -29,7 +29,7 @@ public class Client { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -59,7 +59,7 @@ public class Client { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java index e48f4c000ef..ec714a5ac76 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java @@ -20,7 +20,7 @@ public class Dog extends Animal { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getBreed() { return breed; } @@ -30,7 +30,7 @@ public class Dog extends Animal { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -60,7 +60,7 @@ public class Dog extends Animal { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java index 7aca1496efe..8598203f8e3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java @@ -84,7 +84,7 @@ public enum ArrayEnumEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public JustSymbolEnum getJustSymbol() { return justSymbol; } @@ -100,7 +100,7 @@ public enum ArrayEnumEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getArrayEnum() { return arrayEnum; } @@ -110,7 +110,7 @@ public enum ArrayEnumEnum { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -142,7 +142,7 @@ public enum ArrayEnumEnum { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java index bb602ad3b73..25e07279e3c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java @@ -116,7 +116,7 @@ public enum EnumNumberEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EnumStringEnum getEnumString() { return enumString; } @@ -132,7 +132,7 @@ public enum EnumNumberEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EnumIntegerEnum getEnumInteger() { return enumInteger; } @@ -148,7 +148,7 @@ public enum EnumNumberEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EnumNumberEnum getEnumNumber() { return enumNumber; } @@ -164,7 +164,7 @@ public enum EnumNumberEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OuterEnum getOuterEnum() { return outerEnum; } @@ -174,7 +174,7 @@ public enum EnumNumberEnum { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -210,7 +210,7 @@ public enum EnumNumberEnum { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java index 1afafe4bf20..7f4795dc836 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.math.BigDecimal; +import java.util.Date; import java.util.UUID; import org.joda.time.LocalDate; import javax.validation.constraints.*; @@ -22,7 +23,7 @@ public class FormatTest { private byte[] _byte = null; private byte[] binary = null; private LocalDate date = null; - private javax.xml.datatype.XMLGregorianCalendar dateTime = null; + private Date dateTime = null; private UUID uuid = null; private String password = null; @@ -36,7 +37,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -54,7 +55,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -70,7 +71,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getInt64() { return int64; } @@ -88,7 +89,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; @@ -107,7 +108,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -125,7 +126,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -141,7 +142,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @Pattern(regexp="/[a-z]/i") public String getString() { return string; } @@ -157,7 +158,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull public byte[] getByte() { return _byte; @@ -174,7 +175,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public byte[] getBinary() { return binary; } @@ -190,7 +191,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull public LocalDate getDate() { return date; @@ -201,17 +202,17 @@ public class FormatTest { /** **/ - public FormatTest dateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) { + public FormatTest dateTime(Date dateTime) { this.dateTime = dateTime; return this; } - @ApiModelProperty(example = "null", value = "") - public javax.xml.datatype.XMLGregorianCalendar getDateTime() { + @ApiModelProperty(value = "") + public Date getDateTime() { return dateTime; } - public void setDateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) { + public void setDateTime(Date dateTime) { this.dateTime = dateTime; } @@ -223,7 +224,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public UUID getUuid() { return uuid; } @@ -239,7 +240,7 @@ public class FormatTest { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull @Size(min=10,max=64) public String getPassword() { return password; @@ -250,7 +251,7 @@ public class FormatTest { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -304,7 +305,7 @@ public class FormatTest { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index f0bb80cdeb8..35ca368638b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -20,7 +20,7 @@ public class HasOnlyReadOnly { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getBar() { return bar; } @@ -36,7 +36,7 @@ public class HasOnlyReadOnly { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFoo() { return foo; } @@ -46,7 +46,7 @@ public class HasOnlyReadOnly { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -78,7 +78,7 @@ public class HasOnlyReadOnly { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java index 39e105546fe..4fdb6fde502 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java @@ -54,7 +54,7 @@ public enum InnerEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map> getMapMapOfString() { return mapMapOfString; } @@ -70,7 +70,7 @@ public enum InnerEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map getMapOfEnumString() { return mapOfEnumString; } @@ -80,7 +80,7 @@ public enum InnerEnum { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -112,7 +112,7 @@ public enum InnerEnum { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6c4654ce3a5..f45bb41c229 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.model.Animal; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -15,7 +16,7 @@ import java.util.Objects; public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid = null; - private javax.xml.datatype.XMLGregorianCalendar dateTime = null; + private Date dateTime = null; private Map map = new HashMap(); /** @@ -26,7 +27,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public UUID getUuid() { return uuid; } @@ -36,17 +37,17 @@ public class MixedPropertiesAndAdditionalPropertiesClass { /** **/ - public MixedPropertiesAndAdditionalPropertiesClass dateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { this.dateTime = dateTime; return this; } - @ApiModelProperty(example = "null", value = "") - public javax.xml.datatype.XMLGregorianCalendar getDateTime() { + @ApiModelProperty(value = "") + public Date getDateTime() { return dateTime; } - public void setDateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) { + public void setDateTime(Date dateTime) { this.dateTime = dateTime; } @@ -58,7 +59,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Map getMap() { return map; } @@ -68,7 +69,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -102,7 +103,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java index 2278ea9212d..b769248fdb7 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java @@ -24,7 +24,7 @@ public class Model200Response { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getName() { return name; } @@ -40,7 +40,7 @@ public class Model200Response { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getPropertyClass() { return propertyClass; } @@ -50,7 +50,7 @@ public class Model200Response { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -82,7 +82,7 @@ public class Model200Response { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java index 9e570802581..d24804ea644 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -21,7 +21,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getCode() { return code; } @@ -37,7 +37,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getType() { return type; } @@ -53,7 +53,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getMessage() { return message; } @@ -63,7 +63,7 @@ public class ModelApiResponse { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -97,7 +97,7 @@ public class ModelApiResponse { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java index 9c348ada11a..a2cbfa1ad3f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java @@ -23,7 +23,7 @@ public class ModelReturn { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getReturn() { return _return; } @@ -33,7 +33,7 @@ public class ModelReturn { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -63,7 +63,7 @@ public class ModelReturn { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java index dbf1620a75a..0ee38475acb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java @@ -26,7 +26,7 @@ public class Name { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull public Integer getName() { return name; @@ -43,7 +43,7 @@ public class Name { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getSnakeCase() { return snakeCase; } @@ -59,7 +59,7 @@ public class Name { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getProperty() { return property; } @@ -75,7 +75,7 @@ public class Name { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer get123Number() { return _123Number; } @@ -85,7 +85,7 @@ public class Name { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -121,7 +121,7 @@ public class Name { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java index cfd26e8bbc1..7d8b5542bae 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java @@ -20,7 +20,7 @@ public class NumberOnly { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public BigDecimal getJustNumber() { return justNumber; } @@ -30,7 +30,7 @@ public class NumberOnly { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -60,7 +60,7 @@ public class NumberOnly { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java index c9af9b68a99..b1f062c1f45 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.util.Date; import javax.validation.constraints.*; @@ -12,7 +13,7 @@ public class Order { private Long id = null; private Long petId = null; private Integer quantity = null; - private javax.xml.datatype.XMLGregorianCalendar shipDate = null; + private Date shipDate = null; public enum StatusEnum { @@ -55,7 +56,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -71,7 +72,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getPetId() { return petId; } @@ -87,7 +88,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Integer getQuantity() { return quantity; } @@ -97,17 +98,17 @@ public enum StatusEnum { /** **/ - public Order shipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) { + public Order shipDate(Date shipDate) { this.shipDate = shipDate; return this; } - @ApiModelProperty(example = "null", value = "") - public javax.xml.datatype.XMLGregorianCalendar getShipDate() { + @ApiModelProperty(value = "") + public Date getShipDate() { return shipDate; } - public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) { + public void setShipDate(Date shipDate) { this.shipDate = shipDate; } @@ -120,7 +121,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") public StatusEnum getStatus() { return status; } @@ -136,7 +137,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Boolean getComplete() { return complete; } @@ -146,7 +147,7 @@ public enum StatusEnum { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -186,7 +187,7 @@ public enum StatusEnum { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java index dafcad72d14..983e4051114 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java @@ -59,7 +59,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -75,7 +75,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Category getCategory() { return category; } @@ -108,7 +108,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @NotNull public List getPhotoUrls() { return photoUrls; @@ -125,7 +125,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getTags() { return tags; } @@ -142,7 +142,7 @@ public enum StatusEnum { } - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") public StatusEnum getStatus() { return status; } @@ -152,7 +152,7 @@ public enum StatusEnum { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -192,7 +192,7 @@ public enum StatusEnum { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java index cfdba394a3e..695f9121060 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -20,7 +20,7 @@ public class ReadOnlyFirst { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getBar() { return bar; } @@ -36,7 +36,7 @@ public class ReadOnlyFirst { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getBaz() { return baz; } @@ -46,7 +46,7 @@ public class ReadOnlyFirst { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -78,7 +78,7 @@ public class ReadOnlyFirst { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java index 9b80b631cc7..56c2317f360 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java @@ -19,7 +19,7 @@ public class SpecialModelName { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getSpecialPropertyName() { return specialPropertyName; } @@ -29,7 +29,7 @@ public class SpecialModelName { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -59,7 +59,7 @@ public class SpecialModelName { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java index 1debd2a7ecb..ddb0f505aa9 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java @@ -20,7 +20,7 @@ public class Tag { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -36,7 +36,7 @@ public class Tag { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getName() { return name; } @@ -46,7 +46,7 @@ public class Tag { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -78,7 +78,7 @@ public class Tag { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java index 4b2896fa862..8a8c69c5bd4 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java @@ -26,7 +26,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Long getId() { return id; } @@ -42,7 +42,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getUsername() { return username; } @@ -58,7 +58,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFirstName() { return firstName; } @@ -74,7 +74,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getLastName() { return lastName; } @@ -90,7 +90,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getEmail() { return email; } @@ -106,7 +106,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getPassword() { return password; } @@ -122,7 +122,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getPhone() { return phone; } @@ -139,7 +139,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") public Integer getUserStatus() { return userStatus; } @@ -149,7 +149,7 @@ public class User { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -193,7 +193,7 @@ public class User { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/jaxrs-spec/swagger.json b/samples/server/petstore/jaxrs-spec/swagger.json index bad1426fa85..3900da4fdc1 100644 --- a/samples/server/petstore/jaxrs-spec/swagger.json +++ b/samples/server/petstore/jaxrs-spec/swagger.json @@ -788,15 +788,15 @@ "description" : "None", "required" : true, "type" : "number", - "maximum" : 543.200000000000045474735088646411895751953125, - "minimum" : 32.10000000000000142108547152020037174224853515625 + "maximum" : 543.2, + "minimum" : 32.1 }, { "name" : "float", "in" : "formData", "description" : "None", "required" : false, "type" : "number", - "maximum" : 987.6000000000000227373675443232059478759765625, + "maximum" : 987.6, "format" : "float" }, { "name" : "double", @@ -804,8 +804,8 @@ "description" : "None", "required" : true, "type" : "number", - "maximum" : 123.400000000000005684341886080801486968994140625, - "minimum" : 67.7999999999999971578290569595992565155029296875, + "maximum" : 123.4, + "minimum" : 67.8, "format" : "double" }, { "name" : "string", diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/FormatTest.java index eaba5daefe7..bdd53cb3e5d 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/FormatTest.java @@ -80,9 +80,7 @@ public class FormatTest { **/ @JsonProperty("integer") @ApiModelProperty(value = "") - @Min(10) - @Max(100) - public Integer getInteger() { + @Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -103,9 +101,7 @@ public class FormatTest { **/ @JsonProperty("int32") @ApiModelProperty(value = "") - @Min(20) - @Max(200) - public Integer getInt32() { + @Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -146,9 +142,7 @@ public class FormatTest { @JsonProperty("number") @ApiModelProperty(required = true, value = "") @NotNull - @DecimalMin("32.1") - @DecimalMax("543.2") - public BigDecimal getNumber() { + @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -169,9 +163,7 @@ public class FormatTest { **/ @JsonProperty("float") @ApiModelProperty(value = "") - @DecimalMin("54.3") - @DecimalMax("987.6") - public Float getFloat() { + @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -192,9 +184,7 @@ public class FormatTest { **/ @JsonProperty("double") @ApiModelProperty(value = "") - @DecimalMin("67.8") - @DecimalMax("123.4") - public Double getDouble() { + @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -213,8 +203,7 @@ public class FormatTest { **/ @JsonProperty("string") @ApiModelProperty(value = "") - @Pattern(regexp="/[a-z]/i") - public String getString() { + @Pattern(regexp="/[a-z]/i") public String getString() { return string; } @@ -331,8 +320,7 @@ public class FormatTest { @JsonProperty("password") @ApiModelProperty(required = true, value = "") @NotNull - @Size(min=10,max=64) - public String getPassword() { + @Size(min=10,max=64) public String getPassword() { return password; } diff --git a/samples/server/petstore/nancyfx/IO.Swagger.sln b/samples/server/petstore/nancyfx/IO.Swagger.sln index 6bf64a33d8c..565c1417d24 100644 --- a/samples/server/petstore/nancyfx/IO.Swagger.sln +++ b/samples/server/petstore/nancyfx/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{5D73FB08-180D-406F-BBBE-EE1E8BA73FEB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{EC6A666F-46B8-43A1-B5FB-46F1C708C8A5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,10 +10,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{5D73FB08-180D-406F-BBBE-EE1E8BA73FEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{5D73FB08-180D-406F-BBBE-EE1E8BA73FEB}.Debug|Any CPU.Build.0 = Debug|Any CPU -{5D73FB08-180D-406F-BBBE-EE1E8BA73FEB}.Release|Any CPU.ActiveCfg = Release|Any CPU -{5D73FB08-180D-406F-BBBE-EE1E8BA73FEB}.Release|Any CPU.Build.0 = Release|Any CPU +{EC6A666F-46B8-43A1-B5FB-46F1C708C8A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{EC6A666F-46B8-43A1-B5FB-46F1C708C8A5}.Debug|Any CPU.Build.0 = Debug|Any CPU +{EC6A666F-46B8-43A1-B5FB-46F1C708C8A5}.Release|Any CPU.ActiveCfg = Release|Any CPU +{EC6A666F-46B8-43A1-B5FB-46F1C708C8A5}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj index 9b8ad39478e..925d861b59e 100644 --- a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - {5D73FB08-180D-406F-BBBE-EE1E8BA73FEB} + {EC6A666F-46B8-43A1-B5FB-46F1C708C8A5} Library Properties IO.Swagger.v2 diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js index 5ff24c0591f..da34222e952 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js +++ b/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js @@ -1,37 +1,97 @@ 'use strict'; -var url = require('url'); - -var Pet = require('./PetService'); +var utils = require('../utils/writer.js'); +var Pet = require('../service/PetService'); module.exports.addPet = function addPet (req, res, next) { - Pet.addPet(req.swagger.params, res, next); + var body = req.swagger.params['body'].value; + Pet.addPet(body) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.deletePet = function deletePet (req, res, next) { - Pet.deletePet(req.swagger.params, res, next); + var petId = req.swagger.params['petId'].value; + var api_key = req.swagger.params['api_key'].value; + Pet.deletePet(petId,api_key) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.findPetsByStatus = function findPetsByStatus (req, res, next) { - Pet.findPetsByStatus(req.swagger.params, res, next); + var status = req.swagger.params['status'].value; + Pet.findPetsByStatus(status) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.findPetsByTags = function findPetsByTags (req, res, next) { - Pet.findPetsByTags(req.swagger.params, res, next); + var tags = req.swagger.params['tags'].value; + Pet.findPetsByTags(tags) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.getPetById = function getPetById (req, res, next) { - Pet.getPetById(req.swagger.params, res, next); + var petId = req.swagger.params['petId'].value; + Pet.getPetById(petId) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.updatePet = function updatePet (req, res, next) { - Pet.updatePet(req.swagger.params, res, next); + var body = req.swagger.params['body'].value; + Pet.updatePet(body) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.updatePetWithForm = function updatePetWithForm (req, res, next) { - Pet.updatePetWithForm(req.swagger.params, res, next); + var petId = req.swagger.params['petId'].value; + var name = req.swagger.params['name'].value; + var status = req.swagger.params['status'].value; + Pet.updatePetWithForm(petId,name,status) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.uploadFile = function uploadFile (req, res, next) { - Pet.uploadFile(req.swagger.params, res, next); + var petId = req.swagger.params['petId'].value; + var additionalMetadata = req.swagger.params['additionalMetadata'].value; + var file = req.swagger.params['file'].value; + Pet.uploadFile(petId,additionalMetadata,file) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Store.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/Store.js index 94d86b7b590..b781e64556f 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Store.js +++ b/samples/server/petstore/nodejs-google-cloud-functions/controllers/Store.js @@ -1,21 +1,47 @@ 'use strict'; -var url = require('url'); - -var Store = require('./StoreService'); +var utils = require('../utils/writer.js'); +var Store = require('../service/StoreService'); module.exports.deleteOrder = function deleteOrder (req, res, next) { - Store.deleteOrder(req.swagger.params, res, next); + var orderId = req.swagger.params['orderId'].value; + Store.deleteOrder(orderId) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.getInventory = function getInventory (req, res, next) { - Store.getInventory(req.swagger.params, res, next); + Store.getInventory() + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.getOrderById = function getOrderById (req, res, next) { - Store.getOrderById(req.swagger.params, res, next); + var orderId = req.swagger.params['orderId'].value; + Store.getOrderById(orderId) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.placeOrder = function placeOrder (req, res, next) { - Store.placeOrder(req.swagger.params, res, next); + var body = req.swagger.params['body'].value; + Store.placeOrder(body) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/User.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/User.js index 4b118e8211d..f444efa38e5 100644 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/User.js +++ b/samples/server/petstore/nodejs-google-cloud-functions/controllers/User.js @@ -1,37 +1,93 @@ 'use strict'; -var url = require('url'); - -var User = require('./UserService'); +var utils = require('../utils/writer.js'); +var User = require('../service/UserService'); module.exports.createUser = function createUser (req, res, next) { - User.createUser(req.swagger.params, res, next); + var body = req.swagger.params['body'].value; + User.createUser(body) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.createUsersWithArrayInput = function createUsersWithArrayInput (req, res, next) { - User.createUsersWithArrayInput(req.swagger.params, res, next); + var body = req.swagger.params['body'].value; + User.createUsersWithArrayInput(body) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.createUsersWithListInput = function createUsersWithListInput (req, res, next) { - User.createUsersWithListInput(req.swagger.params, res, next); + var body = req.swagger.params['body'].value; + User.createUsersWithListInput(body) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.deleteUser = function deleteUser (req, res, next) { - User.deleteUser(req.swagger.params, res, next); + var username = req.swagger.params['username'].value; + User.deleteUser(username) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.getUserByName = function getUserByName (req, res, next) { - User.getUserByName(req.swagger.params, res, next); + var username = req.swagger.params['username'].value; + User.getUserByName(username) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.loginUser = function loginUser (req, res, next) { - User.loginUser(req.swagger.params, res, next); + var username = req.swagger.params['username'].value; + var password = req.swagger.params['password'].value; + User.loginUser(username,password) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.logoutUser = function logoutUser (req, res, next) { - User.logoutUser(req.swagger.params, res, next); + User.logoutUser() + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; module.exports.updateUser = function updateUser (req, res, next) { - User.updateUser(req.swagger.params, res, next); + var username = req.swagger.params['username'].value; + var body = req.swagger.params['body'].value; + User.updateUser(username,body) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); }; diff --git a/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js b/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js new file mode 100644 index 00000000000..c89674e7cf5 --- /dev/null +++ b/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js @@ -0,0 +1,186 @@ +'use strict'; + + +/** + * Add a new pet to the store + * + * + * body Pet Pet object that needs to be added to the store + * no response value expected for this operation + **/ +exports.addPet = function(body) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Deletes a pet + * + * + * petId Long Pet id to delete + * api_key String (optional) + * no response value expected for this operation + **/ +exports.deletePet = function(petId,api_key) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * status List Status values that need to be considered for filter + * returns List + **/ +exports.findPetsByStatus = function(status) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = [ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "aeiou", + "id" : 6 + }, + "tags" : [ { + "name" : "aeiou", + "id" : 1 + } ], + "status" : "available" +} ]; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + + +/** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * tags List Tags to filter by + * returns List + **/ +exports.findPetsByTags = function(tags) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = [ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "aeiou", + "id" : 6 + }, + "tags" : [ { + "name" : "aeiou", + "id" : 1 + } ], + "status" : "available" +} ]; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + + +/** + * Find pet by ID + * Returns a single pet + * + * petId Long ID of pet to return + * returns Pet + **/ +exports.getPetById = function(petId) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "aeiou", + "id" : 6 + }, + "tags" : [ { + "name" : "aeiou", + "id" : 1 + } ], + "status" : "available" +}; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + + +/** + * Update an existing pet + * + * + * body Pet Pet object that needs to be added to the store + * no response value expected for this operation + **/ +exports.updatePet = function(body) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Updates a pet in the store with form data + * + * + * petId Long ID of pet that needs to be updated + * name String Updated name of the pet (optional) + * status String Updated status of the pet (optional) + * no response value expected for this operation + **/ +exports.updatePetWithForm = function(petId,name,status) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * uploads an image + * + * + * petId Long ID of pet to update + * additionalMetadata String Additional data to pass to server (optional) + * file File file to upload (optional) + * returns ApiResponse + **/ +exports.uploadFile = function(petId,additionalMetadata,file) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = { + "code" : 0, + "type" : "aeiou", + "message" : "aeiou" +}; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + diff --git a/samples/server/petstore/nodejs-google-cloud-functions/service/StoreService.js b/samples/server/petstore/nodejs-google-cloud-functions/service/StoreService.js new file mode 100644 index 00000000000..e959c7ec9fa --- /dev/null +++ b/samples/server/petstore/nodejs-google-cloud-functions/service/StoreService.js @@ -0,0 +1,91 @@ +'use strict'; + + +/** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * orderId String ID of the order that needs to be deleted + * no response value expected for this operation + **/ +exports.deleteOrder = function(orderId) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * + * returns Map + **/ +exports.getInventory = function() { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = { + "key" : 0 +}; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + + +/** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * orderId Long ID of pet that needs to be fetched + * returns Order + **/ +exports.getOrderById = function(orderId) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" +}; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + + +/** + * Place an order for a pet + * + * + * body Order order placed for purchasing the pet + * returns Order + **/ +exports.placeOrder = function(body) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" +}; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + diff --git a/samples/server/petstore/nodejs-google-cloud-functions/service/UserService.js b/samples/server/petstore/nodejs-google-cloud-functions/service/UserService.js new file mode 100644 index 00000000000..afdc528f0da --- /dev/null +++ b/samples/server/petstore/nodejs-google-cloud-functions/service/UserService.js @@ -0,0 +1,136 @@ +'use strict'; + + +/** + * Create user + * This can only be done by the logged in user. + * + * body User Created user object + * no response value expected for this operation + **/ +exports.createUser = function(body) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Creates list of users with given input array + * + * + * body List List of user object + * no response value expected for this operation + **/ +exports.createUsersWithArrayInput = function(body) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Creates list of users with given input array + * + * + * body List List of user object + * no response value expected for this operation + **/ +exports.createUsersWithListInput = function(body) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Delete user + * This can only be done by the logged in user. + * + * username String The name that needs to be deleted + * no response value expected for this operation + **/ +exports.deleteUser = function(username) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Get user by user name + * + * + * username String The name that needs to be fetched. Use user1 for testing. + * returns User + **/ +exports.getUserByName = function(username) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = { + "firstName" : "aeiou", + "lastName" : "aeiou", + "password" : "aeiou", + "userStatus" : 6, + "phone" : "aeiou", + "id" : 0, + "email" : "aeiou", + "username" : "aeiou" +}; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + + +/** + * Logs user into the system + * + * + * username String The user name for login + * password String The password for login in clear text + * returns String + **/ +exports.loginUser = function(username,password) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = "aeiou"; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + + +/** + * Logs out current logged in user session + * + * + * no response value expected for this operation + **/ +exports.logoutUser = function() { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + + +/** + * Updated user + * This can only be done by the logged in user. + * + * username String name that need to be deleted + * body User Updated user object + * no response value expected for this operation + **/ +exports.updateUser = function(username,body) { + return new Promise(function(resolve, reject) { + resolve(); + }); +} + diff --git a/samples/server/petstore/nodejs-google-cloud-functions/utils/writer.js b/samples/server/petstore/nodejs-google-cloud-functions/utils/writer.js new file mode 100644 index 00000000000..7350b54371f --- /dev/null +++ b/samples/server/petstore/nodejs-google-cloud-functions/utils/writer.js @@ -0,0 +1,43 @@ +var ResponsePayload = function(code, payload) { + this.code = code; + this.payload = payload; +} + +exports.respondWithCode = function(code, payload) { + return new ResponsePayload(code, payload); +} + +var writeJson = exports.writeJson = function(response, arg1, arg2) { + var code; + var payload; + + if(arg1 && arg1 instanceof ResponsePayload) { + writeJson(response, arg1.payload, arg1.code); + return; + } + + if(arg2 && Number.isInteger(arg2)) { + code = arg2; + } + else { + if(arg1 && Number.isInteger(arg1)) { + code = arg1; + } + } + if(code && arg1) { + payload = arg1; + } + else if(arg1) { + payload = arg1; + } + + if(!code) { + // if no response code given, we default to 200 + code = 200; + } + if(typeof payload === 'object') { + payload = JSON.stringify(payload, null, 2); + } + response.writeHead(code, {'Content-Type': 'application/json'}); + response.end(payload, code); +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/pom.xml b/samples/server/petstore/springboot-implicitHeaders/pom.xml index d777f7d31f1..c9e1e77e74b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/pom.xml +++ b/samples/server/petstore/springboot-implicitHeaders/pom.xml @@ -55,12 +55,9 @@ - com.fasterxml.jackson.datatype - jackson-datatype-joda - - - joda-time - joda-time + com.github.joschi.jackson + jackson-datatype-threetenbp + 2.6.4 @@ -70,4 +67,4 @@ provided - \ No newline at end of file + diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApi.java index 99a374eb894..8dfa47df80b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApi.java @@ -2,8 +2,8 @@ package io.swagger.api; import java.math.BigDecimal; import io.swagger.model.Client; -import org.joda.time.DateTime; -import org.joda.time.LocalDate; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; @@ -48,7 +48,7 @@ public interface FakeApi { produces = { "application/xml; charset=utf-8", "application/json; charset=utf-8" }, consumes = { "application/xml; charset=utf-8", "application/json; charset=utf-8" }, method = RequestMethod.POST) - ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true ) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true ) @RequestPart(value="_double", required=true) Double _double,@ApiParam(value = "None", required=true ) @RequestPart(value="patternWithoutDelimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true ) @RequestPart(value="_byte", required=true) byte[] _byte,@ApiParam(value = "None" ) @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None" ) @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None" ) @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None" ) @RequestPart(value="_float", required=false) Float _float,@ApiParam(value = "None" ) @RequestPart(value="string", required=false) String string,@ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary,@ApiParam(value = "None" ) @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None" ) @RequestPart(value="dateTime", required=false) DateTime dateTime,@ApiParam(value = "None" ) @RequestPart(value="password", required=false) String password,@ApiParam(value = "None" ) @RequestPart(value="paramCallback", required=false) String paramCallback); + ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true ) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true ) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true ) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true ) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None" ) @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None" ) @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None" ) @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None" ) @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None" ) @RequestPart(value="string", required=false) String string,@ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary,@ApiParam(value = "None" ) @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None" ) @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None" ) @RequestPart(value="password", required=false) String password,@ApiParam(value = "None" ) @RequestPart(value="callback", required=false) String paramCallback); @ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake", }) @@ -62,6 +62,6 @@ public interface FakeApi { produces = { "*/*" }, consumes = { "*/*" }, method = RequestMethod.GET) - ResponseEntity testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = "GREATER_THAN, DOLLAR") @RequestParam(value = "enumQueryStringArray", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_ABC, _EFG, _XYZ_", defaultValue = "-efg") @RequestParam(value = "enumQueryString", required = false, defaultValue="-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)") @RequestParam(value = "enumQueryInteger", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)" ) @RequestPart(value="enumQueryDouble", required=false) Double enumQueryDouble); + ResponseEntity testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = "GREATER_THAN, DOLLAR") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_ABC, _EFG, _XYZ_", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "NUMBER_1, NUMBER_MINUS_2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)" , allowableValues="NUMBER_1_DOT_1, NUMBER_MINUS_1_DOT_2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApiController.java index 01d1f359a60..cd0ee89ef9d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApiController.java @@ -2,8 +2,8 @@ package io.swagger.api; import java.math.BigDecimal; import io.swagger.model.Client; -import org.joda.time.DateTime; -import org.joda.time.LocalDate; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; import io.swagger.annotations.*; @@ -32,29 +32,29 @@ public class FakeApiController implements FakeApi { } public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true ) @RequestPart(value="number", required=true) BigDecimal number, - @ApiParam(value = "None", required=true ) @RequestPart(value="_double", required=true) Double _double, - @ApiParam(value = "None", required=true ) @RequestPart(value="patternWithoutDelimiter", required=true) String patternWithoutDelimiter, - @ApiParam(value = "None", required=true ) @RequestPart(value="_byte", required=true) byte[] _byte, + @ApiParam(value = "None", required=true ) @RequestPart(value="double", required=true) Double _double, + @ApiParam(value = "None", required=true ) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter, + @ApiParam(value = "None", required=true ) @RequestPart(value="byte", required=true) byte[] _byte, @ApiParam(value = "None" ) @RequestPart(value="integer", required=false) Integer integer, @ApiParam(value = "None" ) @RequestPart(value="int32", required=false) Integer int32, @ApiParam(value = "None" ) @RequestPart(value="int64", required=false) Long int64, - @ApiParam(value = "None" ) @RequestPart(value="_float", required=false) Float _float, + @ApiParam(value = "None" ) @RequestPart(value="float", required=false) Float _float, @ApiParam(value = "None" ) @RequestPart(value="string", required=false) String string, @ApiParam(value = "None" ) @RequestPart(value="binary", required=false) byte[] binary, @ApiParam(value = "None" ) @RequestPart(value="date", required=false) LocalDate date, - @ApiParam(value = "None" ) @RequestPart(value="dateTime", required=false) DateTime dateTime, + @ApiParam(value = "None" ) @RequestPart(value="dateTime", required=false) OffsetDateTime dateTime, @ApiParam(value = "None" ) @RequestPart(value="password", required=false) String password, - @ApiParam(value = "None" ) @RequestPart(value="paramCallback", required=false) String paramCallback) { + @ApiParam(value = "None" ) @RequestPart(value="callback", required=false) String paramCallback) { // do some magic! return new ResponseEntity(HttpStatus.OK); } - public ResponseEntity testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enumFormStringArray", required=false) List enumFormStringArray, - @ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enumFormString", required=false) String enumFormString, - @ApiParam(value = "Query parameter enum test (string array)", allowableValues = "GREATER_THAN, DOLLAR") @RequestParam(value = "enumQueryStringArray", required = false) List enumQueryStringArray, - @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_ABC, _EFG, _XYZ_", defaultValue = "-efg") @RequestParam(value = "enumQueryString", required = false, defaultValue="-efg") String enumQueryString, - @ApiParam(value = "Query parameter enum test (double)") @RequestParam(value = "enumQueryInteger", required = false) Integer enumQueryInteger, - @ApiParam(value = "Query parameter enum test (double)" ) @RequestPart(value="enumQueryDouble", required=false) Double enumQueryDouble) { + public ResponseEntity testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)" , allowableValues="GREATER_THAN, DOLLAR") @RequestPart(value="enum_form_string_array", required=false) List enumFormStringArray, + @ApiParam(value = "Form parameter enum test (string)" , allowableValues="_ABC, _EFG, _XYZ_", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString, + @ApiParam(value = "Query parameter enum test (string array)", allowableValues = "GREATER_THAN, DOLLAR") @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, + @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_ABC, _EFG, _XYZ_", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString, + @ApiParam(value = "Query parameter enum test (double)", allowableValues = "NUMBER_1, NUMBER_MINUS_2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger, + @ApiParam(value = "Query parameter enum test (double)" , allowableValues="NUMBER_1_DOT_1, NUMBER_MINUS_1_DOT_2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble) { // do some magic! return new ResponseEntity(HttpStatus.OK); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApi.java new file mode 100644 index 00000000000..f39b972af80 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -0,0 +1,34 @@ +package io.swagger.api; + +import io.swagger.model.Client; + +import io.swagger.annotations.*; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import javax.validation.constraints.*; + +@Api(value = "fake_classname_test", description = "the fake_classname_test API") +public interface FakeClassnameTestApi { + + @ApiOperation(value = "To test class name in snake case", notes = "", response = Client.class, tags={ "fake_classname_tags 123#$%^", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) + @ApiImplicitParams({ + + }) + @RequestMapping(value = "/fake_classname_test", + produces = { "application/json" }, + consumes = { "application/json" }, + method = RequestMethod.PATCH) + ResponseEntity testClassname(@ApiParam(value = "client model" ,required=true ) @RequestBody Client body); + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApiController.java new file mode 100644 index 00000000000..60a2b4d44ce --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApiController.java @@ -0,0 +1,31 @@ +package io.swagger.api; + +import io.swagger.model.Client; + +import io.swagger.annotations.*; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +import javax.validation.constraints.*; + +@Controller +public class FakeClassnameTestApiController implements FakeClassnameTestApi { + + + + public ResponseEntity testClassname(@ApiParam(value = "client model" ,required=true ) @RequestBody Client body) { + // do some magic! + return new ResponseEntity(HttpStatus.OK); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java index 1ca26cba6a9..deb708121c7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java @@ -30,7 +30,7 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) @ApiImplicitParams({ - @ApiImplicitParam(name = "test", value = "Test header", required=true, dataType = "String", paramType = "header"),@ApiImplicitParam(name = "range", value = "range header", dataType = "Integer", paramType = "header") + }) @RequestMapping(value = "/pet", produces = { "application/xml", "application/json" }, diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java new file mode 100644 index 00000000000..c8894e9a562 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java @@ -0,0 +1,232 @@ +package io.swagger.configuration; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonTokenId; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; +import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; +import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; +import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; +import com.fasterxml.jackson.datatype.threetenbp.function.Function; +import org.threeten.bp.DateTimeException; +import org.threeten.bp.Instant; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.ZoneId; +import org.threeten.bp.ZonedDateTime; +import org.threeten.bp.format.DateTimeFormatter; +import org.threeten.bp.temporal.Temporal; +import org.threeten.bp.temporal.TemporalAccessor; + +import java.io.IOException; +import java.math.BigDecimal; + +/** + * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s. + * Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format. + * + * @author Nick Williams + */ +public class CustomInstantDeserializer + extends ThreeTenDateTimeDeserializerBase { + private static final long serialVersionUID = 1L; + + public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer( + Instant.class, DateTimeFormatter.ISO_INSTANT, + new Function() { + @Override + public Instant apply(TemporalAccessor temporalAccessor) { + return Instant.from(temporalAccessor); + } + }, + new Function() { + @Override + public Instant apply(FromIntegerArguments a) { + return Instant.ofEpochMilli(a.value); + } + }, + new Function() { + @Override + public Instant apply(FromDecimalArguments a) { + return Instant.ofEpochSecond(a.integer, a.fraction); + } + }, + null + ); + + public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer( + OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, + new Function() { + @Override + public OffsetDateTime apply(TemporalAccessor temporalAccessor) { + return OffsetDateTime.from(temporalAccessor); + } + }, + new Function() { + @Override + public OffsetDateTime apply(FromIntegerArguments a) { + return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); + } + }, + new Function() { + @Override + public OffsetDateTime apply(FromDecimalArguments a) { + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); + } + }, + new BiFunction() { + @Override + public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { + return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); + } + } + ); + + public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer( + ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, + new Function() { + @Override + public ZonedDateTime apply(TemporalAccessor temporalAccessor) { + return ZonedDateTime.from(temporalAccessor); + } + }, + new Function() { + @Override + public ZonedDateTime apply(FromIntegerArguments a) { + return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); + } + }, + new Function() { + @Override + public ZonedDateTime apply(FromDecimalArguments a) { + return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); + } + }, + new BiFunction() { + @Override + public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { + return zonedDateTime.withZoneSameInstant(zoneId); + } + } + ); + + protected final Function fromMilliseconds; + + protected final Function fromNanoseconds; + + protected final Function parsedToValue; + + protected final BiFunction adjust; + + protected CustomInstantDeserializer(Class supportedType, + DateTimeFormatter parser, + Function parsedToValue, + Function fromMilliseconds, + Function fromNanoseconds, + BiFunction adjust) { + super(supportedType, parser); + this.parsedToValue = parsedToValue; + this.fromMilliseconds = fromMilliseconds; + this.fromNanoseconds = fromNanoseconds; + this.adjust = adjust == null ? new BiFunction() { + @Override + public T apply(T t, ZoneId zoneId) { + return t; + } + } : adjust; + } + + @SuppressWarnings("unchecked") + protected CustomInstantDeserializer(CustomInstantDeserializer base, DateTimeFormatter f) { + super((Class) base.handledType(), f); + parsedToValue = base.parsedToValue; + fromMilliseconds = base.fromMilliseconds; + fromNanoseconds = base.fromNanoseconds; + adjust = base.adjust; + } + + @Override + protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) { + if (dtf == _formatter) { + return this; + } + return new CustomInstantDeserializer(this, dtf); + } + + @Override + public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { + //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only + //string values have to be adjusted to the configured TZ. + switch (parser.getCurrentTokenId()) { + case JsonTokenId.ID_NUMBER_FLOAT: { + BigDecimal value = parser.getDecimalValue(); + long seconds = value.longValue(); + int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); + return fromNanoseconds.apply(new FromDecimalArguments( + seconds, nanoseconds, getZone(context))); + } + + case JsonTokenId.ID_NUMBER_INT: { + long timestamp = parser.getLongValue(); + if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) { + return this.fromNanoseconds.apply(new FromDecimalArguments( + timestamp, 0, this.getZone(context) + )); + } + return this.fromMilliseconds.apply(new FromIntegerArguments( + timestamp, this.getZone(context) + )); + } + + case JsonTokenId.ID_STRING: { + String string = parser.getText().trim(); + if (string.length() == 0) { + return null; + } + if (string.endsWith("+0000")) { + string = string.substring(0, string.length() - 5) + "Z"; + } + T value; + try { + TemporalAccessor acc = _formatter.parse(string); + value = parsedToValue.apply(acc); + if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) { + return adjust.apply(value, this.getZone(context)); + } + } catch (DateTimeException e) { + throw _peelDTE(e); + } + return value; + } + } + throw context.mappingException("Expected type float, integer, or string."); + } + + private ZoneId getZone(DeserializationContext context) { + // Instants are always in UTC, so don't waste compute cycles + return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); + } + + private static class FromIntegerArguments { + public final long value; + public final ZoneId zoneId; + + private FromIntegerArguments(long value, ZoneId zoneId) { + this.value = value; + this.zoneId = zoneId; + } + } + + private static class FromDecimalArguments { + public final long integer; + public final int fraction; + public final ZoneId zoneId; + + private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) { + this.integer = integer; + this.fraction = fraction; + this.zoneId = zoneId; + } + } +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/JacksonConfiguration.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/JacksonConfiguration.java new file mode 100644 index 00000000000..2609d724907 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/JacksonConfiguration.java @@ -0,0 +1,23 @@ +package io.swagger.configuration; + +import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.threeten.bp.Instant; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.ZonedDateTime; + +@Configuration +public class JacksonConfiguration { + + @Bean + @ConditionalOnMissingBean(ThreeTenModule.class) + ThreeTenModule threeTenModule() { + ThreeTenModule module = new ThreeTenModule(); + module.addDeserializer(Instant.class, CustomInstantDeserializer.INSTANT); + module.addDeserializer(OffsetDateTime.class, CustomInstantDeserializer.OFFSET_DATE_TIME); + module.addDeserializer(ZonedDateTime.class, CustomInstantDeserializer.ZONED_DATE_TIME); + return module; + } +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/SwaggerDocumentationConfig.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/SwaggerDocumentationConfig.java index 5658793e134..6a7e8c14be1 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/SwaggerDocumentationConfig.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/configuration/SwaggerDocumentationConfig.java @@ -32,8 +32,8 @@ public class SwaggerDocumentationConfig { .select() .apis(RequestHandlerSelectors.basePackage("io.swagger.api")) .build() - .directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class) - .directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class) + .directModelSubstitute(org.threeten.bp.LocalDate.class, java.sql.Date.class) + .directModelSubstitute(org.threeten.bp.OffsetDateTime.class, java.util.Date.class) .apiInfo(apiInfo()); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/FormatTest.java index aed8db1ed96..0f144806e9e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/FormatTest.java @@ -7,8 +7,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.UUID; -import org.joda.time.DateTime; -import org.joda.time.LocalDate; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; import javax.validation.constraints.*; /** * FormatTest @@ -46,7 +46,7 @@ public class FormatTest { private LocalDate date = null; @JsonProperty("dateTime") - private DateTime dateTime = null; + private OffsetDateTime dateTime = null; @JsonProperty("uuid") private UUID uuid = null; @@ -66,9 +66,7 @@ public class FormatTest { * @return integer **/ @ApiModelProperty(value = "") - @Min(10) - @Max(100) - public Integer getInteger() { + @Min(10) @Max(100) public Integer getInteger() { return integer; } @@ -88,9 +86,7 @@ public class FormatTest { * @return int32 **/ @ApiModelProperty(value = "") - @Min(20) - @Max(200) - public Integer getInt32() { + @Min(20) @Max(200) public Integer getInt32() { return int32; } @@ -129,9 +125,7 @@ public class FormatTest { **/ @ApiModelProperty(required = true, value = "") @NotNull - @DecimalMin("32.1") - @DecimalMax("543.2") - public BigDecimal getNumber() { + @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -151,9 +145,7 @@ public class FormatTest { * @return _float **/ @ApiModelProperty(value = "") - @DecimalMin("54.3") - @DecimalMax("987.6") - public Float getFloat() { + @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { return _float; } @@ -173,9 +165,7 @@ public class FormatTest { * @return _double **/ @ApiModelProperty(value = "") - @DecimalMin("67.8") - @DecimalMax("123.4") - public Double getDouble() { + @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { return _double; } @@ -193,8 +183,7 @@ public class FormatTest { * @return string **/ @ApiModelProperty(value = "") - @Pattern(regexp="/[a-z]/i") - public String getString() { + @Pattern(regexp="/[a-z]/i") public String getString() { return string; } @@ -258,7 +247,7 @@ public class FormatTest { this.date = date; } - public FormatTest dateTime(DateTime dateTime) { + public FormatTest dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } @@ -268,11 +257,11 @@ public class FormatTest { * @return dateTime **/ @ApiModelProperty(value = "") - public DateTime getDateTime() { + public OffsetDateTime getDateTime() { return dateTime; } - public void setDateTime(DateTime dateTime) { + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -305,8 +294,7 @@ public class FormatTest { **/ @ApiModelProperty(required = true, value = "") @NotNull - @Size(min=10,max=64) - public String getPassword() { + @Size(min=10,max=64) public String getPassword() { return password; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 2cb9928d5fe..19eb9f2b139 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -10,7 +10,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import org.joda.time.DateTime; +import org.threeten.bp.OffsetDateTime; import javax.validation.constraints.*; /** * MixedPropertiesAndAdditionalPropertiesClass @@ -21,7 +21,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid = null; @JsonProperty("dateTime") - private DateTime dateTime = null; + private OffsetDateTime dateTime = null; @JsonProperty("map") private Map map = new HashMap(); @@ -44,7 +44,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { this.uuid = uuid; } - public MixedPropertiesAndAdditionalPropertiesClass dateTime(DateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; return this; } @@ -54,11 +54,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * @return dateTime **/ @ApiModelProperty(value = "") - public DateTime getDateTime() { + public OffsetDateTime getDateTime() { return dateTime; } - public void setDateTime(DateTime dateTime) { + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Order.java index 41dec079587..c5381d2fa7e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Order.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.joda.time.DateTime; +import org.threeten.bp.OffsetDateTime; import javax.validation.constraints.*; /** * Order @@ -23,7 +23,7 @@ public class Order { private Integer quantity = null; @JsonProperty("shipDate") - private DateTime shipDate = null; + private OffsetDateTime shipDate = null; /** * Order Status @@ -118,7 +118,7 @@ public class Order { this.quantity = quantity; } - public Order shipDate(DateTime shipDate) { + public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; return this; } @@ -128,11 +128,11 @@ public class Order { * @return shipDate **/ @ApiModelProperty(value = "") - public DateTime getShipDate() { + public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(DateTime shipDate) { + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Category.java index 7709723d9cd..c5137a7399f 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Category.java @@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty; **/ @ApiModel(description = "A category for a pet") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-13T18:04:18.447+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-15T16:44:20.027+01:00") public class Category { private Long id = null; @@ -27,7 +27,7 @@ public class Category { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -44,7 +44,7 @@ public class Category { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; @@ -55,7 +55,7 @@ public class Category { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -87,7 +87,7 @@ public class Category { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/ModelApiResponse.java index 256b5935a6d..bbd45daab29 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/ModelApiResponse.java @@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty; **/ @ApiModel(description = "Describes the result of uploading an image resource") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-13T18:04:18.447+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-15T16:44:20.027+01:00") public class ModelApiResponse { private Integer code = null; @@ -28,7 +28,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("code") public Integer getCode() { return code; @@ -45,7 +45,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("type") public String getType() { return type; @@ -62,7 +62,7 @@ public class ModelApiResponse { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("message") public String getMessage() { return message; @@ -73,7 +73,7 @@ public class ModelApiResponse { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -107,7 +107,7 @@ public class ModelApiResponse { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Order.java index b7e01053210..5155784cf5b 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Order.java @@ -15,7 +15,7 @@ import java.util.Date; **/ @ApiModel(description = "An order for a pets from the pet store") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-13T18:04:18.447+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-15T16:44:20.027+01:00") public class Order { private Long id = null; @@ -53,7 +53,7 @@ public class Order { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -70,7 +70,7 @@ public class Order { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -87,7 +87,7 @@ public class Order { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -104,7 +104,7 @@ public class Order { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("shipDate") public Date getShipDate() { return shipDate; @@ -122,7 +122,7 @@ public class Order { } - @ApiModelProperty(example = "null", value = "Order Status") + @ApiModelProperty(value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -139,7 +139,7 @@ public class Order { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; @@ -150,7 +150,7 @@ public class Order { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -190,7 +190,7 @@ public class Order { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Pet.java index cb92de7f97f..8cd35b44311 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Pet.java @@ -18,7 +18,7 @@ import java.util.List; **/ @ApiModel(description = "A pet for sale in the pet store") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-13T18:04:18.447+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-15T16:44:20.027+01:00") public class Pet { private Long id = null; @@ -56,7 +56,7 @@ public class Pet { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -73,7 +73,7 @@ public class Pet { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -107,7 +107,7 @@ public class Pet { } - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") public List getPhotoUrls() { return photoUrls; @@ -124,7 +124,7 @@ public class Pet { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -142,7 +142,7 @@ public class Pet { } - @ApiModelProperty(example = "null", value = "pet status in the store") + @ApiModelProperty(value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -153,7 +153,7 @@ public class Pet { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -193,7 +193,7 @@ public class Pet { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Tag.java index c19d52d3cf6..44b07fdab9c 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Tag.java @@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty; **/ @ApiModel(description = "A tag for a pet") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-13T18:04:18.447+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-15T16:44:20.027+01:00") public class Tag { private Long id = null; @@ -27,7 +27,7 @@ public class Tag { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -44,7 +44,7 @@ public class Tag { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("name") public String getName() { return name; @@ -55,7 +55,7 @@ public class Tag { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -87,7 +87,7 @@ public class Tag { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/User.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/User.java index 4544e9f7367..6f85549bee1 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/User.java @@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty; **/ @ApiModel(description = "A User who is purchasing from the pet store") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-13T18:04:18.447+01:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.UndertowCodegen", date = "2017-03-15T16:44:20.027+01:00") public class User { private Long id = null; @@ -33,7 +33,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("id") public Long getId() { return id; @@ -50,7 +50,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("username") public String getUsername() { return username; @@ -67,7 +67,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -84,7 +84,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -101,7 +101,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("email") public String getEmail() { return email; @@ -118,7 +118,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("password") public String getPassword() { return password; @@ -135,7 +135,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -153,7 +153,7 @@ public class User { } - @ApiModelProperty(example = "null", value = "User Status") + @ApiModelProperty(value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; @@ -164,7 +164,7 @@ public class User { @Override - public boolean equals(Object o) { + public boolean equals(java.lang.Object o) { if (this == o) { return true; } @@ -208,7 +208,7 @@ public class User { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; }