From 2df7b2b7d1e466ce9abe5019c684eb6c163fbd3a Mon Sep 17 00:00:00 2001 From: Gon GArce Date: Tue, 25 Feb 2020 15:48:29 +0100 Subject: [PATCH 1/3] Add date time format annotation on pojo for model query parameters --- .../main/resources/JavaSpring/pojo.mustache | 6 +++ .../java/spring/SpringCodegenTest.java | 27 ++++++++++ .../src/test/resources/3_0/issue_5436.yml | 51 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue_5436.yml diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 695e865a71ae..0601e70f6902 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -31,6 +31,12 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{^parent}} private {{>nullableDataType}} {{name}} = {{#isNullable}}JsonNullable.undefined(){{/isNullable}}{{^isNullable}}{{#required}}{{{defaultValue}}}{{/required}}{{^required}}null{{/required}}{{/isNullable}}; {{/isContainer}} {{^isContainer}} + {{#isDate}} + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) + {{/isDate}} + {{#isDateTime}} + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) + {{/isDateTime}} private {{>nullableDataType}} {{name}}{{#isNullable}} = JsonNullable.undefined(){{/isNullable}}{{^isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isNullable}}; {{/isContainer}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index a8f75d7cbe3c..a05a84d65869 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -544,4 +544,31 @@ public void doGenerateCookieParams() throws IOException { checkFileContains(generator, outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java", "@CookieValue"); checkFileNotContains(generator, outputPath + "/src/main/java/org/openapitools/api/BirdsApi.java", "@CookieValue"); } + + @Test + public void doAnnotateDatesOnModelParameters() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/issue_5436.yml", null, new ParseOptions()).getOpenAPI(); + + SpringCodegen codegen = new SpringCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + MockDefaultGenerator generator = new MockDefaultGenerator(); + generator.opts(input).generate(); + + checkFileContains(generator, outputPath + "/src/main/java/org/openapitools/api/ZebrasApi.java", + "AnimalParams"); + checkFileContains(generator, outputPath + "/src/main/java/org/openapitools/model/AnimalParams.java", + "@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)", + "@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME)"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_5436.yml b/modules/openapi-generator/src/test/resources/3_0/issue_5436.yml new file mode 100644 index 000000000000..cbb3f63125af --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue_5436.yml @@ -0,0 +1,51 @@ +openapi: 3.0.0 +servers: + - url: 'localhost:8080' +info: + version: 1.0.0 + title: OpenAPI Zoo + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +paths: + /zebras: + get: + operationId: getZebras + parameters: + - in: query + name: limit + schema: + type: number + - $ref: '#/components/parameters/SearchParams' +components: + parameters: + SearchParams: + name: animalParams + description: Search animal grouped parameters + in: query + style: form + explode: true + schema: + $ref: '#/components/schemas/AnimalParams' + schemas: + AnimalParams: + type: object + properties: + born: + type: string + format: date + example: '2019-12-01' + lastSeen: + type: string + format: date-time + example: '2020-02-22T10:30:00.000' + status: + type: integer + enum: [0,1] + default: 0 + name: + type: string + example: 'Marty' + age: + type: integer + example: 15 \ No newline at end of file From 80cf13be9af2f023c89505c13dae3b63b6c133ec Mon Sep 17 00:00:00 2001 From: Gon GArce Date: Wed, 26 Feb 2020 22:15:43 +0100 Subject: [PATCH 2/3] Regenetare samples --- .../src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/StoreApi.java | 1 - .../src/main/java/org/openapitools/api/UserApi.java | 1 - .../src/main/java/org/openapitools/model/Order.java | 1 + .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/StoreApi.java | 1 - .../src/main/java/org/openapitools/api/UserApi.java | 1 - .../src/main/java/org/openapitools/model/Order.java | 1 + .../spring-stubs/src/main/java/org/openapitools/api/PetApi.java | 1 - .../src/main/java/org/openapitools/api/StoreApi.java | 1 - .../src/main/java/org/openapitools/api/UserApi.java | 1 - .../src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../spring-mvc/src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/model/Order.java | 1 + .../main/java/org/openapitools/virtualan/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../src/main/java/org/openapitools/virtualan/model/Order.java | 1 + .../src/main/java/org/openapitools/model/FormatTest.java | 2 ++ .../model/MixedPropertiesAndAdditionalPropertiesClass.java | 1 + .../springboot/src/main/java/org/openapitools/model/Order.java | 1 + 45 files changed, 47 insertions(+), 9 deletions(-) diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 61c2cf567b52..7d36e7c7fdd0 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -13,7 +13,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 3e5468a77599..fc09d3036096 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -12,7 +12,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index ac96feda228e..902862635a86 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -12,7 +12,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 74afafe55585..7579caa6a3e4 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -27,6 +27,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 4e559cd715ce..035d1af83abc 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -13,7 +13,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index a0105466463a..2f51701650d0 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -12,7 +12,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 660007746828..c9414c2de210 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -12,7 +12,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 74afafe55585..7579caa6a3e4 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -27,6 +27,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 8f7e6b302e0f..23f413e18a23 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -13,7 +13,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 12948c8a358a..d554d9373215 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -12,7 +12,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 280d0cd069b5..63d849b10aba 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -12,7 +12,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index 74afafe55585..7579caa6a3e4 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -27,6 +27,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java index c2ca28b35414..a0a7ba857344 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6f7a0b5d56e3..22f4e38a3775 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java index e91680a724ef..011bb43df5ee 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java index d0b99e8bc17f..0d412f5d64da 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private LocalDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 02ef3036e6b6..26d45ea4978c 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private LocalDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java index dcc367e50e4c..ca7e599422fa 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private LocalDateTime shipDate; /** diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java index e0887e113301..e63a63e74edc 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6c0fe72d4773..f174af450d2e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java index 26b38944e11a..f74c5d48fc2a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index e0887e113301..e63a63e74edc 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6c0fe72d4773..f174af450d2e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index 26b38944e11a..f74c5d48fc2a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index c2ca28b35414..a0a7ba857344 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6f7a0b5d56e3..22f4e38a3775 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index e91680a724ef..011bb43df5ee 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index e0887e113301..e63a63e74edc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6c0fe72d4773..f174af450d2e 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 26b38944e11a..f74c5d48fc2a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index c2ca28b35414..a0a7ba857344 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6f7a0b5d56e3..22f4e38a3775 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index e91680a724ef..011bb43df5ee 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index c2ca28b35414..a0a7ba857344 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6f7a0b5d56e3..22f4e38a3775 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index e91680a724ef..011bb43df5ee 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index c2ca28b35414..a0a7ba857344 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6f7a0b5d56e3..22f4e38a3775 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index e91680a724ef..011bb43df5ee 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index fc9b0feb4d64..88c862b29b79 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java index 0bbe7b8446fe..5a2047eb98c5 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index 2df7246dbb5f..2b56ad706266 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java index c2ca28b35414..a0a7ba857344 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java @@ -47,9 +47,11 @@ public class FormatTest { private Resource binary; @JsonProperty("date") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) private LocalDate date; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("uuid") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 6f7a0b5d56e3..22f4e38a3775 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -24,6 +24,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { private UUID uuid; @JsonProperty("dateTime") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime dateTime; @JsonProperty("map") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index e91680a724ef..011bb43df5ee 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -26,6 +26,7 @@ public class Order { private Integer quantity; @JsonProperty("shipDate") + @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME) private OffsetDateTime shipDate; /** From 99039c7c8f2d5bf5ce6bce5f0f25327eca019a1b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 11 Apr 2020 23:20:56 +0800 Subject: [PATCH 3/3] update spring samples --- .../src/main/java/org/openapitools/api/PetApi.java | 1 + .../src/main/java/org/openapitools/api/StoreApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 1 + .../src/main/java/org/openapitools/api/StoreApi.java | 1 + .../spring-cloud/src/main/java/org/openapitools/api/UserApi.java | 1 + .../spring-stubs/src/main/java/org/openapitools/api/PetApi.java | 1 + .../src/main/java/org/openapitools/api/StoreApi.java | 1 + .../spring-stubs/src/main/java/org/openapitools/api/UserApi.java | 1 + 9 files changed, 9 insertions(+) diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index ba9cb587c622..41fe78316283 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -13,6 +13,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 9dcff6234360..316153095431 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -12,6 +12,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index de1a6b7f3dfb..d5bb70becd98 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -12,6 +12,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 48dad1094f87..fcfc4658e0f5 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -13,6 +13,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 773ce7740854..9320376c8b8d 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -12,6 +12,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 061ac474576c..2d8b5cd36735 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -12,6 +12,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 03736bc79284..8c281b3ab5c6 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -13,6 +13,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 83c10c78f7bb..afd3c0dcd068 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -12,6 +12,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index d666d690d673..85a5683c7b01 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -12,6 +12,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader;