From f5c74f198c06955fe7334dca183a5b96326e9577 Mon Sep 17 00:00:00 2001 From: Hugo Mercado Date: Tue, 27 Apr 2021 16:03:06 -0500 Subject: [PATCH] updated java and spring samples --- .../java/feign/.swagger-codegen/VERSION | 2 +- .../java/io/swagger/client/ApiClient.java | 2 +- .../java/io/swagger/client/auth/OAuth.java | 2 +- .../java/jersey1/.swagger-codegen/VERSION | 2 +- .../java/io/swagger/client/api/AnimalApi.java | 7 +- .../io/swagger/client/api/AnotherFakeApi.java | 1 - .../java/io/swagger/client/api/DogApi.java | 7 +- .../java/io/swagger/client/api/FakeApi.java | 10 --- .../client/api/FakeClassnameTags123Api.java | 1 - .../java/io/swagger/client/api/PetApi.java | 15 +---- .../java/io/swagger/client/api/StoreApi.java | 4 -- .../java/io/swagger/client/api/UserApi.java | 8 --- .../jersey2-java8/.swagger-codegen/VERSION | 2 +- .../petstore/java/jersey2-java8/pom.xml | 2 +- .../java/io/swagger/client/ApiClient.java | 2 +- .../java/io/swagger/client/api/AnimalApi.java | 5 -- .../io/swagger/client/api/AnotherFakeApi.java | 1 - .../java/io/swagger/client/api/DogApi.java | 5 -- .../java/io/swagger/client/api/FakeApi.java | 10 --- .../client/api/FakeClassnameTags123Api.java | 1 - .../java/io/swagger/client/api/PetApi.java | 11 ---- .../java/io/swagger/client/api/StoreApi.java | 4 -- .../java/io/swagger/client/api/UserApi.java | 8 --- .../java/jersey2/.swagger-codegen/VERSION | 2 +- samples/client/petstore/java/jersey2/pom.xml | 2 +- .../java/io/swagger/client/api/AnimalApi.java | 5 -- .../io/swagger/client/api/AnotherFakeApi.java | 1 - .../java/io/swagger/client/api/DogApi.java | 5 -- .../java/io/swagger/client/api/FakeApi.java | 10 --- .../client/api/FakeClassnameTags123Api.java | 1 - .../java/io/swagger/client/api/PetApi.java | 11 ---- .../java/io/swagger/client/api/StoreApi.java | 4 -- .../java/io/swagger/client/api/UserApi.java | 8 --- .../.swagger-codegen/VERSION | 2 +- .../java/okhttp-gson/.swagger-codegen/VERSION | 2 +- .../java/io/swagger/client/ApiClient.java | 4 +- .../java/resteasy/.swagger-codegen/VERSION | 2 +- .../java/io/swagger/client/api/AnimalApi.java | 7 +- .../io/swagger/client/api/AnotherFakeApi.java | 1 - .../java/io/swagger/client/api/DogApi.java | 7 +- .../java/io/swagger/client/api/FakeApi.java | 10 --- .../client/api/FakeClassnameTags123Api.java | 1 - .../java/io/swagger/client/api/PetApi.java | 15 +---- .../java/io/swagger/client/api/StoreApi.java | 4 -- .../java/io/swagger/client/api/UserApi.java | 8 --- .../.swagger-codegen/VERSION | 2 +- .../java/io/swagger/client/model/Animal.java | 11 +++- .../resttemplate/.swagger-codegen/VERSION | 2 +- .../java/retrofit/.swagger-codegen/VERSION | 2 +- .../java/io/swagger/client/ApiClient.java | 2 +- .../java/retrofit2/.swagger-codegen/VERSION | 2 +- .../java/io/swagger/client/ApiClient.java | 2 +- .../spring-cloud-v2/.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/DefaultApi.java | 2 +- .../src/main/java/io/swagger/api/PetApi.java | 2 +- .../main/java/io/swagger/api/StoreApi.java | 2 +- .../src/main/java/io/swagger/api/UserApi.java | 2 +- .../CustomInstantDeserializer.java | 4 +- .../spring-cloud/.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/DefaultApi.java | 2 +- .../src/main/java/io/swagger/api/PetApi.java | 2 +- .../main/java/io/swagger/api/StoreApi.java | 2 +- .../src/main/java/io/swagger/api/UserApi.java | 2 +- .../CustomInstantDeserializer.java | 4 +- .../spring-stubs/.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/TestApi.java | 4 +- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../CustomInstantDeserializer.java | 4 +- .../.swagger-codegen/VERSION | 2 +- .../gen/java/io/swagger/api/AllPetsApi.java | 4 +- .../gen/java/io/swagger/api/AnimalApi.java | 4 +- .../java/io/swagger/api/AnotherFakeApi.java | 4 +- .../src/gen/java/io/swagger/api/DogApi.java | 4 +- .../src/gen/java/io/swagger/api/FakeApi.java | 12 ++-- .../io/swagger/api/FakeClassnameTestApi.java | 4 +- .../src/gen/java/io/swagger/api/PetApi.java | 33 ++++++---- .../gen/java/io/swagger/api/RandomPetApi.java | 4 +- .../src/gen/java/io/swagger/api/StoreApi.java | 8 +-- .../src/gen/java/io/swagger/api/UserApi.java | 6 +- .../model/AdditionalPropertiesClass.java | 2 + .../model/AllOfSubCategoryCategory.java | 4 ++ .../src/gen/java/io/swagger/model/Animal.java | 2 + .../model/ArrayOfArrayOfNumberOnly.java | 1 + .../io/swagger/model/ArrayOfNumberOnly.java | 1 + .../gen/java/io/swagger/model/ArrayTest.java | 3 + .../src/gen/java/io/swagger/model/Body.java | 2 + .../src/gen/java/io/swagger/model/Body1.java | 2 + .../src/gen/java/io/swagger/model/Body2.java | 14 ++++ .../src/gen/java/io/swagger/model/Body3.java | 14 ++++ .../src/gen/java/io/swagger/model/Body4.java | 64 ++++++++++--------- .../src/gen/java/io/swagger/model/Body5.java | 2 + .../src/gen/java/io/swagger/model/Body6.java | 2 + .../src/gen/java/io/swagger/model/Body7.java | 2 + .../java/io/swagger/model/Capitalization.java | 6 ++ .../src/gen/java/io/swagger/model/Cat.java | 1 + .../gen/java/io/swagger/model/Category.java | 2 + .../gen/java/io/swagger/model/ClassModel.java | 1 + .../src/gen/java/io/swagger/model/Client.java | 1 + .../src/gen/java/io/swagger/model/Dog.java | 1 + .../gen/java/io/swagger/model/EnumArrays.java | 63 +++++++++--------- .../gen/java/io/swagger/model/EnumTest.java | 4 ++ .../gen/java/io/swagger/model/FormatTest.java | 13 ++++ .../io/swagger/model/HasOnlyReadOnly.java | 2 + .../src/gen/java/io/swagger/model/List.java | 1 + .../gen/java/io/swagger/model/MapTest.java | 63 +++++++++--------- ...ropertiesAndAdditionalPropertiesClass.java | 3 + .../io/swagger/model/Model200Response.java | 2 + .../io/swagger/model/ModelApiResponse.java | 3 + .../java/io/swagger/model/ModelReturn.java | 1 + .../src/gen/java/io/swagger/model/Name.java | 4 ++ .../io/swagger/model/NullableEnumModel.java | 1 + .../gen/java/io/swagger/model/NumberOnly.java | 1 + .../src/gen/java/io/swagger/model/Order.java | 6 ++ .../java/io/swagger/model/OuterComposite.java | 3 + .../src/gen/java/io/swagger/model/Pet.java | 6 ++ .../java/io/swagger/model/ReadOnlyFirst.java | 2 + .../io/swagger/model/SinglePetResponse.java | 1 + .../io/swagger/model/SpecialModelName.java | 1 + .../java/io/swagger/model/SubCategory.java | 3 + .../src/gen/java/io/swagger/model/Tag.java | 2 + .../src/gen/java/io/swagger/model/User.java | 8 +++ .../jaxrs-spec/.swagger-codegen/VERSION | 2 +- .../gen/java/io/swagger/api/AllPetsApi.java | 4 +- .../gen/java/io/swagger/api/AnimalApi.java | 4 +- .../java/io/swagger/api/AnotherFakeApi.java | 4 +- .../src/gen/java/io/swagger/api/DogApi.java | 4 +- .../src/gen/java/io/swagger/api/FakeApi.java | 12 ++-- .../io/swagger/api/FakeClassnameTestApi.java | 4 +- .../src/gen/java/io/swagger/api/PetApi.java | 33 ++++++---- .../gen/java/io/swagger/api/RandomPetApi.java | 4 +- .../src/gen/java/io/swagger/api/StoreApi.java | 8 +-- .../src/gen/java/io/swagger/api/UserApi.java | 6 +- .../model/AdditionalPropertiesClass.java | 2 + .../model/AllOfSubCategoryCategory.java | 4 ++ .../src/gen/java/io/swagger/model/Animal.java | 2 + .../model/ArrayOfArrayOfNumberOnly.java | 1 + .../io/swagger/model/ArrayOfNumberOnly.java | 1 + .../gen/java/io/swagger/model/ArrayTest.java | 3 + .../src/gen/java/io/swagger/model/Body.java | 2 + .../src/gen/java/io/swagger/model/Body1.java | 2 + .../src/gen/java/io/swagger/model/Body2.java | 14 ++++ .../src/gen/java/io/swagger/model/Body3.java | 14 ++++ .../src/gen/java/io/swagger/model/Body4.java | 64 ++++++++++--------- .../src/gen/java/io/swagger/model/Body5.java | 2 + .../src/gen/java/io/swagger/model/Body6.java | 2 + .../src/gen/java/io/swagger/model/Body7.java | 2 + .../java/io/swagger/model/Capitalization.java | 6 ++ .../src/gen/java/io/swagger/model/Cat.java | 1 + .../gen/java/io/swagger/model/Category.java | 2 + .../gen/java/io/swagger/model/ClassModel.java | 1 + .../src/gen/java/io/swagger/model/Client.java | 1 + .../src/gen/java/io/swagger/model/Dog.java | 1 + .../gen/java/io/swagger/model/EnumArrays.java | 63 +++++++++--------- .../gen/java/io/swagger/model/EnumTest.java | 4 ++ .../gen/java/io/swagger/model/FormatTest.java | 13 ++++ .../io/swagger/model/HasOnlyReadOnly.java | 2 + .../src/gen/java/io/swagger/model/List.java | 1 + .../gen/java/io/swagger/model/MapTest.java | 63 +++++++++--------- ...ropertiesAndAdditionalPropertiesClass.java | 3 + .../io/swagger/model/Model200Response.java | 2 + .../io/swagger/model/ModelApiResponse.java | 3 + .../java/io/swagger/model/ModelReturn.java | 1 + .../src/gen/java/io/swagger/model/Name.java | 4 ++ .../io/swagger/model/NullableEnumModel.java | 1 + .../gen/java/io/swagger/model/NumberOnly.java | 1 + .../src/gen/java/io/swagger/model/Order.java | 6 ++ .../java/io/swagger/model/OuterComposite.java | 3 + .../src/gen/java/io/swagger/model/Pet.java | 6 ++ .../java/io/swagger/model/ReadOnlyFirst.java | 2 + .../io/swagger/model/SinglePetResponse.java | 1 + .../io/swagger/model/SpecialModelName.java | 1 + .../java/io/swagger/model/SubCategory.java | 3 + .../src/gen/java/io/swagger/model/Tag.java | 2 + .../src/gen/java/io/swagger/model/User.java | 8 +++ .../server/petstore/jaxrs-spec/swagger.json | 32 +++++----- .../.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 2 +- .../src/main/java/io/swagger/api/PetApi.java | 2 +- .../java/io/swagger/api/RandomPetApi.java | 2 +- .../main/java/io/swagger/api/StoreApi.java | 2 +- .../src/main/java/io/swagger/api/TestApi.java | 2 +- .../src/main/java/io/swagger/api/UserApi.java | 2 +- .../.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/TestApi.java | 4 +- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../CustomInstantDeserializer.java | 4 +- .../.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../main/java/io/swagger/api/AnimalApi.java | 4 +- .../java/io/swagger/api/AnotherFakeApi.java | 4 +- .../src/main/java/io/swagger/api/DogApi.java | 4 +- .../src/main/java/io/swagger/api/FakeApi.java | 12 ++-- .../io/swagger/api/FakeClassnameTestApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../main/java/io/swagger/api/AnimalApi.java | 4 +- .../java/io/swagger/api/AnotherFakeApi.java | 4 +- .../src/main/java/io/swagger/api/DogApi.java | 4 +- .../src/main/java/io/swagger/api/FakeApi.java | 12 ++-- .../io/swagger/api/FakeClassnameTestApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../CustomInstantDeserializer.java | 4 +- .../.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/TestApi.java | 4 +- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../CustomInstantDeserializer.java | 4 +- .../.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/TestApi.java | 4 +- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../CustomInstantDeserializer.java | 4 +- .../.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/TestApi.java | 4 +- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../springboot-v2/.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/TestApi.java | 4 +- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../springboot/.swagger-codegen/VERSION | 2 +- .../main/java/io/swagger/api/AllPetsApi.java | 4 +- .../src/main/java/io/swagger/api/PetApi.java | 33 ++++++---- .../java/io/swagger/api/RandomPetApi.java | 4 +- .../main/java/io/swagger/api/StoreApi.java | 8 +-- .../src/main/java/io/swagger/api/TestApi.java | 4 +- .../src/main/java/io/swagger/api/UserApi.java | 6 +- .../CustomInstantDeserializer.java | 4 +- 255 files changed, 962 insertions(+), 790 deletions(-) diff --git a/samples/client/petstore/java/feign/.swagger-codegen/VERSION b/samples/client/petstore/java/feign/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/feign/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/feign/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java index 87659071d0a..fe5ee4d3839 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java @@ -50,7 +50,7 @@ public ApiClient(String[] authNames) { } else if ("http_basic_test".equals(authName)) { auth = new HttpBasicAuth(); } else if ("petstore_auth".equals(authName)) { - auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", ""); + auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/auth/OAuth.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/auth/OAuth.java index 125a6ca7d12..ba8c11f7574 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/auth/OAuth.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/auth/OAuth.java @@ -1,6 +1,7 @@ package io.swagger.client.auth; import java.io.IOException; + import java.util.ArrayList; import java.util.Collection; import java.util.Map; @@ -183,7 +184,6 @@ public T execute(OAuthClientRequest request, Map if(contentTypeHeader != null) { contentType = StringUtil.join(contentTypeHeader.toArray(new String[0]), ";"); } - return OAuthClientResponseFactory.createCustomResponse( body, contentType, diff --git a/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnimalApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnimalApi.java index 95539ecdaee..4da771f03b8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnimalApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnimalApi.java @@ -67,7 +67,6 @@ public void addAnimal(Animal body) throws ApiException { - final String[] localVarAccepts = { }; @@ -109,7 +108,6 @@ public void deleteAnimal(Long animalId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -149,7 +147,6 @@ public Animal getAnimalById(Long animalId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -188,7 +185,6 @@ public void updateAnimal(Animal body) throws ApiException { - final String[] localVarAccepts = { }; @@ -228,8 +224,7 @@ public void updateAnimalWithForm(Long animalId, String name, String status) thro Map localVarFormParams = new HashMap(); - - if (name != null) + if (name != null) localVarFormParams.put("name", name); if (status != null) localVarFormParams.put("status", status); diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java index 5378bc5d76a..f56738757d7 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -68,7 +68,6 @@ public Client testSpecialTags(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/DogApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/DogApi.java index 88ed5da9fcd..f861226e2aa 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/DogApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/DogApi.java @@ -67,7 +67,6 @@ public void addDog(Dog body) throws ApiException { - final String[] localVarAccepts = { }; @@ -109,7 +108,6 @@ public void deleteDog(Long dogId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -149,7 +147,6 @@ public Dog getDogById(Long dogId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -188,7 +185,6 @@ public void updateDog(Dog body) throws ApiException { - final String[] localVarAccepts = { }; @@ -228,8 +224,7 @@ public void updateDogWithForm(Long dogId, String name, String status) throws Api Map localVarFormParams = new HashMap(); - - if (name != null) + if (name != null) localVarFormParams.put("name", name); if (status != null) localVarFormParams.put("status", status); diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java index 1fd58681390..2aa087c7798 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java @@ -70,7 +70,6 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { - final String[] localVarAccepts = { "*/*" }; @@ -106,7 +105,6 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Ap - final String[] localVarAccepts = { "*/*" }; @@ -142,7 +140,6 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException - final String[] localVarAccepts = { "*/*" }; @@ -178,7 +175,6 @@ public String fakeOuterStringSerialize(String body) throws ApiException { - final String[] localVarAccepts = { "*/*" }; @@ -218,7 +214,6 @@ public Client testClientModel(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -257,7 +252,6 @@ public void testEndpointParameters(Body2 body) throws ApiException { - final String[] localVarAccepts = { }; @@ -302,7 +296,6 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); - final String[] localVarAccepts = { }; @@ -336,7 +329,6 @@ public void testEnumRequestBody(Body4 body) throws ApiException { - final String[] localVarAccepts = { }; @@ -374,7 +366,6 @@ public void testInlineAdditionalProperties(Map body) throws ApiE - final String[] localVarAccepts = { }; @@ -412,7 +403,6 @@ public void testJsonFormData(Body5 body) throws ApiException { - final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 0043e9e3845..709d256bfa8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -68,7 +68,6 @@ public Client testClassname(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java index 08ac0a2be17..f093826f7b7 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java @@ -72,7 +72,6 @@ public void addPet(Pet body) throws ApiException { - final String[] localVarAccepts = { }; @@ -114,7 +113,6 @@ public void deletePet(Long petId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -149,7 +147,6 @@ public ModelApiResponse doCategoryStuff(SubCategory body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -190,7 +187,6 @@ public List findPetsByStatus(List status) throws ApiException { localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -233,7 +229,6 @@ public List findPetsByTags(List tags) throws ApiException { localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -268,7 +263,6 @@ public AllPetsResponse getAllPets() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -309,7 +303,6 @@ public Pet getPetById(Long petId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -344,7 +337,6 @@ public SinglePetResponse getRandomPet() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -383,7 +375,6 @@ public void updatePet(Pet body) throws ApiException { - final String[] localVarAccepts = { }; @@ -423,8 +414,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api Map localVarFormParams = new HashMap(); - - if (name != null) + if (name != null) localVarFormParams.put("name", name); if (status != null) localVarFormParams.put("status", status); @@ -469,8 +459,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f Map localVarFormParams = new HashMap(); - - if (additionalMetadata != null) + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) localVarFormParams.put("file", file); diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java index 158a69060f3..4b9495077ef 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java @@ -68,7 +68,6 @@ public void deleteOrder(String orderId) throws ApiException { - final String[] localVarAccepts = { }; @@ -102,7 +101,6 @@ public Map getInventory() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -143,7 +141,6 @@ public Order getOrderById(Long orderId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -183,7 +180,6 @@ public Order placeOrder(Order body) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java index dba1e919bc4..cce28f133ff 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java @@ -67,7 +67,6 @@ public void createUser(User body) throws ApiException { - final String[] localVarAccepts = { }; @@ -105,7 +104,6 @@ public void createUsersWithArrayInput(List body) throws ApiException { - final String[] localVarAccepts = { }; @@ -143,7 +141,6 @@ public void createUsersWithListInput(List body) throws ApiException { - final String[] localVarAccepts = { }; @@ -182,7 +179,6 @@ public void deleteUser(String username) throws ApiException { - final String[] localVarAccepts = { }; @@ -222,7 +218,6 @@ public User getUserByName(String username) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -269,7 +264,6 @@ public String loginUser(String username, String password) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPair("password", password)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -303,7 +297,6 @@ public void logoutUser() throws ApiException { - final String[] localVarAccepts = { }; @@ -347,7 +340,6 @@ public void updateUser(User body, String username) throws ApiException { - final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index c5b7be84217..6887633a14b 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -202,7 +202,7 @@ org.glassfish.jersey.inject jersey-hk2 - ${jersey-version} + 2.29.1 diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java index a63478855b5..997262daded 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java @@ -25,8 +25,8 @@ import java.io.InputStream; import java.nio.file.Files; -import java.nio.file.StandardCopyOption; import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; import java.util.Collection; import java.util.Collections; import java.util.Map; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnimalApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnimalApi.java index e11c050cdf9..06149d858cd 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnimalApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnimalApi.java @@ -55,7 +55,6 @@ public void addAnimal(Animal body) throws ApiException { - final String[] localVarAccepts = { }; @@ -96,7 +95,6 @@ public void deleteAnimal(Long animalId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public Animal getAnimalById(Long animalId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -173,7 +170,6 @@ public void updateAnimal(Animal body) throws ApiException { - final String[] localVarAccepts = { }; @@ -212,7 +208,6 @@ public void updateAnimalWithForm(Long animalId, String name, String status) thro Map localVarFormParams = new HashMap(); - if (name != null) localVarFormParams.put("name", name); if (status != null) diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnotherFakeApi.java index 0d7b6b71fd1..9e08c163624 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -56,7 +56,6 @@ public Client testSpecialTags(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/DogApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/DogApi.java index 394a7a07e24..094b7e8f498 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/DogApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/DogApi.java @@ -55,7 +55,6 @@ public void addDog(Dog body) throws ApiException { - final String[] localVarAccepts = { }; @@ -96,7 +95,6 @@ public void deleteDog(Long dogId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public Dog getDogById(Long dogId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -173,7 +170,6 @@ public void updateDog(Dog body) throws ApiException { - final String[] localVarAccepts = { }; @@ -212,7 +208,6 @@ public void updateDogWithForm(Long dogId, String name, String status) throws Api Map localVarFormParams = new HashMap(); - if (name != null) localVarFormParams.put("name", name); if (status != null) diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java index 0c15f291f63..c7f3c3ab3cc 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/FakeApi.java @@ -58,7 +58,6 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { - final String[] localVarAccepts = { "*/*" }; @@ -93,7 +92,6 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Ap - final String[] localVarAccepts = { "*/*" }; @@ -128,7 +126,6 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException - final String[] localVarAccepts = { "*/*" }; @@ -163,7 +160,6 @@ public String fakeOuterStringSerialize(String body) throws ApiException { - final String[] localVarAccepts = { "*/*" }; @@ -202,7 +198,6 @@ public Client testClientModel(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -240,7 +235,6 @@ public void testEndpointParameters(Body2 body) throws ApiException { - final String[] localVarAccepts = { }; @@ -284,7 +278,6 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); - final String[] localVarAccepts = { }; @@ -317,7 +310,6 @@ public void testEnumRequestBody(Body4 body) throws ApiException { - final String[] localVarAccepts = { }; @@ -354,7 +346,6 @@ public void testInlineAdditionalProperties(Map body) throws ApiE - final String[] localVarAccepts = { }; @@ -391,7 +382,6 @@ public void testJsonFormData(Body5 body) throws ApiException { - final String[] localVarAccepts = { }; 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 fd74f07fc90..03337914ee7 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 @@ -56,7 +56,6 @@ public Client testClassname(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java index f6285a5d895..867d10d0a0d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/PetApi.java @@ -60,7 +60,6 @@ public void addPet(Pet body) throws ApiException { - final String[] localVarAccepts = { }; @@ -101,7 +100,6 @@ public void deletePet(Long petId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public ModelApiResponse doCategoryStuff(SubCategory body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -175,7 +172,6 @@ public List findPetsByStatus(List status) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -217,7 +213,6 @@ public List findPetsByTags(List tags) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -251,7 +246,6 @@ public AllPetsResponse getAllPets() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -291,7 +285,6 @@ public Pet getPetById(Long petId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -325,7 +318,6 @@ public SinglePetResponse getRandomPet() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -363,7 +355,6 @@ public void updatePet(Pet body) throws ApiException { - final String[] localVarAccepts = { }; @@ -402,7 +393,6 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api Map localVarFormParams = new HashMap(); - if (name != null) localVarFormParams.put("name", name); if (status != null) @@ -447,7 +437,6 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f Map localVarFormParams = new HashMap(); - if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java index 10b80dc25af..3b9dd07a927 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/StoreApi.java @@ -56,7 +56,6 @@ public void deleteOrder(String orderId) throws ApiException { - final String[] localVarAccepts = { }; @@ -89,7 +88,6 @@ public Map getInventory() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -129,7 +127,6 @@ public Order getOrderById(Long orderId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -168,7 +165,6 @@ public Order placeOrder(Order body) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java index 4c8ebdce00b..b9d8e0ab682 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/api/UserApi.java @@ -55,7 +55,6 @@ public void createUser(User body) throws ApiException { - final String[] localVarAccepts = { }; @@ -92,7 +91,6 @@ public void createUsersWithArrayInput(List body) throws ApiException { - final String[] localVarAccepts = { }; @@ -129,7 +127,6 @@ public void createUsersWithListInput(List body) throws ApiException { - final String[] localVarAccepts = { }; @@ -167,7 +164,6 @@ public void deleteUser(String username) throws ApiException { - final String[] localVarAccepts = { }; @@ -206,7 +202,6 @@ public User getUserByName(String username) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -252,7 +247,6 @@ public String loginUser(String username, String password) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -285,7 +279,6 @@ public void logoutUser() throws ApiException { - final String[] localVarAccepts = { }; @@ -328,7 +321,6 @@ public void updateUser(User body, String username) throws ApiException { - final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index c5b7be84217..6887633a14b 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -202,7 +202,7 @@ org.glassfish.jersey.inject jersey-hk2 - ${jersey-version} + 2.29.1 diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/AnimalApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/AnimalApi.java index e11c050cdf9..06149d858cd 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/AnimalApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/AnimalApi.java @@ -55,7 +55,6 @@ public void addAnimal(Animal body) throws ApiException { - final String[] localVarAccepts = { }; @@ -96,7 +95,6 @@ public void deleteAnimal(Long animalId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public Animal getAnimalById(Long animalId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -173,7 +170,6 @@ public void updateAnimal(Animal body) throws ApiException { - final String[] localVarAccepts = { }; @@ -212,7 +208,6 @@ public void updateAnimalWithForm(Long animalId, String name, String status) thro Map localVarFormParams = new HashMap(); - if (name != null) localVarFormParams.put("name", name); if (status != null) diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/AnotherFakeApi.java index 0d7b6b71fd1..9e08c163624 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -56,7 +56,6 @@ public Client testSpecialTags(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/DogApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/DogApi.java index 394a7a07e24..094b7e8f498 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/DogApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/DogApi.java @@ -55,7 +55,6 @@ public void addDog(Dog body) throws ApiException { - final String[] localVarAccepts = { }; @@ -96,7 +95,6 @@ public void deleteDog(Long dogId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public Dog getDogById(Long dogId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -173,7 +170,6 @@ public void updateDog(Dog body) throws ApiException { - final String[] localVarAccepts = { }; @@ -212,7 +208,6 @@ public void updateDogWithForm(Long dogId, String name, String status) throws Api Map localVarFormParams = new HashMap(); - if (name != null) localVarFormParams.put("name", name); if (status != null) diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java index 0c15f291f63..c7f3c3ab3cc 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java @@ -58,7 +58,6 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { - final String[] localVarAccepts = { "*/*" }; @@ -93,7 +92,6 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Ap - final String[] localVarAccepts = { "*/*" }; @@ -128,7 +126,6 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException - final String[] localVarAccepts = { "*/*" }; @@ -163,7 +160,6 @@ public String fakeOuterStringSerialize(String body) throws ApiException { - final String[] localVarAccepts = { "*/*" }; @@ -202,7 +198,6 @@ public Client testClientModel(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -240,7 +235,6 @@ public void testEndpointParameters(Body2 body) throws ApiException { - final String[] localVarAccepts = { }; @@ -284,7 +278,6 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); - final String[] localVarAccepts = { }; @@ -317,7 +310,6 @@ public void testEnumRequestBody(Body4 body) throws ApiException { - final String[] localVarAccepts = { }; @@ -354,7 +346,6 @@ public void testInlineAdditionalProperties(Map body) throws ApiE - final String[] localVarAccepts = { }; @@ -391,7 +382,6 @@ public void testJsonFormData(Body5 body) throws ApiException { - final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index fd74f07fc90..03337914ee7 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -56,7 +56,6 @@ public Client testClassname(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java index f6285a5d895..867d10d0a0d 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java @@ -60,7 +60,6 @@ public void addPet(Pet body) throws ApiException { - final String[] localVarAccepts = { }; @@ -101,7 +100,6 @@ public void deletePet(Long petId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public ModelApiResponse doCategoryStuff(SubCategory body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -175,7 +172,6 @@ public List findPetsByStatus(List status) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -217,7 +213,6 @@ public List findPetsByTags(List tags) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -251,7 +246,6 @@ public AllPetsResponse getAllPets() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -291,7 +285,6 @@ public Pet getPetById(Long petId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -325,7 +318,6 @@ public SinglePetResponse getRandomPet() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -363,7 +355,6 @@ public void updatePet(Pet body) throws ApiException { - final String[] localVarAccepts = { }; @@ -402,7 +393,6 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api Map localVarFormParams = new HashMap(); - if (name != null) localVarFormParams.put("name", name); if (status != null) @@ -447,7 +437,6 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f Map localVarFormParams = new HashMap(); - if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java index 10b80dc25af..3b9dd07a927 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/StoreApi.java @@ -56,7 +56,6 @@ public void deleteOrder(String orderId) throws ApiException { - final String[] localVarAccepts = { }; @@ -89,7 +88,6 @@ public Map getInventory() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -129,7 +127,6 @@ public Order getOrderById(Long orderId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -168,7 +165,6 @@ public Order placeOrder(Order body) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java index 4c8ebdce00b..b9d8e0ab682 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/UserApi.java @@ -55,7 +55,6 @@ public void createUser(User body) throws ApiException { - final String[] localVarAccepts = { }; @@ -92,7 +91,6 @@ public void createUsersWithArrayInput(List body) throws ApiException { - final String[] localVarAccepts = { }; @@ -129,7 +127,6 @@ public void createUsersWithListInput(List body) throws ApiException { - final String[] localVarAccepts = { }; @@ -167,7 +164,6 @@ public void deleteUser(String username) throws ApiException { - final String[] localVarAccepts = { }; @@ -206,7 +202,6 @@ public User getUserByName(String username) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -252,7 +247,6 @@ public String loginUser(String username, String password) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -285,7 +279,6 @@ public void logoutUser() throws ApiException { - final String[] localVarAccepts = { }; @@ -328,7 +321,6 @@ public void updateUser(User body, String username) throws ApiException { - final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION b/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiClient.java index 3e4fd068495..70490647c3a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/ApiClient.java @@ -27,11 +27,11 @@ import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; +import java.nio.file.Files; +import java.nio.file.Paths; import java.lang.reflect.Type; import java.net.URLConnection; import java.net.URLEncoder; -import java.nio.file.Files; -import java.nio.file.Paths; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.SecureRandom; diff --git a/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION b/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/AnimalApi.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/AnimalApi.java index b94ac37a9a8..903ad210853 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/AnimalApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/AnimalApi.java @@ -55,7 +55,6 @@ public void addAnimal(Animal body) throws ApiException { - final String[] localVarAccepts = { }; @@ -96,7 +95,6 @@ public void deleteAnimal(Long animalId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public Animal getAnimalById(Long animalId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -173,7 +170,6 @@ public void updateAnimal(Animal body) throws ApiException { - final String[] localVarAccepts = { }; @@ -212,8 +208,7 @@ public void updateAnimalWithForm(Long animalId, String name, String status) thro Map localVarFormParams = new HashMap(); - - if (name != null) + if (name != null) localVarFormParams.put("name", name); if (status != null) localVarFormParams.put("status", status); diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/AnotherFakeApi.java index f8f0e48bdeb..8b764f5106a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -56,7 +56,6 @@ public Client testSpecialTags(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/DogApi.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/DogApi.java index e44d1e5da77..59a37e7c67c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/DogApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/DogApi.java @@ -55,7 +55,6 @@ public void addDog(Dog body) throws ApiException { - final String[] localVarAccepts = { }; @@ -96,7 +95,6 @@ public void deleteDog(Long dogId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public Dog getDogById(Long dogId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -173,7 +170,6 @@ public void updateDog(Dog body) throws ApiException { - final String[] localVarAccepts = { }; @@ -212,8 +208,7 @@ public void updateDogWithForm(Long dogId, String name, String status) throws Api Map localVarFormParams = new HashMap(); - - if (name != null) + if (name != null) localVarFormParams.put("name", name); if (status != null) localVarFormParams.put("status", status); diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeApi.java index 542ba83b2ba..8418198a8c3 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeApi.java @@ -58,7 +58,6 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { - final String[] localVarAccepts = { "*/*" }; @@ -93,7 +92,6 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Ap - final String[] localVarAccepts = { "*/*" }; @@ -128,7 +126,6 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException - final String[] localVarAccepts = { "*/*" }; @@ -163,7 +160,6 @@ public String fakeOuterStringSerialize(String body) throws ApiException { - final String[] localVarAccepts = { "*/*" }; @@ -202,7 +198,6 @@ public Client testClientModel(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -240,7 +235,6 @@ public void testEndpointParameters(Body2 body) throws ApiException { - final String[] localVarAccepts = { }; @@ -284,7 +278,6 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe if (enumHeaderString != null) localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); - final String[] localVarAccepts = { }; @@ -317,7 +310,6 @@ public void testEnumRequestBody(Body4 body) throws ApiException { - final String[] localVarAccepts = { }; @@ -354,7 +346,6 @@ public void testInlineAdditionalProperties(Map body) throws ApiE - final String[] localVarAccepts = { }; @@ -391,7 +382,6 @@ public void testJsonFormData(Body5 body) throws ApiException { - final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 63d28632c7e..e944dab8d51 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -56,7 +56,6 @@ public Client testClassname(Client body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/PetApi.java index 5d40631692e..9dd4703560d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/PetApi.java @@ -60,7 +60,6 @@ public void addPet(Pet body) throws ApiException { - final String[] localVarAccepts = { }; @@ -101,7 +100,6 @@ public void deletePet(Long petId, String apiKey) throws ApiException { if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - final String[] localVarAccepts = { }; @@ -135,7 +133,6 @@ public ModelApiResponse doCategoryStuff(SubCategory body) throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -175,7 +172,6 @@ public List findPetsByStatus(List status) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -217,7 +213,6 @@ public List findPetsByTags(List tags) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -251,7 +246,6 @@ public AllPetsResponse getAllPets() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -291,7 +285,6 @@ public Pet getPetById(Long petId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -325,7 +318,6 @@ public SinglePetResponse getRandomPet() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -363,7 +355,6 @@ public void updatePet(Pet body) throws ApiException { - final String[] localVarAccepts = { }; @@ -402,8 +393,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api Map localVarFormParams = new HashMap(); - - if (name != null) + if (name != null) localVarFormParams.put("name", name); if (status != null) localVarFormParams.put("status", status); @@ -447,8 +437,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f Map localVarFormParams = new HashMap(); - - if (additionalMetadata != null) + if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata); if (file != null) localVarFormParams.put("file", file); diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/StoreApi.java index 74930903249..7fd3de908ed 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/StoreApi.java @@ -56,7 +56,6 @@ public void deleteOrder(String orderId) throws ApiException { - final String[] localVarAccepts = { }; @@ -89,7 +88,6 @@ public Map getInventory() throws ApiException { - final String[] localVarAccepts = { "application/json" }; @@ -129,7 +127,6 @@ public Order getOrderById(Long orderId) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -168,7 +165,6 @@ public Order placeOrder(Order body) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/UserApi.java index 8c1ec9efba8..b95314163af 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/api/UserApi.java @@ -55,7 +55,6 @@ public void createUser(User body) throws ApiException { - final String[] localVarAccepts = { }; @@ -92,7 +91,6 @@ public void createUsersWithArrayInput(List body) throws ApiException { - final String[] localVarAccepts = { }; @@ -129,7 +127,6 @@ public void createUsersWithListInput(List body) throws ApiException { - final String[] localVarAccepts = { }; @@ -167,7 +164,6 @@ public void deleteUser(String username) throws ApiException { - final String[] localVarAccepts = { }; @@ -206,7 +202,6 @@ public User getUserByName(String username) throws ApiException { - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -252,7 +247,6 @@ public String loginUser(String username, String password) throws ApiException { localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password)); - final String[] localVarAccepts = { "application/xml", "application/json" }; @@ -285,7 +279,6 @@ public void logoutUser() throws ApiException { - final String[] localVarAccepts = { }; @@ -328,7 +321,6 @@ public void updateUser(User body, String username) throws ApiException { - final String[] localVarAccepts = { }; diff --git a/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION b/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION index d7d7c41be29..93048d0c864 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.19-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java index 6abe1468788..1cce17f72ab 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java @@ -16,6 +16,9 @@ import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.v3.oas.annotations.media.Schema; import com.fasterxml.jackson.dataformat.xml.annotation.*; @@ -24,12 +27,16 @@ * Animal */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true ) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), +}) @XmlRootElement(name = "Animal") @XmlAccessorType(XmlAccessType.FIELD) @JacksonXmlRootElement(localName = "Animal") public class Animal { - @JsonProperty("className") - @JacksonXmlProperty(localName = "className") + @JsonTypeId @XmlElement(name = "className") private String className = null; diff --git a/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION b/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/ApiClient.java index 5cbe78fd4f0..19ed094161f 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/ApiClient.java @@ -63,7 +63,7 @@ public ApiClient(String[] authNames) { } else if ("petstore_auth".equals(authName)) { - auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", ""); + auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } diff --git a/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java index a64e9edf510..d1a5c2102a8 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java @@ -51,7 +51,7 @@ public ApiClient(String[] authNames) { } else if ("http_basic_test".equals(authName)) { auth = new HttpBasicAuth(); } else if ("petstore_auth".equals(authName)) { - auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", ""); + auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); } else { throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); } diff --git a/samples/client/petstore/spring-cloud-v2/.swagger-codegen/VERSION b/samples/client/petstore/spring-cloud-v2/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/spring-cloud-v2/.swagger-codegen/VERSION +++ b/samples/client/petstore/spring-cloud-v2/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/DefaultApi.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/DefaultApi.java index 51e0496e484..869a49d2ce8 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/DefaultApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/PetApi.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/PetApi.java index 28f7c5d7e12..dfa2433dc12 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/StoreApi.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/StoreApi.java index 7776dfefa53..3e5c6970770 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/UserApi.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/UserApi.java index f18036b7d13..4ccc9235b37 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java index c8894e9a562..6e5b8ed54ec 100644 --- a/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java +++ b/samples/client/petstore/spring-cloud-v2/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ 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.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public T deserialize(JsonParser parser, DeserializationContext context) throws I 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()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/spring-cloud/.swagger-codegen/VERSION b/samples/client/petstore/spring-cloud/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/spring-cloud/.swagger-codegen/VERSION +++ b/samples/client/petstore/spring-cloud/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/DefaultApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/DefaultApi.java index 51e0496e484..869a49d2ce8 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/DefaultApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java index 28f7c5d7e12..dfa2433dc12 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java index 7776dfefa53..3e5c6970770 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java index f18036b7d13..4ccc9235b37 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java index c8894e9a562..6e5b8ed54ec 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ 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.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public T deserialize(JsonParser parser, DeserializationContext context) throws I 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()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/client/petstore/spring-stubs/.swagger-codegen/VERSION b/samples/client/petstore/spring-stubs/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/client/petstore/spring-stubs/.swagger-codegen/VERSION +++ b/samples/client/petstore/spring-stubs/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/AllPetsApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/AllPetsApi.java index 94a978b2f09..b254d42b51f 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface AllPetsApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = "application/json", method = RequestMethod.GET) diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/PetApi.java index e6c07afcdaa..71e2d797d57 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -39,7 +39,8 @@ public interface PetApi { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -50,7 +51,8 @@ public interface PetApi { @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -62,7 +64,7 @@ public interface PetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = "application/json", consumes = "application/json", @@ -72,9 +74,10 @@ public interface PetApi { @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -86,9 +89,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -100,7 +104,7 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -113,7 +117,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -128,7 +133,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -139,9 +145,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = "application/json", consumes = "application/octet-stream", diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/RandomPetApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/RandomPetApi.java index 54a21633861..b2163b71e7c 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface RandomPetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = "application/json", method = RequestMethod.GET) diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/StoreApi.java index 49492229dfe..7bd44abdd8a 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -50,7 +50,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = "application/json", method = RequestMethod.GET) @@ -59,7 +59,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -73,7 +73,7 @@ ResponseEntity getOrderById(@Min(1L) @Max(10L) @Parameter(in = ParameterI @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/TestApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/TestApi.java index 4280b2b4e23..91759a7675f 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/TestApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/TestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface TestApi { @Operation(summary = "", description = "", security = { @SecurityRequirement(name = "bearer") }, tags={ }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) + @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) @RequestMapping(value = "/test", produces = "application/json", method = RequestMethod.GET) diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/UserApi.java index 9e0589eabe8..432360b80e3 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -74,7 +74,7 @@ public interface UserApi { @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -87,7 +87,7 @@ public interface UserApi { @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java index c8894e9a562..6e5b8ed54ec 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ 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.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public T deserialize(JsonParser parser, DeserializationContext context) throws I 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()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/server/petstore/jaxrs-spec-interface/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-spec-interface/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AllPetsApi.java index 495ce8995b8..ee5a6d6aa68 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AllPetsApi.java @@ -21,12 +21,12 @@ @Path("/allPets") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface AllPetsApi { @GET @Produces({ "application/json" }) @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) AllPetsResponse getAllPets();} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnimalApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnimalApi.java index e6ffb2d1986..5852642175a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnimalApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnimalApi.java @@ -21,7 +21,7 @@ @Path("/animal") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface AnimalApi { @POST @@ -47,7 +47,7 @@ void deleteAnimal( @PathParam("animalId") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Find animal by ID", description = "Returns a single animal", tags={ "animal" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Animal.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Animal.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) Animal getAnimalById( @PathParam("animalId") diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnotherFakeApi.java index 3f633090ee5..a94e2c4bb05 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/AnotherFakeApi.java @@ -21,7 +21,7 @@ @Path("/another-fake") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface AnotherFakeApi { @PATCH @@ -30,5 +30,5 @@ public interface AnotherFakeApi { @Produces({ "application/json" }) @Operation(summary = "To test special tags", description = "To test special tags", tags={ "$another-fake?" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) Client testSpecialTags(@Valid Client body);} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/DogApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/DogApi.java index 07145805960..106cdd262bf 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/DogApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/DogApi.java @@ -21,7 +21,7 @@ @Path("/dog") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface DogApi { @POST @@ -47,7 +47,7 @@ void deleteDog( @PathParam("dogId") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Find dog by ID", description = "Returns a single dog", tags={ "dog" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Dog.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Dog.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) Dog getDogById( @PathParam("dogId") diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java index 61cb25b46b3..abbe0a4f2b5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java @@ -27,7 +27,7 @@ @Path("/fake") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface FakeApi { @POST @@ -36,7 +36,7 @@ public interface FakeApi { @Produces({ "*/*" }) @Operation(summary = "", description = "Test serialization of outer boolean types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(schema = @Schema(implementation = Boolean.class))) }) + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "*/*", schema = @Schema(implementation = Boolean.class))) }) Boolean fakeOuterBooleanSerialize(@Valid Boolean body); @POST @Path("/outer/composite") @@ -44,7 +44,7 @@ public interface FakeApi { @Produces({ "*/*" }) @Operation(summary = "", description = "Test serialization of object with outer number type", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(schema = @Schema(implementation = OuterComposite.class))) }) + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "*/*", schema = @Schema(implementation = OuterComposite.class))) }) OuterComposite fakeOuterCompositeSerialize(@Valid OuterComposite body); @POST @Path("/outer/number") @@ -52,7 +52,7 @@ public interface FakeApi { @Produces({ "*/*" }) @Operation(summary = "", description = "Test serialization of outer number types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output number", content = @Content(schema = @Schema(implementation = BigDecimal.class))) }) + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "*/*", schema = @Schema(implementation = BigDecimal.class))) }) BigDecimal fakeOuterNumberSerialize(@Valid BigDecimal body); @POST @Path("/outer/string") @@ -60,14 +60,14 @@ public interface FakeApi { @Produces({ "*/*" }) @Operation(summary = "", description = "Test serialization of outer string types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output string", content = @Content(schema = @Schema(implementation = String.class))) }) + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "*/*", schema = @Schema(implementation = String.class))) }) String fakeOuterStringSerialize(@Valid String body); @PATCH @Consumes({ "application/json" }) @Produces({ "application/json" }) @Operation(summary = "To test \"client\" model", description = "To test \"client\" model", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) Client testClientModel(@Valid Client body); @POST @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeClassnameTestApi.java index 628b9fc1b15..51a90e88d9e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeClassnameTestApi.java @@ -21,7 +21,7 @@ @Path("/fake_classname_test") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface FakeClassnameTestApi { @PATCH @@ -30,5 +30,5 @@ public interface FakeClassnameTestApi { @Operation(summary = "To test class name in snake case", description = "", security = { @SecurityRequirement(name = "api_key_query") }, tags={ "fake_classname_tags 123#$%^" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) Client testClassname(@Valid Client body);} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/PetApi.java index 3ac6a133e8d..555be9074bc 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/PetApi.java @@ -24,14 +24,15 @@ @Path("/pet") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface PetApi { @POST @Consumes({ "application/json", "application/xml" }) @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) void addPet(@Valid Pet body); @@ -39,7 +40,8 @@ public interface PetApi { @Path("/{petId}") @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid pet value") }) void deletePet( @PathParam("petId") @@ -55,16 +57,17 @@ void deletePet( @PathParam("petId") @Produces({ "application/json" }) @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) ModelApiResponse doCategoryStuff(@Valid SubCategory body); @GET @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) List findPetsByStatus( @NotNull @QueryParam("status") @@ -75,9 +78,10 @@ List findPetsByStatus( @NotNull @QueryParam("status") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) List findPetsByTags( @NotNull @QueryParam("tags") @@ -89,7 +93,7 @@ List findPetsByTags( @NotNull @QueryParam("tags") @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) Pet getPetById( @PathParam("petId") @@ -100,7 +104,8 @@ Pet getPetById( @PathParam("petId") @Consumes({ "application/json", "application/xml" }) @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found"), @@ -111,7 +116,8 @@ Pet getPetById( @PathParam("petId") @Consumes({ "application/x-www-form-urlencoded" }) @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) void updatePetWithForm( @PathParam("petId") @@ -124,9 +130,10 @@ void updatePetWithForm( @PathParam("petId") @Produces({ "application/json" }) @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) ModelApiResponse uploadFile( @PathParam("petId") @Parameter(description = "ID of pet to update") Long petId diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/RandomPetApi.java index a32a0680f96..f80cdb501b7 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/RandomPetApi.java @@ -21,12 +21,12 @@ @Path("/randomPet") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface RandomPetApi { @GET @Produces({ "application/json" }) @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) SinglePetResponse getRandomPet();} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/StoreApi.java index b3373f7e3e6..16b827e11cd 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/StoreApi.java @@ -22,7 +22,7 @@ @Path("/store") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface StoreApi { @DELETE @@ -41,14 +41,14 @@ void deleteOrder( @PathParam("order_id") @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) Map getInventory(); @GET @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Order not found") }) Order getOrderById( @Min(1L) @Max(5L) @PathParam("order_id") @@ -61,6 +61,6 @@ Order getOrderById( @Min(1L) @Max(5L) @PathParam("order_id") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) Order placeOrder(@Valid Order body);} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/UserApi.java index d1f0844a0df..f277b4769f5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/UserApi.java @@ -21,7 +21,7 @@ @Path("/user") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:26:54.217-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:40:20.525-05:00[America/Bogota]") public interface UserApi { @POST @@ -59,7 +59,7 @@ void deleteUser( @PathParam("username") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @ApiResponse(responseCode = "404", description = "User not found") }) User getUserByName( @PathParam("username") @@ -71,7 +71,7 @@ User getUserByName( @PathParam("username") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) String loginUser( @NotNull @QueryParam("username") diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index 94e86d8f657..76071f2b3b7 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -13,7 +13,9 @@ public class AdditionalPropertiesClass { + private @Valid Map mapProperty = new HashMap(); + private @Valid Map> mapOfMapProperty = new HashMap>(); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AllOfSubCategoryCategory.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AllOfSubCategoryCategory.java index 13bca5ede04..20aab9d6e10 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AllOfSubCategoryCategory.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AllOfSubCategoryCategory.java @@ -12,9 +12,13 @@ public class AllOfSubCategoryCategory extends Category { + private @Valid Boolean foo = null; + private @Valid Integer bar = null; + private @Valid String beer = null; + private @Valid User drunk = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java index dfaa8b23548..a8ae07f3905 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java @@ -13,7 +13,9 @@ public class Animal { + private @Valid String className = null; + private @Valid String color = "red"; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 812ed1d0426..962b2baf055 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -13,6 +13,7 @@ public class ArrayOfArrayOfNumberOnly { + private @Valid List> arrayArrayNumber = new ArrayList>(); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index afb4c5c32fb..bd6892bbe0a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -13,6 +13,7 @@ public class ArrayOfNumberOnly { + private @Valid List arrayNumber = new ArrayList(); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java index d61a151f2a9..faa691373bf 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java @@ -13,8 +13,11 @@ public class ArrayTest { + private @Valid List arrayOfString = new ArrayList(); + private @Valid List> arrayArrayOfInteger = new ArrayList>(); + private @Valid List> arrayArrayOfModel = new ArrayList>(); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body.java index a4c27ce1963..83230373869 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body.java @@ -10,7 +10,9 @@ public class Body { + private @Valid String name = null; + private @Valid String status = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body1.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body1.java index 98fbc44938c..fc87626339c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body1.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body1.java @@ -11,7 +11,9 @@ public class Body1 { + private @Valid String additionalMetadata = null; + private @Valid File file = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body2.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body2.java index 3d8582c1c46..3e3b3c95b71 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body2.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body2.java @@ -14,19 +14,33 @@ public class Body2 { + private @Valid Integer integer = null; + private @Valid Integer int32 = null; + private @Valid Long int64 = null; + private @Valid BigDecimal number = null; + private @Valid Float _float = null; + private @Valid Double _double = null; + private @Valid String string = null; + private @Valid String patternWithoutDelimiter = null; + private @Valid byte[] _byte = null; + private @Valid File binary = null; + private @Valid LocalDate date = null; + private @Valid Date dateTime = null; + private @Valid String password = null; + private @Valid String callback = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body3.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body3.java index ff04bdb3f87..96c7dd43ce8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body3.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body3.java @@ -14,19 +14,33 @@ public class Body3 { + private @Valid Integer integer = null; + private @Valid Integer int32 = null; + private @Valid Long int64 = null; + private @Valid BigDecimal number = null; + private @Valid Float _float = null; + private @Valid Double _double = null; + private @Valid String string = null; + private @Valid String patternWithoutDelimiter = null; + private @Valid byte[] _byte = null; + private @Valid File binary = null; + private @Valid LocalDate date = null; + private @Valid Date dateTime = null; + private @Valid String password = null; + private @Valid String callback = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body4.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body4.java index b736c635d0c..c7b00e6a237 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body4.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body4.java @@ -13,38 +13,39 @@ public class Body4 { - public enum EnumFormStringArrayEnum { - - GREATER_THAN(String.valueOf(">")), DOLLAR(String.valueOf("$")); - - - private String value; - - EnumFormStringArrayEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumFormStringArrayEnum fromValue(String v) { - for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { - if (String.valueOf(b.value).equals(v)) { - return b; - } - } - return null; - } - } +public enum EnumFormStringArrayEnum { + + GREATER_THAN(String.valueOf(">")), DOLLAR(String.valueOf("$")); + + + private String value; + + EnumFormStringArrayEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String v) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (String.valueOf(b.value).equals(v)) { + return b; + } + } + return null; + } +} private @Valid List enumFormStringArray = new ArrayList(); + public enum EnumFormStringEnum { _ABC(String.valueOf("_abc")), _EFG(String.valueOf("-efg")), _XYZ_(String.valueOf("(xyz)")); @@ -77,6 +78,7 @@ public static EnumFormStringEnum fromValue(String v) { } } private @Valid EnumFormStringEnum enumFormString = EnumFormStringEnum._EFG; + public enum EnumQueryDoubleEnum { NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body5.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body5.java index b236cea1f51..0384ffc6102 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body5.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body5.java @@ -10,7 +10,9 @@ public class Body5 { + private @Valid String param = null; + private @Valid String param2 = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body6.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body6.java index 0eb4a382ac2..6ce5d6177a3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body6.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body6.java @@ -10,7 +10,9 @@ public class Body6 { + private @Valid String name = null; + private @Valid String status = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body7.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body7.java index e93698506b2..4733adf4fab 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body7.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Body7.java @@ -10,7 +10,9 @@ public class Body7 { + private @Valid String name = null; + private @Valid String status = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java index 1c015ce96be..2af2dba5ca6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java @@ -10,11 +10,17 @@ public class Capitalization { + private @Valid String smallCamel = null; + private @Valid String capitalCamel = null; + private @Valid String smallSnake = null; + private @Valid String capitalSnake = null; + private @Valid String scAETHFlowPoints = null; + private @Valid String ATT_NAME = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java index 82520913971..994c6a73f4e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java @@ -11,6 +11,7 @@ public class Cat extends Animal implements OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { + private @Valid Boolean declawed = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java index 06a7f21dad0..2c13c17e588 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java @@ -10,7 +10,9 @@ public class Category { + private @Valid Long id = null; + private @Valid String name = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java index ebf742e4c37..795b482261e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java @@ -13,6 +13,7 @@ @Schema(description = "Model for testing model with \"_class\" property") public class ClassModel { + private @Valid String propertyClass = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java index f7534707a91..5ca0d0c19b9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java @@ -10,6 +10,7 @@ public class Client { + private @Valid String client = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java index 85939cc4de5..5a26a70d41c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java @@ -11,6 +11,7 @@ public class Dog extends Animal implements OneOfAllPetsResponseItems, OneOfSinglePetResponsePet { + private @Valid String breed = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java index 71173166fc2..3ca186fdc16 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java @@ -12,6 +12,7 @@ public class EnumArrays { + public enum JustSymbolEnum { GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$")); @@ -45,37 +46,37 @@ public static JustSymbolEnum fromValue(String v) { } private @Valid JustSymbolEnum justSymbol = null; - public enum ArrayEnumEnum { - - FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); - - - private String value; - - ArrayEnumEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ArrayEnumEnum fromValue(String v) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (String.valueOf(b.value).equals(v)) { - return b; - } - } - return null; - } - } +public enum ArrayEnumEnum { + + FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); + + + private String value; + + ArrayEnumEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String v) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (String.valueOf(b.value).equals(v)) { + return b; + } + } + return null; + } +} private @Valid List arrayEnum = new ArrayList(); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java index 89dd09e0467..7e38002f8e6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java @@ -11,6 +11,7 @@ public class EnumTest { + public enum EnumStringEnum { UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); @@ -43,6 +44,7 @@ public static EnumStringEnum fromValue(String v) { } } private @Valid EnumStringEnum enumString = null; + public enum EnumIntegerEnum { NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); @@ -75,6 +77,7 @@ public static EnumIntegerEnum fromValue(String v) { } } private @Valid EnumIntegerEnum enumInteger = null; + public enum EnumNumberEnum { NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); @@ -107,6 +110,7 @@ public static EnumNumberEnum fromValue(String v) { } } private @Valid EnumNumberEnum enumNumber = null; + private @Valid OuterEnum outerEnum = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java index 8af00aef791..5d22c1207bd 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java @@ -15,18 +15,31 @@ public class FormatTest { + private @Valid Integer integer = null; + private @Valid Integer int32 = null; + private @Valid Long int64 = null; + private @Valid BigDecimal number = null; + private @Valid Float _float = null; + private @Valid Double _double = null; + private @Valid String string = null; + private @Valid byte[] _byte = null; + private @Valid File binary = null; + private @Valid LocalDate date = null; + private @Valid Date dateTime = null; + private @Valid UUID uuid = null; + private @Valid String password = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index 36c9d4e18f4..9cd7a05eaa6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -10,7 +10,9 @@ public class HasOnlyReadOnly { + private @Valid String bar = null; + private @Valid String foo = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/List.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/List.java index 39117383671..32b7570b9b9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/List.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/List.java @@ -10,6 +10,7 @@ public class List { + private @Valid String _123List = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java index 8763409d311..ec1aeb07432 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java @@ -13,39 +13,40 @@ public class MapTest { + private @Valid Map> mapMapOfString = new HashMap>(); - public enum InnerEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); - - - private String value; - - InnerEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InnerEnum fromValue(String v) { - for (InnerEnum b : InnerEnum.values()) { - if (String.valueOf(b.value).equals(v)) { - return b; - } - } - return null; - } - } +public enum InnerEnum { + + UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); + + + private String value; + + InnerEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String v) { + for (InnerEnum b : InnerEnum.values()) { + if (String.valueOf(b.value).equals(v)) { + return b; + } + } + return null; + } +} private @Valid Map mapOfEnumString = new HashMap(); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index fa2c35ab490..742ff586cc4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -16,8 +16,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass { + private @Valid UUID uuid = null; + private @Valid Date dateTime = null; + private @Valid Map map = new HashMap(); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java index c1c83d28ae6..3c216b2b676 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java @@ -13,7 +13,9 @@ @Schema(description = "Model for testing model name starting with number") public class Model200Response { + private @Valid Integer name = null; + private @Valid String propertyClass = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java index 7f3d90d0cf1..129ff227ad6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -10,8 +10,11 @@ public class ModelApiResponse { + private @Valid Integer code = null; + private @Valid String type = null; + private @Valid String message = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java index 91dc7ed5486..8f2117e020a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java @@ -13,6 +13,7 @@ @Schema(description = "Model for testing reserved words") public class ModelReturn { + private @Valid Integer _return = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java index 4948c873df8..adc592b167b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java @@ -13,9 +13,13 @@ @Schema(description = "Model for testing model name same as property name") public class Name { + private @Valid Integer name = null; + private @Valid Integer snakeCase = null; + private @Valid String property = null; + private @Valid Integer _123Number = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NullableEnumModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NullableEnumModel.java index f021f4a5039..6c056a818a1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NullableEnumModel.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NullableEnumModel.java @@ -10,6 +10,7 @@ public class NullableEnumModel { + public enum EnumPropEnum { A(String.valueOf("a")), B(String.valueOf("b")), NULL(null); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java index 2d0a6b96a80..6780c9ffb06 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java @@ -11,6 +11,7 @@ public class NumberOnly { + private @Valid BigDecimal justNumber = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java index 56929ff953d..481e58d0d5a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java @@ -11,10 +11,15 @@ public class Order { + private @Valid Long id = null; + private @Valid Long petId = null; + private @Valid Integer quantity = null; + private @Valid Date shipDate = null; + public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -47,6 +52,7 @@ public static StatusEnum fromValue(String v) { } } private @Valid StatusEnum status = null; + private @Valid Boolean complete = false; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java index 45a93bc968d..6b8736f6546 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java @@ -11,8 +11,11 @@ public class OuterComposite { + private @Valid BigDecimal myNumber = null; + private @Valid String myString = null; + private @Valid Boolean myBoolean = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java index ea3b796618e..8e2dba01c73 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java @@ -14,11 +14,17 @@ public class Pet { + private @Valid Long id = null; + private @Valid Category category = null; + private @Valid String name = null; + private @Valid List photoUrls = new ArrayList(); + private @Valid List tags = new ArrayList(); + public enum StatusEnum { AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 844f57c2d0c..c66188dd568 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -10,7 +10,9 @@ public class ReadOnlyFirst { + private @Valid String bar = null; + private @Valid String baz = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SinglePetResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SinglePetResponse.java index e9eed7ec971..ac58b3780ad 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SinglePetResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SinglePetResponse.java @@ -10,6 +10,7 @@ public class SinglePetResponse { + private @Valid OneOfSinglePetResponsePet pet = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java index c0fef715839..c43043a9e70 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java @@ -10,6 +10,7 @@ public class SpecialModelName { + private @Valid Long $specialPropertyName = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SubCategory.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SubCategory.java index 01700d691c4..990732c4baf 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SubCategory.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SubCategory.java @@ -13,8 +13,11 @@ public class SubCategory { + private @Valid AllOfSubCategoryCategory category = null; + private @Valid Category category2 = null; + private @Valid List pets = new ArrayList(); /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java index 1fe7bda0c0c..3298d8d73c4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java @@ -10,7 +10,9 @@ public class Tag { + private @Valid Long id = null; + private @Valid String name = null; /** diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java index 2b3a0034cb4..09bd74fda27 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java @@ -10,13 +10,21 @@ public class User { + private @Valid Long id = null; + private @Valid String username = null; + private @Valid String firstName = null; + private @Valid String lastName = null; + private @Valid String email = null; + private @Valid String password = null; + private @Valid String phone = null; + private @Valid Integer userStatus = null; /** diff --git a/samples/server/petstore/jaxrs-spec/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-spec/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/jaxrs-spec/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-spec/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AllPetsApi.java index 43f9b79dc51..95df0e062ec 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AllPetsApi.java @@ -21,14 +21,14 @@ @Path("/allPets") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class AllPetsApi { @GET @Produces({ "application/json" }) @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) public Response getAllPets() { return Response.ok().entity("magic!").build(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnimalApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnimalApi.java index c2658aba8ca..33943d23b95 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnimalApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnimalApi.java @@ -21,7 +21,7 @@ @Path("/animal") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class AnimalApi { @POST @@ -53,7 +53,7 @@ public Response deleteAnimal( @PathParam("animalId") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Find animal by ID", description = "Returns a single animal", tags={ "animal" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Animal.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Animal.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnotherFakeApi.java index cc9f19a4d0a..35a277c67ae 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/AnotherFakeApi.java @@ -21,7 +21,7 @@ @Path("/another-fake") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class AnotherFakeApi { @PATCH @@ -30,7 +30,7 @@ public class AnotherFakeApi { @Produces({ "application/json" }) @Operation(summary = "To test special tags", description = "To test special tags", tags={ "$another-fake?" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) public Response testSpecialTags(@Valid Client body) { return Response.ok().entity("magic!").build(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/DogApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/DogApi.java index c1afdf60e87..a3ecf7bab94 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/DogApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/DogApi.java @@ -21,7 +21,7 @@ @Path("/dog") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class DogApi { @POST @@ -53,7 +53,7 @@ public Response deleteDog( @PathParam("dogId") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Find dog by ID", description = "Returns a single dog", tags={ "dog" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Dog.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Dog.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) 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 ba02cb05390..b5bfdbe3b81 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 @@ -27,7 +27,7 @@ @Path("/fake") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class FakeApi { @POST @@ -36,7 +36,7 @@ public class FakeApi { @Produces({ "*/*" }) @Operation(summary = "", description = "Test serialization of outer boolean types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(schema = @Schema(implementation = Boolean.class))) + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "*/*", schema = @Schema(implementation = Boolean.class))) }) public Response fakeOuterBooleanSerialize(@Valid Boolean body) { return Response.ok().entity("magic!").build(); @@ -47,7 +47,7 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) { @Produces({ "*/*" }) @Operation(summary = "", description = "Test serialization of object with outer number type", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(schema = @Schema(implementation = OuterComposite.class))) + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "*/*", schema = @Schema(implementation = OuterComposite.class))) }) public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) { return Response.ok().entity("magic!").build(); @@ -58,7 +58,7 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite body) { @Produces({ "*/*" }) @Operation(summary = "", description = "Test serialization of outer number types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output number", content = @Content(schema = @Schema(implementation = BigDecimal.class))) + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "*/*", schema = @Schema(implementation = BigDecimal.class))) }) public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { return Response.ok().entity("magic!").build(); @@ -69,7 +69,7 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) { @Produces({ "*/*" }) @Operation(summary = "", description = "Test serialization of outer string types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output string", content = @Content(schema = @Schema(implementation = String.class))) + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "*/*", schema = @Schema(implementation = String.class))) }) public Response fakeOuterStringSerialize(@Valid String body) { return Response.ok().entity("magic!").build(); @@ -79,7 +79,7 @@ public Response fakeOuterStringSerialize(@Valid String body) { @Produces({ "application/json" }) @Operation(summary = "To test \"client\" model", description = "To test \"client\" model", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) public Response testClientModel(@Valid Client body) { return Response.ok().entity("magic!").build(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeClassnameTestApi.java index a6471dc0902..8d4151bdffe 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeClassnameTestApi.java @@ -21,7 +21,7 @@ @Path("/fake_classname_test") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class FakeClassnameTestApi { @PATCH @@ -30,7 +30,7 @@ public class FakeClassnameTestApi { @Operation(summary = "To test class name in snake case", description = "", security = { @SecurityRequirement(name = "api_key_query") }, tags={ "fake_classname_tags 123#$%^" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) public Response testClassname(@Valid Client body) { return Response.ok().entity("magic!").build(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/PetApi.java index 50499cad617..e65fdf9dac3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/PetApi.java @@ -24,14 +24,15 @@ @Path("/pet") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class PetApi { @POST @Consumes({ "application/json", "application/xml" }) @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @@ -42,7 +43,8 @@ public Response addPet(@Valid Pet body) { @Path("/{petId}") @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid pet value") }) @@ -61,7 +63,7 @@ public Response deletePet( @PathParam("petId") @Produces({ "application/json" }) @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) public Response doCategoryStuff(@Valid SubCategory body) { return Response.ok().entity("magic!").build(); @@ -71,9 +73,10 @@ public Response doCategoryStuff(@Valid SubCategory body) { @Produces({ "application/xml", "application/json" }) @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) public Response findPetsByStatus( @NotNull @QueryParam("status") @@ -87,9 +90,10 @@ public Response findPetsByStatus( @NotNull @QueryParam("status") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) public Response findPetsByTags( @NotNull @QueryParam("tags") @@ -104,7 +108,7 @@ public Response findPetsByTags( @NotNull @QueryParam("tags") @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found") }) @@ -118,7 +122,8 @@ public Response getPetById( @PathParam("petId") @Consumes({ "application/json", "application/xml" }) @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Pet not found"), @@ -132,7 +137,8 @@ public Response updatePet(@Valid Pet body) { @Consumes({ "application/x-www-form-urlencoded" }) @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @@ -148,9 +154,10 @@ public Response updatePetWithForm( @PathParam("petId") @Produces({ "application/json" }) @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) public Response uploadFile( @PathParam("petId") diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/RandomPetApi.java index be67de3837d..d24ec54f429 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/RandomPetApi.java @@ -21,14 +21,14 @@ @Path("/randomPet") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class RandomPetApi { @GET @Produces({ "application/json" }) @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) public Response getRandomPet() { return Response.ok().entity("magic!").build(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java index 424360fe87e..250bb1fc64b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/StoreApi.java @@ -22,7 +22,7 @@ @Path("/store") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class StoreApi { @DELETE @@ -44,7 +44,7 @@ public Response deleteOrder( @PathParam("order_id") @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) public Response getInventory() { return Response.ok().entity("magic!").build(); @@ -54,7 +54,7 @@ public Response getInventory() { @Produces({ "application/xml", "application/json" }) @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @ApiResponse(responseCode = "404", description = "Order not found") }) @@ -70,7 +70,7 @@ public Response getOrderById( @Min(1L) @Max(5L) @PathParam("order_id") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) public Response placeOrder(@Valid Order body) { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/UserApi.java index 6adc14634aa..345c744862e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/UserApi.java @@ -21,7 +21,7 @@ @Path("/user") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-01-24T13:25:49.427-05:00[America/Bogota]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaJAXRSSpecServerCodegen", date = "2021-04-27T14:35:29.140-05:00[America/Bogota]") public class UserApi { @POST @@ -71,7 +71,7 @@ public Response deleteUser( @PathParam("username") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @ApiResponse(responseCode = "404", description = "User not found") }) @@ -86,7 +86,7 @@ public Response getUserByName( @PathParam("username") @Produces({ "application/xml", "application/json" }) @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) public Response loginUser( @NotNull @QueryParam("username") 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 542e6c9f1af..0148a67060a 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 @@ -14,7 +14,9 @@ public class AdditionalPropertiesClass implements Serializable { + private @Valid Map mapProperty = new HashMap(); + private @Valid Map> mapOfMapProperty = new HashMap>(); /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AllOfSubCategoryCategory.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AllOfSubCategoryCategory.java index bee82888b88..23e18eaf67f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AllOfSubCategoryCategory.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AllOfSubCategoryCategory.java @@ -13,9 +13,13 @@ public class AllOfSubCategoryCategory extends Category implements Serializable { + private @Valid Boolean foo = null; + private @Valid Integer bar = null; + private @Valid String beer = null; + private @Valid User drunk = 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 b612c657043..f99a819508b 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 @@ -14,7 +14,9 @@ public class Animal implements Serializable { + private @Valid String className = null; + private @Valid String color = "red"; /** 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 1001b0a9e88..a56560f02c3 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 @@ -14,6 +14,7 @@ public class ArrayOfArrayOfNumberOnly implements Serializable { + private @Valid List> arrayArrayNumber = new ArrayList>(); /** 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 2697c40c4c2..a46a6c3fb20 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 @@ -14,6 +14,7 @@ public class ArrayOfNumberOnly implements Serializable { + private @Valid List arrayNumber = new ArrayList(); /** 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 d76b4c6e8e8..1e009a161a9 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 @@ -14,8 +14,11 @@ public class ArrayTest implements Serializable { + private @Valid List arrayOfString = new ArrayList(); + private @Valid List> arrayArrayOfInteger = new ArrayList>(); + private @Valid List> arrayArrayOfModel = new ArrayList>(); /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body.java index 42ac98fb3ec..ce0e2e2a3af 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body.java @@ -11,7 +11,9 @@ public class Body implements Serializable { + private @Valid String name = null; + private @Valid String status = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body1.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body1.java index 0e01707d9ee..0569e001ac6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body1.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body1.java @@ -12,7 +12,9 @@ public class Body1 implements Serializable { + private @Valid String additionalMetadata = null; + private @Valid File file = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body2.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body2.java index 1ccf7c96067..2d9c76ca16d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body2.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body2.java @@ -15,19 +15,33 @@ public class Body2 implements Serializable { + private @Valid Integer integer = null; + private @Valid Integer int32 = null; + private @Valid Long int64 = null; + private @Valid BigDecimal number = null; + private @Valid Float _float = null; + private @Valid Double _double = null; + private @Valid String string = null; + private @Valid String patternWithoutDelimiter = null; + private @Valid byte[] _byte = null; + private @Valid File binary = null; + private @Valid LocalDate date = null; + private @Valid Date dateTime = null; + private @Valid String password = null; + private @Valid String callback = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body3.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body3.java index 66eaf757fe3..511e32c072f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body3.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body3.java @@ -15,19 +15,33 @@ public class Body3 implements Serializable { + private @Valid Integer integer = null; + private @Valid Integer int32 = null; + private @Valid Long int64 = null; + private @Valid BigDecimal number = null; + private @Valid Float _float = null; + private @Valid Double _double = null; + private @Valid String string = null; + private @Valid String patternWithoutDelimiter = null; + private @Valid byte[] _byte = null; + private @Valid File binary = null; + private @Valid LocalDate date = null; + private @Valid Date dateTime = null; + private @Valid String password = null; + private @Valid String callback = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body4.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body4.java index 0b480a54b29..be08d923160 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body4.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body4.java @@ -14,38 +14,39 @@ public class Body4 implements Serializable { - public enum EnumFormStringArrayEnum { - - GREATER_THAN(String.valueOf(">")), DOLLAR(String.valueOf("$")); - - - private String value; - - EnumFormStringArrayEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumFormStringArrayEnum fromValue(String v) { - for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { - if (String.valueOf(b.value).equals(v)) { - return b; - } - } - return null; - } - } +public enum EnumFormStringArrayEnum { + + GREATER_THAN(String.valueOf(">")), DOLLAR(String.valueOf("$")); + + + private String value; + + EnumFormStringArrayEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EnumFormStringArrayEnum fromValue(String v) { + for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) { + if (String.valueOf(b.value).equals(v)) { + return b; + } + } + return null; + } +} private @Valid List enumFormStringArray = new ArrayList(); + public enum EnumFormStringEnum { _ABC(String.valueOf("_abc")), _EFG(String.valueOf("-efg")), _XYZ_(String.valueOf("(xyz)")); @@ -78,6 +79,7 @@ public static EnumFormStringEnum fromValue(String v) { } } private @Valid EnumFormStringEnum enumFormString = EnumFormStringEnum._EFG; + public enum EnumQueryDoubleEnum { NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body5.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body5.java index aa57ea3a8a6..9d29598e971 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body5.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body5.java @@ -11,7 +11,9 @@ public class Body5 implements Serializable { + private @Valid String param = null; + private @Valid String param2 = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body6.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body6.java index f0e2e2c90c2..add2aff4f32 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body6.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body6.java @@ -11,7 +11,9 @@ public class Body6 implements Serializable { + private @Valid String name = null; + private @Valid String status = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body7.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body7.java index 1baa4e91c69..4cf5e96ff24 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body7.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Body7.java @@ -11,7 +11,9 @@ public class Body7 implements Serializable { + private @Valid String name = null; + private @Valid String status = 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 b8534eb543d..42ca495fa51 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 @@ -11,11 +11,17 @@ public class Capitalization implements Serializable { + private @Valid String smallCamel = null; + private @Valid String capitalCamel = null; + private @Valid String smallSnake = null; + private @Valid String capitalSnake = null; + private @Valid String scAETHFlowPoints = null; + private @Valid String ATT_NAME = 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 89bafa8a78f..b69a1e49d0b 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 @@ -12,6 +12,7 @@ public class Cat extends Animal implements Serializable , OneOfAllPetsResponseItems, , OneOfSinglePetResponsePet { + private @Valid Boolean declawed = 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 8a114f06e81..ade6a83d905 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 @@ -11,7 +11,9 @@ public class Category implements Serializable { + private @Valid Long id = null; + private @Valid String name = 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 e21f096397c..838c2f3ac5e 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 @@ -14,6 +14,7 @@ @Schema(description = "Model for testing model with \"_class\" property") public class ClassModel implements Serializable { + private @Valid String propertyClass = 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 cac87d44072..463c91e52d3 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 @@ -11,6 +11,7 @@ public class Client implements Serializable { + private @Valid String client = 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 8f181e34834..4203bfca68d 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 @@ -12,6 +12,7 @@ public class Dog extends Animal implements Serializable , OneOfAllPetsResponseItems, , OneOfSinglePetResponsePet { + private @Valid String breed = 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 93ff11da229..a129aa4d7ed 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 @@ -13,6 +13,7 @@ public class EnumArrays implements Serializable { + public enum JustSymbolEnum { GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$")); @@ -46,37 +47,37 @@ public static JustSymbolEnum fromValue(String v) { } private @Valid JustSymbolEnum justSymbol = null; - public enum ArrayEnumEnum { - - FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); - - - private String value; - - ArrayEnumEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ArrayEnumEnum fromValue(String v) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (String.valueOf(b.value).equals(v)) { - return b; - } - } - return null; - } - } +public enum ArrayEnumEnum { + + FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); + + + private String value; + + ArrayEnumEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayEnumEnum fromValue(String v) { + for (ArrayEnumEnum b : ArrayEnumEnum.values()) { + if (String.valueOf(b.value).equals(v)) { + return b; + } + } + return null; + } +} private @Valid List arrayEnum = new ArrayList(); /** 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 92432569a86..cf45b7cacb3 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 @@ -12,6 +12,7 @@ public class EnumTest implements Serializable { + public enum EnumStringEnum { UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); @@ -44,6 +45,7 @@ public static EnumStringEnum fromValue(String v) { } } private @Valid EnumStringEnum enumString = null; + public enum EnumIntegerEnum { NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); @@ -76,6 +78,7 @@ public static EnumIntegerEnum fromValue(String v) { } } private @Valid EnumIntegerEnum enumInteger = null; + public enum EnumNumberEnum { NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); @@ -108,6 +111,7 @@ public static EnumNumberEnum fromValue(String v) { } } private @Valid EnumNumberEnum enumNumber = null; + private @Valid OuterEnum outerEnum = 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 7f344668003..09b906d0e03 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 @@ -16,18 +16,31 @@ public class FormatTest implements Serializable { + private @Valid Integer integer = null; + private @Valid Integer int32 = null; + private @Valid Long int64 = null; + private @Valid BigDecimal number = null; + private @Valid Float _float = null; + private @Valid Double _double = null; + private @Valid String string = null; + private @Valid byte[] _byte = null; + private @Valid File binary = null; + private @Valid LocalDate date = null; + private @Valid Date dateTime = null; + private @Valid UUID uuid = null; + private @Valid String password = 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 dee5fac6a6b..9c49f080c55 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 @@ -11,7 +11,9 @@ public class HasOnlyReadOnly implements Serializable { + private @Valid String bar = null; + private @Valid String foo = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/List.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/List.java index 9fadbb0dca3..3dcaaba3487 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/List.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/List.java @@ -11,6 +11,7 @@ public class List implements Serializable { + private @Valid String _123List = 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 0e33c7fcf68..3da74fc616f 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 @@ -14,39 +14,40 @@ public class MapTest implements Serializable { + private @Valid Map> mapMapOfString = new HashMap>(); - public enum InnerEnum { - - UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); - - - private String value; - - InnerEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InnerEnum fromValue(String v) { - for (InnerEnum b : InnerEnum.values()) { - if (String.valueOf(b.value).equals(v)) { - return b; - } - } - return null; - } - } +public enum InnerEnum { + + UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); + + + private String value; + + InnerEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InnerEnum fromValue(String v) { + for (InnerEnum b : InnerEnum.values()) { + if (String.valueOf(b.value).equals(v)) { + return b; + } + } + return null; + } +} private @Valid Map mapOfEnumString = new HashMap(); /** 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 c6d1d615048..19617d97e53 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 @@ -17,8 +17,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { + private @Valid UUID uuid = null; + private @Valid Date dateTime = null; + private @Valid Map map = new HashMap(); /** 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 07d10ee4d39..be094125f95 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 @@ -14,7 +14,9 @@ @Schema(description = "Model for testing model name starting with number") public class Model200Response implements Serializable { + private @Valid Integer name = null; + private @Valid String propertyClass = 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 c45eb325a16..c2a85b92c72 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 @@ -11,8 +11,11 @@ public class ModelApiResponse implements Serializable { + private @Valid Integer code = null; + private @Valid String type = null; + private @Valid String message = 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 eb1f7e5203c..e64713c0134 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 @@ -14,6 +14,7 @@ @Schema(description = "Model for testing reserved words") public class ModelReturn implements Serializable { + private @Valid Integer _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 e80da4efa40..abbeca638dd 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 @@ -14,9 +14,13 @@ @Schema(description = "Model for testing model name same as property name") public class Name implements Serializable { + private @Valid Integer name = null; + private @Valid Integer snakeCase = null; + private @Valid String property = null; + private @Valid Integer _123Number = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NullableEnumModel.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NullableEnumModel.java index 69a8f73c3ef..a43e0055cf6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NullableEnumModel.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NullableEnumModel.java @@ -11,6 +11,7 @@ public class NullableEnumModel implements Serializable { + public enum EnumPropEnum { A(String.valueOf("a")), B(String.valueOf("b")), NULL(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 6dc6bdff20c..6997b48b965 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 @@ -12,6 +12,7 @@ public class NumberOnly implements Serializable { + private @Valid BigDecimal justNumber = 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 0eb88670705..55580a72a9e 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 @@ -12,10 +12,15 @@ public class Order implements Serializable { + private @Valid Long id = null; + private @Valid Long petId = null; + private @Valid Integer quantity = null; + private @Valid Date shipDate = null; + public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -48,6 +53,7 @@ public static StatusEnum fromValue(String v) { } } private @Valid StatusEnum status = null; + private @Valid Boolean complete = false; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java index f6e99c83331..86feb2e634c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java @@ -12,8 +12,11 @@ public class OuterComposite implements Serializable { + private @Valid BigDecimal myNumber = null; + private @Valid String myString = null; + private @Valid Boolean myBoolean = 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 7495b78ce50..96b500ce60f 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 @@ -15,11 +15,17 @@ public class Pet implements Serializable { + private @Valid Long id = null; + private @Valid Category category = null; + private @Valid String name = null; + private @Valid List photoUrls = new ArrayList(); + private @Valid List tags = new ArrayList(); + public enum StatusEnum { AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); 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 1f815a6df79..e787c63c7e6 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 @@ -11,7 +11,9 @@ public class ReadOnlyFirst implements Serializable { + private @Valid String bar = null; + private @Valid String baz = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SinglePetResponse.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SinglePetResponse.java index 64b72f6b217..bb0d681ae90 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SinglePetResponse.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SinglePetResponse.java @@ -11,6 +11,7 @@ public class SinglePetResponse implements Serializable { + private @Valid OneOfSinglePetResponsePet pet = 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 8c8f88ee7f3..851a55e5f66 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 @@ -11,6 +11,7 @@ public class SpecialModelName implements Serializable { + private @Valid Long $specialPropertyName = null; /** diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SubCategory.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SubCategory.java index 2bb3d2f5fdd..cc3d21d4656 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SubCategory.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SubCategory.java @@ -14,8 +14,11 @@ public class SubCategory implements Serializable { + private @Valid AllOfSubCategoryCategory category = null; + private @Valid Category category2 = null; + private @Valid List pets = new ArrayList(); /** 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 82dcaae1aad..dca92d8643f 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 @@ -11,7 +11,9 @@ public class Tag implements Serializable { + private @Valid Long id = null; + private @Valid String name = 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 74e86cb57ba..3d4a41e3575 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 @@ -11,13 +11,21 @@ public class User implements Serializable { + private @Valid Long id = null; + private @Valid String username = null; + private @Valid String firstName = null; + private @Valid String lastName = null; + private @Valid String email = null; + private @Valid String password = null; + private @Valid String phone = null; + private @Valid Integer userStatus = null; /** diff --git a/samples/server/petstore/jaxrs-spec/swagger.json b/samples/server/petstore/jaxrs-spec/swagger.json index 1282bbd18e3..4a33552ad06 100644 --- a/samples/server/petstore/jaxrs-spec/swagger.json +++ b/samples/server/petstore/jaxrs-spec/swagger.json @@ -126,8 +126,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "available", - "enum" : [ "available", "pending", "sold" ] + "enum" : [ "available", "pending", "sold" ], + "default" : "available" } } } ], @@ -899,8 +899,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } } }, { @@ -912,8 +912,8 @@ "explode" : false, "schema" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" } }, { "name" : "enum_query_string_array", @@ -926,8 +926,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } } }, { @@ -939,8 +939,8 @@ "explode" : true, "schema" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" } }, { "name" : "enum_query_integer", @@ -1786,8 +1786,8 @@ }, "EnumClass" : { "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" }, "List" : { "type" : "object", @@ -2534,15 +2534,15 @@ "description" : "Form parameter enum test (string array)", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, "enum_form_string" : { "type" : "string", "description" : "Form parameter enum test (string)", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" }, "enum_query_double" : { "type" : "number", diff --git a/samples/server/petstore/spring-mvc-j8-async/.swagger-codegen/VERSION b/samples/server/petstore/spring-mvc-j8-async/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.swagger-codegen/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/AllPetsApi.java index 3200ad7086a..fabe06ff21c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApi.java index 24092039a97..6eca33c86a8 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/RandomPetApi.java index 9625ae26ff7..99b1e5f40aa 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApi.java index 71892225843..bbf800d5f29 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/TestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/TestApi.java index b2237775f84..f95ec5b063b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/TestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/TestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApi.java index 38b564ed0f4..27c5e73fcf8 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.swagger-codegen/VERSION b/samples/server/petstore/springboot-beanvalidation/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/springboot-beanvalidation/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/AllPetsApi.java index c070b85781b..c9307c59d11 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface AllPetsApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/PetApi.java index 09db4b175ae..263d606fadd 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -39,7 +39,8 @@ public interface PetApi { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -50,7 +51,8 @@ public interface PetApi { @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -62,7 +64,7 @@ public interface PetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = { "application/json" }, consumes = { "application/json" }, @@ -72,9 +74,10 @@ public interface PetApi { @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -86,9 +89,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -100,7 +104,7 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -113,7 +117,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -128,7 +133,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -139,9 +145,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "application/octet-stream" }, diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/RandomPetApi.java index 1df8f25cfbb..7ad84ee4a62 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface RandomPetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/StoreApi.java index b06ca6a51a2..1777387d78f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -50,7 +50,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET) @@ -59,7 +59,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -73,7 +73,7 @@ ResponseEntity getOrderById(@Min(1L) @Max(10L) @Parameter(in = ParameterI @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/TestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/TestApi.java index e4e0b607e88..d67a0cfbaa3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/TestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/TestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface TestApi { @Operation(summary = "", description = "", security = { @SecurityRequirement(name = "bearer") }, tags={ }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) + @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) @RequestMapping(value = "/test", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/UserApi.java index 3426951f145..3dce1116112 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -74,7 +74,7 @@ public interface UserApi { @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -87,7 +87,7 @@ public interface UserApi { @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java index c8894e9a562..6e5b8ed54ec 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ 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.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public T deserialize(JsonParser parser, DeserializationContext context) throws I 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()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/server/petstore/springboot-delegate-j8/.swagger-codegen/VERSION b/samples/server/petstore/springboot-delegate-j8/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/springboot-delegate-j8/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AllPetsApi.java index 379582b19db..251270cf03b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -39,7 +39,7 @@ public interface AllPetsApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnimalApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnimalApi.java index 0657518cf9b..1840a13611c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnimalApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnimalApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -60,7 +60,7 @@ default ResponseEntity deleteAnimal(@Parameter(in = ParameterIn.PATH, desc @Operation(summary = "Find animal by ID", description = "Returns a single animal", tags={ "animal" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Animal.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Animal.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnotherFakeApi.java index 0316bcde3ae..489c1332631 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -39,7 +39,7 @@ public interface AnotherFakeApi { @Operation(summary = "To test special tags", description = "To test special tags", tags={ "$another-fake?" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) @RequestMapping(value = "/another-fake/dummy", produces = { "application/json" }, consumes = { "application/json" }, diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/DogApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/DogApi.java index f1c2cd095fd..b2a790bb257 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/DogApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/DogApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -60,7 +60,7 @@ default ResponseEntity deleteDog(@Parameter(in = ParameterIn.PATH, descrip @Operation(summary = "Find dog by ID", description = "Returns a single dog", tags={ "dog" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Dog.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Dog.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeApi.java index 723055a9534..0918ea4a777 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -45,7 +45,7 @@ public interface FakeApi { @Operation(summary = "", description = "Test serialization of outer boolean types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(schema = @Schema(implementation = Boolean.class))) }) + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "*/*", schema = @Schema(implementation = Boolean.class))) }) @RequestMapping(value = "/fake/outer/boolean", produces = { "*/*" }, consumes = { "*/*" }, @@ -57,7 +57,7 @@ default ResponseEntity fakeOuterBooleanSerialize(@Parameter(in = Parame @Operation(summary = "", description = "Test serialization of object with outer number type", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(schema = @Schema(implementation = OuterComposite.class))) }) + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "*/*", schema = @Schema(implementation = OuterComposite.class))) }) @RequestMapping(value = "/fake/outer/composite", produces = { "*/*" }, consumes = { "*/*" }, @@ -69,7 +69,7 @@ default ResponseEntity fakeOuterCompositeSerialize(@Parameter(in @Operation(summary = "", description = "Test serialization of outer number types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output number", content = @Content(schema = @Schema(implementation = BigDecimal.class))) }) + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "*/*", schema = @Schema(implementation = BigDecimal.class))) }) @RequestMapping(value = "/fake/outer/number", produces = { "*/*" }, consumes = { "*/*" }, @@ -81,7 +81,7 @@ default ResponseEntity fakeOuterNumberSerialize(@Parameter(in = Para @Operation(summary = "", description = "Test serialization of outer string types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output string", content = @Content(schema = @Schema(implementation = String.class))) }) + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "*/*", schema = @Schema(implementation = String.class))) }) @RequestMapping(value = "/fake/outer/string", produces = { "*/*" }, consumes = { "*/*" }, @@ -93,7 +93,7 @@ default ResponseEntity fakeOuterStringSerialize(@Parameter(in = Paramete @Operation(summary = "To test \"client\" model", description = "To test \"client\" model", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) @RequestMapping(value = "/fake", produces = { "application/json" }, consumes = { "application/json" }, diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeClassnameTestApi.java index f2502f945f8..d81a02373f5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -40,7 +40,7 @@ public interface FakeClassnameTestApi { @Operation(summary = "To test class name in snake case", description = "", security = { @SecurityRequirement(name = "api_key_query") }, tags={ "fake_classname_tags 123#$%^" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) @RequestMapping(value = "/fake_classname_test", produces = { "application/json" }, consumes = { "application/json" }, diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/PetApi.java index 69cb5d484d9..ae168280bef 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -42,7 +42,8 @@ public interface PetApi { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -55,7 +56,8 @@ default ResponseEntity addPet(@Parameter(in = ParameterIn.DEFAULT, descrip @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid pet value") }) @RequestMapping(value = "/pet/{petId}", @@ -67,7 +69,7 @@ default ResponseEntity deletePet(@Parameter(in = ParameterIn.PATH, descrip @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = { "application/json" }, consumes = { "application/json" }, @@ -79,9 +81,10 @@ default ResponseEntity doCategoryStuff(@Parameter(in = Paramet @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -95,9 +98,10 @@ default ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = Para @Operation(summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -111,7 +115,7 @@ default ResponseEntity> findPetsByTags(@NotNull @Parameter(in = Parame @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -126,7 +130,8 @@ default ResponseEntity getPetById(@Parameter(in = ParameterIn.PATH, descrip @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -143,7 +148,8 @@ default ResponseEntity updatePet(@Parameter(in = ParameterIn.DEFAULT, desc @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -156,9 +162,10 @@ default ResponseEntity updatePetWithForm(@Parameter(in = ParameterIn.PATH, @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" }, diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/RandomPetApi.java index 4e90f754130..c225c6181e2 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -39,7 +39,7 @@ public interface RandomPetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java index 9de65fac9bb..0b888788a22 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -53,7 +53,7 @@ default ResponseEntity deleteOrder(@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET) @@ -64,7 +64,7 @@ default ResponseEntity> getInventory() { @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -80,7 +80,7 @@ default ResponseEntity getOrderById(@Min(1L) @Max(5L) @Parameter(in = Par @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/UserApi.java index a1b81f2376a..81f12c683bd 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -84,7 +84,7 @@ default ResponseEntity deleteUser(@Parameter(in = ParameterIn.PATH, descri @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -99,7 +99,7 @@ default ResponseEntity getUserByName(@Parameter(in = ParameterIn.PATH, des @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", diff --git a/samples/server/petstore/springboot-delegate/.swagger-codegen/VERSION b/samples/server/petstore/springboot-delegate/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/springboot-delegate/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-delegate/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AllPetsApi.java index c070b85781b..c9307c59d11 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface AllPetsApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnimalApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnimalApi.java index ff9e90b1feb..a2707830081 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnimalApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnimalApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -54,7 +54,7 @@ public interface AnimalApi { @Operation(summary = "Find animal by ID", description = "Returns a single animal", tags={ "animal" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Animal.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Animal.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnotherFakeApi.java index 86335328fe4..817fd541c8f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface AnotherFakeApi { @Operation(summary = "To test special tags", description = "To test special tags", tags={ "$another-fake?" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) @RequestMapping(value = "/another-fake/dummy", produces = { "application/json" }, consumes = { "application/json" }, diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/DogApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/DogApi.java index 1a54b2d0a99..84605ab6e69 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/DogApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/DogApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -54,7 +54,7 @@ public interface DogApi { @Operation(summary = "Find dog by ID", description = "Returns a single dog", tags={ "dog" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Dog.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Dog.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeApi.java index 9f28225e66c..29b6f113a9f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -43,7 +43,7 @@ public interface FakeApi { @Operation(summary = "", description = "Test serialization of outer boolean types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(schema = @Schema(implementation = Boolean.class))) }) + @ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "*/*", schema = @Schema(implementation = Boolean.class))) }) @RequestMapping(value = "/fake/outer/boolean", produces = { "*/*" }, consumes = { "*/*" }, @@ -53,7 +53,7 @@ public interface FakeApi { @Operation(summary = "", description = "Test serialization of object with outer number type", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(schema = @Schema(implementation = OuterComposite.class))) }) + @ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "*/*", schema = @Schema(implementation = OuterComposite.class))) }) @RequestMapping(value = "/fake/outer/composite", produces = { "*/*" }, consumes = { "*/*" }, @@ -63,7 +63,7 @@ public interface FakeApi { @Operation(summary = "", description = "Test serialization of outer number types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output number", content = @Content(schema = @Schema(implementation = BigDecimal.class))) }) + @ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "*/*", schema = @Schema(implementation = BigDecimal.class))) }) @RequestMapping(value = "/fake/outer/number", produces = { "*/*" }, consumes = { "*/*" }, @@ -73,7 +73,7 @@ public interface FakeApi { @Operation(summary = "", description = "Test serialization of outer string types", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "Output string", content = @Content(schema = @Schema(implementation = String.class))) }) + @ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "*/*", schema = @Schema(implementation = String.class))) }) @RequestMapping(value = "/fake/outer/string", produces = { "*/*" }, consumes = { "*/*" }, @@ -83,7 +83,7 @@ public interface FakeApi { @Operation(summary = "To test \"client\" model", description = "To test \"client\" model", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) @RequestMapping(value = "/fake", produces = { "application/json" }, consumes = { "application/json" }, diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeClassnameTestApi.java index b60ac4ed898..f391b745efc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -38,7 +38,7 @@ public interface FakeClassnameTestApi { @Operation(summary = "To test class name in snake case", description = "", security = { @SecurityRequirement(name = "api_key_query") }, tags={ "fake_classname_tags 123#$%^" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Client.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))) }) @RequestMapping(value = "/fake_classname_test", produces = { "application/json" }, consumes = { "application/json" }, diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/PetApi.java index d10a62e806f..ba600f47b5c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -40,7 +40,8 @@ public interface PetApi { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -51,7 +52,8 @@ public interface PetApi { @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid pet value") }) @RequestMapping(value = "/pet/{petId}", @@ -61,7 +63,7 @@ public interface PetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = { "application/json" }, consumes = { "application/json" }, @@ -71,9 +73,10 @@ public interface PetApi { @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -85,9 +88,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -99,7 +103,7 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -112,7 +116,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -127,7 +132,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -138,9 +144,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "multipart/form-data" }, diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/RandomPetApi.java index 1df8f25cfbb..7ad84ee4a62 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface RandomPetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java index b5671c7b762..50cc46e0598 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -49,7 +49,7 @@ public interface StoreApi { @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET) @@ -58,7 +58,7 @@ public interface StoreApi { @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -72,7 +72,7 @@ ResponseEntity getOrderById(@Min(1L) @Max(5L) @Parameter(in = ParameterIn @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/UserApi.java index a3ed383a459..f0f7e7061fa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -74,7 +74,7 @@ public interface UserApi { @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -87,7 +87,7 @@ public interface UserApi { @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/xml", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java index c8894e9a562..6e5b8ed54ec 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ 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.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public T deserialize(JsonParser parser, DeserializationContext context) throws I 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()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/server/petstore/springboot-implicitHeaders/.swagger-codegen/VERSION b/samples/server/petstore/springboot-implicitHeaders/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/AllPetsApi.java index c070b85781b..c9307c59d11 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface AllPetsApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = { "application/json" }, method = RequestMethod.GET) 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 9d438b15908..f67c08f0c48 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 @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -39,7 +39,8 @@ public interface PetApi { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -50,7 +51,8 @@ public interface PetApi { @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -62,7 +64,7 @@ public interface PetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = { "application/json" }, consumes = { "application/json" }, @@ -72,9 +74,10 @@ public interface PetApi { @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -86,9 +89,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -100,7 +104,7 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -113,7 +117,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -128,7 +133,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -139,9 +145,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "application/octet-stream" }, diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/RandomPetApi.java index 1df8f25cfbb..7ad84ee4a62 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface RandomPetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java index b06ca6a51a2..1777387d78f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -50,7 +50,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET) @@ -59,7 +59,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -73,7 +73,7 @@ ResponseEntity getOrderById(@Min(1L) @Max(10L) @Parameter(in = ParameterI @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/TestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/TestApi.java index e4e0b607e88..d67a0cfbaa3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/TestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/TestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface TestApi { @Operation(summary = "", description = "", security = { @SecurityRequirement(name = "bearer") }, tags={ }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) + @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) @RequestMapping(value = "/test", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java index 3426951f145..3dce1116112 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -74,7 +74,7 @@ public interface UserApi { @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -87,7 +87,7 @@ public interface UserApi { @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", 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 index c8894e9a562..6e5b8ed54ec 100644 --- 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 @@ -5,12 +5,12 @@ 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.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public T deserialize(JsonParser parser, DeserializationContext context) throws I 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()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/server/petstore/springboot-useoptional/.swagger-codegen/VERSION b/samples/server/petstore/springboot-useoptional/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/springboot-useoptional/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-useoptional/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/AllPetsApi.java index 5185f2a79f6..ae706628af2 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -38,7 +38,7 @@ public interface AllPetsApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/PetApi.java index b1353359901..038fe0d6df8 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -40,7 +40,8 @@ public interface PetApi { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -51,7 +52,8 @@ public interface PetApi { @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -63,7 +65,7 @@ public interface PetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = { "application/json" }, consumes = { "application/json" }, @@ -73,9 +75,10 @@ public interface PetApi { @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -87,9 +90,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -101,7 +105,7 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -114,7 +118,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -129,7 +134,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -140,9 +146,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "application/octet-stream" }, diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/RandomPetApi.java index 0f0e3e7be4f..1e015c4f711 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -38,7 +38,7 @@ public interface RandomPetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/StoreApi.java index 78a86c1e0df..e46efa7c41c 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -51,7 +51,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET) @@ -60,7 +60,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -74,7 +74,7 @@ ResponseEntity getOrderById(@Min(1L) @Max(10L) @Parameter(in = ParameterI @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/TestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/TestApi.java index 5f46993959a..ddf401303ae 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/TestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/TestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -38,7 +38,7 @@ public interface TestApi { @Operation(summary = "", description = "", security = { @SecurityRequirement(name = "bearer") }, tags={ }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) + @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) @RequestMapping(value = "/test", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/UserApi.java index 45e3d182d20..a4ff525f445 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -75,7 +75,7 @@ public interface UserApi { @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -88,7 +88,7 @@ public interface UserApi { @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java index c8894e9a562..6e5b8ed54ec 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ 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.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public T deserialize(JsonParser parser, DeserializationContext context) throws I 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()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments { diff --git a/samples/server/petstore/springboot-v2-nodefault/.swagger-codegen/VERSION b/samples/server/petstore/springboot-v2-nodefault/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/springboot-v2-nodefault/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-v2-nodefault/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/AllPetsApi.java index 17925b9e1ca..a6eb054f9d5 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -52,7 +52,7 @@ public interface AllPetsApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/PetApi.java index 3137b4a97c8..c5ad40fd5a7 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -54,7 +54,8 @@ public interface PetApi { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -65,7 +66,8 @@ public interface PetApi { @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -77,7 +79,7 @@ public interface PetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = { "application/json" }, consumes = { "application/json" }, @@ -87,9 +89,10 @@ public interface PetApi { @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -101,9 +104,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -115,7 +119,7 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -128,7 +132,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -143,7 +148,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -154,9 +160,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "application/octet-stream" }, diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/RandomPetApi.java index cb01323f1b7..4a620c2e922 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -52,7 +52,7 @@ public interface RandomPetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/StoreApi.java index 2408e2b03d4..7446663b37a 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -65,7 +65,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET) @@ -74,7 +74,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -88,7 +88,7 @@ ResponseEntity getOrderById(@Min(1L) @Max(10L) @Parameter(in = ParameterI @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/TestApi.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/TestApi.java index 945b238ba0b..d4624fce024 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/TestApi.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/TestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -52,7 +52,7 @@ public interface TestApi { @Operation(summary = "", description = "", security = { @SecurityRequirement(name = "bearer") }, tags={ }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) + @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) @RequestMapping(value = "/test", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/UserApi.java index d2c976db407..7123d91e624 100644 --- a/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-v2-nodefault/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -89,7 +89,7 @@ public interface UserApi { @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -102,7 +102,7 @@ public interface UserApi { @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", diff --git a/samples/server/petstore/springboot-v2/.swagger-codegen/VERSION b/samples/server/petstore/springboot-v2/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/springboot-v2/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-v2/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/AllPetsApi.java index 5baf47b6090..ad92a1dddb9 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -58,7 +58,7 @@ default Optional getAcceptHeader() { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/PetApi.java index 20f029f6a0f..146ecd4f609 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -60,7 +60,8 @@ default Optional getAcceptHeader() { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -77,7 +78,8 @@ default ResponseEntity addPet(@Parameter(in = ParameterIn.DEFAULT, descrip @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -95,7 +97,7 @@ default ResponseEntity deletePet(@Parameter(in = ParameterIn.PATH, descrip @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = { "application/json" }, consumes = { "application/json" }, @@ -119,9 +121,10 @@ default ResponseEntity doCategoryStuff(@Parameter(in = Paramet @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -147,9 +150,10 @@ default ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = Para @Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -175,7 +179,7 @@ default ResponseEntity> findPetsByTags(@NotNull @Parameter(in = Parame @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -202,7 +206,8 @@ default ResponseEntity getPetById(@Parameter(in = ParameterIn.PATH, descrip @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -223,7 +228,8 @@ default ResponseEntity updatePet(@Parameter(in = ParameterIn.DEFAULT, desc @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -240,9 +246,10 @@ default ResponseEntity updatePetWithForm(@Parameter(in = ParameterIn.PATH, @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "application/octet-stream" }, diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/RandomPetApi.java index 4a299ba40e0..cee1687954a 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -58,7 +58,7 @@ default Optional getAcceptHeader() { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/StoreApi.java index 0fbb93e785c..688888d5296 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -77,7 +77,7 @@ default ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PAT @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET) @@ -100,7 +100,7 @@ default ResponseEntity> getInventory() { @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -128,7 +128,7 @@ default ResponseEntity getOrderById(@Min(1L) @Max(10L) @Parameter(in = Pa @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/TestApi.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/TestApi.java index 16e27fb10ba..d3a25c127db 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/TestApi.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/TestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -58,7 +58,7 @@ default Optional getAcceptHeader() { @Operation(summary = "", description = "", security = { @SecurityRequirement(name = "bearer") }, tags={ }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) + @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) @RequestMapping(value = "/test", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/UserApi.java index 793a5f898cf..cca63946157 100644 --- a/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-v2/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -119,7 +119,7 @@ default ResponseEntity deleteUser(@Parameter(in = ParameterIn.PATH, descri @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -146,7 +146,7 @@ default ResponseEntity getUserByName(@Parameter(in = ParameterIn.PATH, des @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", diff --git a/samples/server/petstore/springboot/.swagger-codegen/VERSION b/samples/server/petstore/springboot/.swagger-codegen/VERSION index 6e256321c31..93048d0c864 100644 --- a/samples/server/petstore/springboot/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.26-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/AllPetsApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/AllPetsApi.java index c070b85781b..c9307c59d11 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/AllPetsApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/AllPetsApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface AllPetsApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) }) @RequestMapping(value = "/allPets", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java index 09db4b175ae..263d606fadd 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -39,7 +39,8 @@ public interface PetApi { @Operation(summary = "Add a new pet to the store", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet", @@ -50,7 +51,8 @@ public interface PetApi { @Operation(summary = "Deletes a pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -62,7 +64,7 @@ public interface PetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/category", produces = { "application/json" }, consumes = { "application/json" }, @@ -72,9 +74,10 @@ public interface PetApi { @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid status value") }) @RequestMapping(value = "/pet/findByStatus", @@ -86,9 +89,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), @ApiResponse(responseCode = "400", description = "Invalid tag value") }) @RequestMapping(value = "/pet/findByTags", @@ -100,7 +104,7 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { @SecurityRequirement(name = "api_key") }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -113,7 +117,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Update an existing pet", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -128,7 +133,8 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "Updates a pet in the store with form data", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) @RequestMapping(value = "/pet/{petId}", @@ -139,9 +145,10 @@ ResponseEntity> findPetsByStatus(@NotNull @Parameter(in = ParameterIn. @Operation(summary = "uploads an image", description = "", security = { @SecurityRequirement(name = "petstore_auth", scopes = { - "" }) }, tags={ "pet" }) + "write:pets", +"read:pets" }) }, tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) }) @RequestMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { "application/octet-stream" }, diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/RandomPetApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/RandomPetApi.java index 1df8f25cfbb..7ad84ee4a62 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/RandomPetApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/RandomPetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface RandomPetApi { @Operation(summary = "", description = "", tags={ "pet" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) }) + @ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) }) @RequestMapping(value = "/randomPet", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java index b06ca6a51a2..1777387d78f 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -50,7 +50,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { @SecurityRequirement(name = "api_key") }, tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) @RequestMapping(value = "/store/inventory", produces = { "application/json" }, method = RequestMethod.GET) @@ -59,7 +59,7 @@ ResponseEntity deleteOrder(@Min(1L)@Parameter(in = ParameterIn.PATH, descr @Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -73,7 +73,7 @@ ResponseEntity getOrderById(@Min(1L) @Max(10L) @Parameter(in = ParameterI @Operation(summary = "Place an order for a pet", description = "", tags={ "store" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))), @ApiResponse(responseCode = "400", description = "Invalid Order") }) @RequestMapping(value = "/store/order", diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/TestApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/TestApi.java index e4e0b607e88..d67a0cfbaa3 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/TestApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/TestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -37,7 +37,7 @@ public interface TestApi { @Operation(summary = "", description = "", security = { @SecurityRequirement(name = "bearer") }, tags={ }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) + @ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) }) @RequestMapping(value = "/test", produces = { "application/json" }, method = RequestMethod.GET) diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java index 3426951f145..3dce1116112 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (3.0.25-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (3.0.26-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ @@ -74,7 +74,7 @@ public interface UserApi { @Operation(summary = "Get user by user name", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))), @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -87,7 +87,7 @@ public interface UserApi { @Operation(summary = "Logs user into the system", description = "", tags={ "user" }) @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))), @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) @RequestMapping(value = "/user/login", diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java b/samples/server/petstore/springboot/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java index c8894e9a562..6e5b8ed54ec 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/configuration/CustomInstantDeserializer.java @@ -5,12 +5,12 @@ 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.DateTimeUtils; import org.threeten.bp.Instant; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.ZoneId; @@ -205,7 +205,7 @@ public T deserialize(JsonParser parser, DeserializationContext context) throws I 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()); + return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } private static class FromIntegerArguments {