From 58997169f358ec7ba15e0a77a732f615c33b886a Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 5 Dec 2021 14:48:49 -0800 Subject: [PATCH 01/11] Adds responseHeaders to codegenResponse --- .../org/openapitools/codegen/CodegenResponse.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index b81bda5f583a..4aa35479c83d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -21,6 +21,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { public final List headers = new ArrayList(); + private List responseHeaders = new ArrayList(); public String code; public boolean is1xx; public boolean is2xx; @@ -98,7 +99,7 @@ public int hashCode() { getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(), getMinLength(), exclusiveMinimum, exclusiveMaximum, getMinimum(), getMaximum(), getPattern(), is1xx, is2xx, is3xx, is4xx, is5xx, additionalPropertiesIsAnyType, hasVars, hasRequired, - hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes); + hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, responseHeaders); } @Override @@ -147,6 +148,7 @@ public boolean equals(Object o) { getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() && getHasVars() == that.getHasVars() && getHasRequired() == that.getHasRequired() && + Objects.equals(responseHeaders, that.getResponseHeaders()) && Objects.equals(composedSchemas, that.getComposedSchemas()) && Objects.equals(vars, that.vars) && Objects.equals(requiredVars, that.requiredVars) && @@ -176,6 +178,14 @@ public boolean equals(Object o) { } + public List getResponseHeaders() { + return responseHeaders; + } + + public void setResponseHeaders(List responseHeaders) { + this.responseHeaders = responseHeaders; + } + @Override public String getPattern() { return pattern; @@ -488,6 +498,7 @@ public String toString() { sb.append(", getHasDiscriminatorWithNonEmptyMapping=").append(hasDiscriminatorWithNonEmptyMapping); sb.append(", composedSchemas=").append(composedSchemas); sb.append(", hasMultipleTypes=").append(hasMultipleTypes); + sb.append(", responseHeaders=").append(responseHeaders); sb.append('}'); return sb.toString(); } From eee3fcb2cc0a30b42cad24d33545282932fb7bdd Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 5 Dec 2021 15:06:01 -0800 Subject: [PATCH 02/11] Sets response headers in codegenResponse --- .../openapitools/codegen/DefaultCodegen.java | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e97a6caf557e..473585abe175 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3959,6 +3959,18 @@ public CodegenOperation fromOperation(String path, ApiResponse response = operationGetResponsesEntry.getValue(); addProducesInfo(response, op); CodegenResponse r = fromResponse(key, response); + Map headers = response.getHeaders(); + if (headers != null) { + List responseHeaders = new ArrayList<>(); + for (Entry entry: headers.entrySet()) { + String headerName = entry.getKey(); + Header header = entry.getValue(); + CodegenParameter responseHeader = heeaderToCodegenParameter(header, headerName, imports); + responseHeaders.add(responseHeader); + } + r.setResponseHeaders(responseHeaders); + } + if (r.baseType != null && !defaultIncludes.contains(r.baseType) && !languageSpecificPrimitives.contains(r.baseType)) { @@ -6590,6 +6602,27 @@ protected String toMediaTypeSchemaName(String contentType) { return toModelName(contentType + "Schema"); } + private CodegenParameter heeaderToCodegenParameter(Header header, String headerName, Set imports) { + if (header == null) { + return null; + } + Parameter headerParam = new Parameter(); + headerParam.setName(headerName); + headerParam.setIn("header"); + headerParam.setDescription(header.getDescription()); + headerParam.setRequired(header.getRequired()); + headerParam.setDeprecated(header.getDeprecated()); + headerParam.setStyle(Parameter.StyleEnum.valueOf(header.getStyle().name())); + headerParam.setExplode(header.getExplode()); + headerParam.setSchema(header.getSchema()); + headerParam.setExamples(header.getExamples()); + headerParam.setExample(header.getExample()); + headerParam.setContent(header.getContent()); + headerParam.setExtensions(header.getExtensions()); + CodegenParameter param = fromParameter(headerParam, imports); + return param; + } + protected LinkedHashMap getContent(Content content, Set imports) { if (content == null) { return null; @@ -6609,20 +6642,7 @@ protected LinkedHashMap getContent(Content content, Se for (Entry headerEntry: encHeaders.entrySet()) { String headerName = headerEntry.getKey(); Header header = ModelUtils.getReferencedHeader(this.openAPI, headerEntry.getValue()); - Parameter headerParam = new Parameter(); - headerParam.setName(headerName); - headerParam.setIn("header"); - headerParam.setDescription(header.getDescription()); - headerParam.setRequired(header.getRequired()); - headerParam.setDeprecated(header.getDeprecated()); - headerParam.setStyle(Parameter.StyleEnum.valueOf(header.getStyle().name())); - headerParam.setExplode(header.getExplode()); - headerParam.setSchema(header.getSchema()); - headerParam.setExamples(header.getExamples()); - headerParam.setExample(header.getExample()); - headerParam.setContent(header.getContent()); - headerParam.setExtensions(header.getExtensions()); - CodegenParameter param = fromParameter(headerParam, imports); + CodegenParameter param = heeaderToCodegenParameter(header, headerName, imports); headers.add(param); } } From 1b240830f44e97a8ffa24ecfd075b8d25356cb4f Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 5 Dec 2021 15:36:56 -0800 Subject: [PATCH 03/11] Samples updated --- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 5 ++++- .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../main/java/org/openapitools/client/api/UserApiImpl.java | 1 + .../java/org/openapitools/client/api/rxjava/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../main/java/org/openapitools/client/api/UserApiImpl.java | 1 + .../java/org/openapitools/client/api/rxjava/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/main/scala/org/openapitools/client/api/UserApi.scala | 1 + .../main/scala/org/openapitools/example/api/UserApi.scala | 1 + .../src/main/scala/org/openapitools/client/api/UserApi.scala | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../app/com/puppies/store/apis/UserApiController.java | 1 + .../app/com/puppies/store/apis/UserApiControllerImp.java | 1 + .../puppies/store/apis/UserApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiControllerImpInterface.java | 1 + .../app/controllers/UserApiController.java | 1 + .../app/controllers/UserApiControllerImp.java | 1 + .../app/controllers/UserApiControllerImpInterface.java | 1 + .../java/org/openapitools/vertxweb/server/api/UserApi.java | 1 + .../org/openapitools/vertxweb/server/api/UserApiHandler.java | 1 + .../org/openapitools/vertxweb/server/api/UserApiImpl.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../default/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../eap-java8/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../eap-joda/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../eap/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../java8/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../joda/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../jersey1/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../jersey2/src/gen/java/org/openapitools/api/UserApi.java | 1 + .../src/gen/java/org/openapitools/api/UserApiService.java | 1 + .../java/org/openapitools/api/impl/UserApiServiceImpl.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../main/java/org/openapitools/api/UserApiController.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApiDelegate.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApiDelegate.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApiDelegate.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../main/java/org/openapitools/api/UserApiController.java | 1 + .../src/main/java/org/openapitools/api/UserApiDelegate.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApiDelegate.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../main/java/org/openapitools/api/UserApiController.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + .../main/java/org/openapitools/virtualan/api/UserApi.java | 1 + .../src/main/java/org/openapitools/api/UserApi.java | 1 + 140 files changed, 143 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 473585abe175..71d24de0080d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -6612,7 +6612,10 @@ private CodegenParameter heeaderToCodegenParameter(Header header, String headerN headerParam.setDescription(header.getDescription()); headerParam.setRequired(header.getRequired()); headerParam.setDeprecated(header.getDeprecated()); - headerParam.setStyle(Parameter.StyleEnum.valueOf(header.getStyle().name())); + Header.StyleEnum style = header.getStyle(); + if (style != null) { + headerParam.setStyle(Parameter.StyleEnum.valueOf(style.name())); + } headerParam.setExplode(header.getExplode()); headerParam.setSchema(header.getSchema()); headerParam.setExamples(header.getExamples()); diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java index e29a340990c3..6e608808a733 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java @@ -18,6 +18,7 @@ import org.openapitools.query.QueryParam; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; +import java.time.LocalDateTime; import org.openapitools.model.User; import javax.annotation.Generated; import java.util.ArrayList; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java index f2bc445ff228..948722b28de0 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java @@ -20,6 +20,7 @@ import org.openapitools.client.model.*; import org.openapitools.client.Pair; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java index d97f8235c4d4..b71073a1acc9 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java @@ -4,6 +4,7 @@ import org.openapitools.client.EncodingUtils; import org.openapitools.client.model.ApiResponse; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java index c6a74a80c00e..55adb67061eb 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java @@ -4,6 +4,7 @@ import org.openapitools.client.EncodingUtils; import org.openapitools.client.model.ApiResponse; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/UserApi.java index eaf587737db9..b3ef67b61ca6 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/UserApi.java @@ -2,6 +2,7 @@ import org.openapitools.client.ApiClient; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import com.fasterxml.jackson.core.type.TypeReference; diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/UserApi.java index 1c6ce952c316..c0862cb96675 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/UserApi.java @@ -20,6 +20,7 @@ import org.openapitools.client.model.*; import org.openapitools.client.Pair; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/UserApi.java index c016f258f898..a2b14e76422a 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/UserApi.java @@ -8,6 +8,7 @@ import javax.ws.rs.core.GenericType; +import java.time.LocalDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java index c016f258f898..2a59daac578e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java @@ -8,6 +8,7 @@ import javax.ws.rs.core.GenericType; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java index b9fd9ed12a0f..400bcc6a8ef8 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java @@ -12,6 +12,7 @@ package org.openapitools.client.api; +import java.util.Date; import org.openapitools.client.model.User; import java.io.InputStream; diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java index 87d2be2c3f4f..209d289e08e4 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java @@ -17,6 +17,7 @@ import org.openapitools.client.ApiResponse; import org.openapitools.client.Pair; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import com.fasterxml.jackson.core.type.TypeReference; diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java index d4f06af3fd58..2ce486c6491f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java @@ -17,6 +17,7 @@ import org.openapitools.client.ApiResponse; import org.openapitools.client.Pair; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import com.fasterxml.jackson.core.type.TypeReference; diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java index b6ab5b1bd532..706ac5239f7a 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/UserApi.java @@ -30,6 +30,7 @@ import java.io.IOException; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.lang.reflect.Type; diff --git a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java index 0f4f2d294a48..15d816983b11 100644 --- a/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-nextgen/src/main/java/org/openapitools/client/api/UserApi.java @@ -27,6 +27,7 @@ import java.io.IOException; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.lang.reflect.Type; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java index 7e6577a7b11d..f47c499de125 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java @@ -27,6 +27,7 @@ import java.io.IOException; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.lang.reflect.Type; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java index 7e6577a7b11d..f47c499de125 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java @@ -27,6 +27,7 @@ import java.io.IOException; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.lang.reflect.Type; diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java index 4caf52a8d5f8..cfabc572135d 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java @@ -13,6 +13,7 @@ package org.openapitools.client.api; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java index 4b2ee75cb922..c50c5ecb2a24 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java @@ -14,6 +14,7 @@ package org.openapitools.client.api; import com.google.gson.reflect.TypeToken; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java index 96c7210bf240..6c9ab56a94c2 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java @@ -7,6 +7,7 @@ import javax.ws.rs.core.GenericType; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java index 3561cd6e6db5..217e995d4a94 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java @@ -2,6 +2,7 @@ import org.openapitools.client.ApiClient; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.Collections; diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java index 3561cd6e6db5..217e995d4a94 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java @@ -2,6 +2,7 @@ import org.openapitools.client.ApiClient; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.Collections; diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java index 3208b159ade7..c568e477b92d 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/UserApi.java @@ -11,6 +11,7 @@ import okhttp3.ResponseBody; import okhttp3.MultipartBody; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/UserApi.java index be6071fd7d0e..55b998e696c7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/UserApi.java @@ -9,6 +9,7 @@ import okhttp3.ResponseBody; import okhttp3.MultipartBody; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/UserApi.java index 134d9ea66f5d..f0f9bfc01f5f 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/UserApi.java @@ -10,6 +10,7 @@ import okhttp3.ResponseBody; import okhttp3.MultipartBody; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/UserApi.java index 7be5be28df39..00839a720e47 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/UserApi.java @@ -10,6 +10,7 @@ import okhttp3.ResponseBody; import okhttp3.MultipartBody; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java index e5c33d583abf..5d55c6aa266d 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java @@ -1,6 +1,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/UserApiImpl.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/UserApiImpl.java index 7c2885ba3bc1..3e39564dd286 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/UserApiImpl.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/UserApiImpl.java @@ -1,5 +1,6 @@ package org.openapitools.client.api; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import io.vertx.core.AsyncResult; diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/UserApi.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/UserApi.java index 51280eef3804..466c016abc08 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/UserApi.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.client.api.rxjava; +import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.User; import org.openapitools.client.ApiClient; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApi.java index e5c33d583abf..b7922264c5c4 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApi.java @@ -1,6 +1,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java index 7c2885ba3bc1..592748032b6f 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/UserApiImpl.java @@ -1,5 +1,6 @@ package org.openapitools.client.api; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import io.vertx.core.AsyncResult; diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/UserApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/UserApi.java index 51280eef3804..6ed5725ec837 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/UserApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.client.api.rxjava; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.openapitools.client.ApiClient; diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/UserApi.java index 6920c4cd2009..70fd7a644cdf 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/UserApi.java @@ -2,6 +2,7 @@ import org.openapitools.client.ApiClient; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import java.util.HashMap; diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala index 880c084c64c1..112105938ad3 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala @@ -11,6 +11,7 @@ */ package org.openapitools.client.api +import java.time.OffsetDateTime import org.openapitools.client.model.User import org.openapitools.client.core._ import org.openapitools.client.core.CollectionFormats._ diff --git a/samples/client/petstore/scala-httpclient-deprecated/src/main/scala/org/openapitools/example/api/UserApi.scala b/samples/client/petstore/scala-httpclient-deprecated/src/main/scala/org/openapitools/example/api/UserApi.scala index d39a90e57415..e194afed5a36 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/src/main/scala/org/openapitools/example/api/UserApi.scala +++ b/samples/client/petstore/scala-httpclient-deprecated/src/main/scala/org/openapitools/example/api/UserApi.scala @@ -14,6 +14,7 @@ package org.openapitools.example.api import java.text.SimpleDateFormat +import java.util.Date import org.openapitools.client.model.User import org.openapitools.example.invoker.{ApiInvoker, ApiException} diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala index 68e147b3d0fa..5cc17ea09c19 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala @@ -11,6 +11,7 @@ */ package org.openapitools.client.api +import java.time.OffsetDateTime import org.openapitools.client.model.User import org.openapitools.client.core.JsonSupport._ import sttp.client._ 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 0f9c95ed0401..f02a6902a51c 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 @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 483b0873d51e..ec264eb0d0b7 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; 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 4fabd81f3b34..5fa9e20f90dd 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 @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; 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 27ab4c67aab3..006c4fd5ef43 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 @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java index ab1c5d462d73..769693bc7e48 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java @@ -8,6 +8,7 @@ import javax.ws.rs.core.GenericType; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import java.util.ArrayList; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApi.java index 836abbd19f76..a54f5e2a3ee4 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApiService.java index 14f88b4c31f7..905aab2c1b61 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/UserApiService.java @@ -6,6 +6,7 @@ import org.wso2.msf4j.formparam.FormDataParam; import org.wso2.msf4j.formparam.FileInfo; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 9110ccdf44d0..092f5f3a5819 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -3,6 +3,7 @@ import org.openapitools.api.*; import org.openapitools.model.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiController.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiController.java index 40e025ed4450..e6e8c6097d4d 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiController.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiController.java @@ -1,6 +1,7 @@ package com.puppies.store.apis; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImp.java index a5c27c44caf9..3ff0eb26e4cd 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImp.java @@ -1,6 +1,7 @@ package com.puppies.store.apis; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java index 0837531ed7aa..adae1c272395 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-api-package-override/app/com/puppies/store/apis/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package com.puppies.store.apis; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java index 3a89de0cd115..2d6685b18a42 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java index 417765d035b5..b4c38db7da4d 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java index 39a8a9f8960a..2a1a3322b197 100644 --- a/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-async/app/controllers/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-play-framework-controller-only/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-controller-only/app/controllers/UserApiController.java index 1a1e62be27c5..d3c05dfa2033 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiController.java index 7c2ee85e2e15..6169c1620105 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImp.java index f866d4e9853c..341f50171817 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java index bd254922d03a..39d422cc1ea4 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiController.java index 879700e98c70..e0572c7f33cb 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImp.java index 3be679120b6a..02a82befbec7 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImpInterface.java index 8aea513ad764..722d76055f70 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/controllers/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiController.java index 29a5aaf90817..f4218359b688 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImp.java index 1fc6f076ca65..75b2af297974 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java index 9f00bfc1fc16..4a83cce61987 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/controllers/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java index f9a5ff9af682..e8c0a2f4123e 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiControllerImp.java index 551cff753e3c..5d2342bdf201 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiController.java index 7c2ee85e2e15..6169c1620105 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImp.java index f866d4e9853c..341f50171817 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java index bd254922d03a..39d422cc1ea4 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-nullable/app/controllers/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiController.java index 7c2ee85e2e15..6169c1620105 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImp.java index f866d4e9853c..341f50171817 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java index bd254922d03a..39d422cc1ea4 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/controllers/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiController.java index 916e3d26033e..582c691a51b1 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImp.java index f866d4e9853c..341f50171817 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java index bd254922d03a..39d422cc1ea4 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/controllers/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java index 7c2ee85e2e15..6169c1620105 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiController.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.typesafe.config.Config; diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java index f866d4e9853c..341f50171817 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import play.mvc.Http; diff --git a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java index bd254922d03a..39d422cc1ea4 100644 --- a/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework/app/controllers/UserApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import java.util.List; +import java.time.OffsetDateTime; import apimodels.User; import com.google.inject.Inject; diff --git a/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApi.java b/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApi.java index 51a910d032f1..a68768f7179e 100644 --- a/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApi.java +++ b/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.vertxweb.server.api; +import java.time.OffsetDateTime; import org.openapitools.vertxweb.server.model.User; import org.openapitools.vertxweb.server.ApiResponse; diff --git a/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApiHandler.java b/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApiHandler.java index 85beafc942d8..f32f94a006f9 100644 --- a/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApiHandler.java +++ b/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApiHandler.java @@ -1,5 +1,6 @@ package org.openapitools.vertxweb.server.api; +import java.time.OffsetDateTime; import org.openapitools.vertxweb.server.model.User; import com.fasterxml.jackson.core.type.TypeReference; diff --git a/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java b/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java index 13b9457de8e8..b2097db1dec0 100644 --- a/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java +++ b/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java @@ -1,5 +1,6 @@ package org.openapitools.vertxweb.server.api; +import java.time.OffsetDateTime; import org.openapitools.vertxweb.server.model.User; import org.openapitools.vertxweb.server.ApiResponse; diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java index a621c7a62291..f615b43fc0d9 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java index 280ad5696667..6a0c280728d0 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java index 40ad9d927032..1d2df9950e4d 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java index 05b3b1e61cce..ac1d5d79c93a 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import io.swagger.jaxrs.*; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import java.util.Map; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java index 15e4486bc6c5..0398450b90e1 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApiService.java @@ -6,6 +6,7 @@ import org.glassfish.jersey.media.multipart.FormDataBodyPart; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import java.util.List; diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 1e5df1742f13..2777fd418e30 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -4,6 +4,7 @@ import org.openapitools.model.*; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import java.util.List; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java index 6d96f196c9e5..a21940cf1307 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java index 1464a5adacbc..a97a94b96304 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java @@ -5,6 +5,7 @@ import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 2d7b2e001a41..f52f29ff610d 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -3,6 +3,7 @@ import org.openapitools.api.*; import org.openapitools.model.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java index d9780d5234b6..a86e19f4e7b9 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java index 35d72d421127..9c8711a4c33a 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApiService.java @@ -4,6 +4,7 @@ import org.openapitools.model.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 40d14d0be55b..3922ee89e621 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -4,6 +4,7 @@ import org.openapitools.model.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java index 22506d0ee4da..18245bceec16 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ import io.swagger.jaxrs.*; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import java.util.List; diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index a63f0db78fe7..5b04e2fe7c5b 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -5,6 +5,7 @@ import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import java.util.List; diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java index 22506d0ee4da..4ff199c24041 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import org.joda.time.DateTime; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index a63f0db78fe7..6f7c52daa96a 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -4,6 +4,7 @@ import org.openapitools.model.*; +import org.joda.time.DateTime; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java index 22506d0ee4da..9085d6360ea1 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index a63f0db78fe7..1df5c3e26f10 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -4,6 +4,7 @@ import org.openapitools.model.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java index d9780d5234b6..6c9a757e1982 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java @@ -7,6 +7,7 @@ import io.swagger.jaxrs.*; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import java.util.Map; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java index 35d72d421127..a5042f3ed871 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApiService.java @@ -5,6 +5,7 @@ import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import java.util.List; diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 40d14d0be55b..c71a0ed4e5ef 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -5,6 +5,7 @@ import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import java.util.List; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java index d9780d5234b6..571e51a33456 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import org.joda.time.DateTime; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java index 35d72d421127..8560f101ffb8 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApiService.java @@ -4,6 +4,7 @@ import org.openapitools.model.*; +import org.joda.time.DateTime; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 40d14d0be55b..6c64a9bc5d3c 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -4,6 +4,7 @@ import org.openapitools.model.*; +import org.joda.time.DateTime; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java index a1fb4ed1b0f5..f07a6ceb7d02 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java index a72c9431305b..2657167dce12 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java @@ -1,5 +1,6 @@ package org.openapitools.api; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApi.java index 9d44284fa0fc..2808b3bc0906 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApiService.java index 79b52a8a5ec9..da302c73c1e2 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/UserApiService.java @@ -5,6 +5,7 @@ import com.sun.jersey.multipart.FormDataParam; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 5df04a4d533b..be039a8631c6 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -5,6 +5,7 @@ import com.sun.jersey.multipart.FormDataParam; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApi.java index aa5b7ec2d6ff..d3ac6451018c 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApiService.java index 79b52a8a5ec9..da302c73c1e2 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/UserApiService.java @@ -5,6 +5,7 @@ import com.sun.jersey.multipart.FormDataParam; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 5df04a4d533b..be039a8631c6 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -5,6 +5,7 @@ import com.sun.jersey.multipart.FormDataParam; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java index 2d90f2523525..ba9ff14767b3 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApiService.java index 15e4486bc6c5..493a47591e58 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApiService.java @@ -5,6 +5,7 @@ import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 1e5df1742f13..f4bd2bfef429 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -3,6 +3,7 @@ import org.openapitools.api.*; import org.openapitools.model.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java index 05b3b1e61cce..083280808341 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApiService.java index 15e4486bc6c5..493a47591e58 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApiService.java @@ -5,6 +5,7 @@ import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 1e5df1742f13..f4bd2bfef429 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -3,6 +3,7 @@ import org.openapitools.api.*; import org.openapitools.model.*; +import java.util.Date; import java.util.List; import org.openapitools.model.User; diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java index 941fffd38328..ce495a26f875 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java index 27f6a346d300..0a1551959741 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.LocalDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 27f6a346d300..fabb81f5f1a8 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 27f6a346d300..fabb81f5f1a8 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java index 27f6a346d300..fabb81f5f1a8 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index f96ae9134403..517f2743d2aa 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java index a749387b89f1..a5441a06b657 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.util.List; +import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 27f6a346d300..fabb81f5f1a8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index c6a6fa866994..7fce7995a83d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index 78da7c8510bc..b63fa7a1c28a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index c6a6fa866994..7fce7995a83d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java index 78da7c8510bc..b63fa7a1c28a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index cb97dfa0de6f..2e0fbbbffc94 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 505c317d5f45..9487e29ee1a1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java index 7241a736ea1b..563d11fa041e 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index f96ae9134403..517f2743d2aa 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java index da136ce2f801..927da273215f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.util.List; +import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java index 81c3ecc25887..00d156773a2e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.util.List; +import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index c6a6fa866994..7fce7995a83d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java index 78da7c8510bc..b63fa7a1c28a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index f96ae9134403..517f2743d2aa 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java index a749387b89f1..a5441a06b657 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.util.List; +import org.threeten.bp.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 27f6a346d300..fabb81f5f1a8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 27f6a346d300..fabb81f5f1a8 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index f97eeb8e4071..a3766015580e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.virtualan.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.virtualan.model.User; import io.swagger.annotations.*; import io.virtualan.annotation.ApiVirtual; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 27f6a346d300..fabb81f5f1a8 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.util.List; +import java.time.OffsetDateTime; import org.openapitools.model.User; import io.swagger.annotations.*; import org.springframework.http.HttpStatus; From 6db7288589320049997d31917d84b42fc77a464b Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 6 Dec 2021 20:30:07 -0800 Subject: [PATCH 04/11] Adds test of response headers --- .../java/org/openapitools/codegen/DefaultCodegenTest.java | 7 +++++++ .../src/test/resources/3_0/content-data.yaml | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 949bc1a9243b..8cef5cb70853 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -3956,6 +3956,13 @@ public void testParameterContent() { cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); + + CodegenResponse cr = co.responses.get(0); + List responseHeaders = cr.getResponseHeaders(); + assertEquals(1, responseHeaders.size()); + CodegenParameter header = responseHeaders.get(0); + assertEquals("X-Rate-Limit-Limit", header.baseName); + assertTrue(header.isUnboundedInteger); } @Test diff --git a/modules/openapi-generator/src/test/resources/3_0/content-data.yaml b/modules/openapi-generator/src/test/resources/3_0/content-data.yaml index 56228cd30543..be6a489272f0 100644 --- a/modules/openapi-generator/src/test/resources/3_0/content-data.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/content-data.yaml @@ -29,6 +29,11 @@ paths: responses: '201': description: 'OK' + headers: + X-Rate-Limit-Limit: + description: "The number of allowed requests in the current period" + schema: + type: integer /inlineRequestBodySchemasDifferingByContentType: post: requestBody: From 6329a8b9bb2391fb0bd9b29ca3625917619e4c3c Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 8 Dec 2021 13:44:45 -0800 Subject: [PATCH 05/11] Adds content to CodegenResponse --- .../org/openapitools/codegen/CodegenResponse.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index 4aa35479c83d..7a23b3ab7267 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -88,6 +88,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { private boolean hasDiscriminatorWithNonEmptyMapping; private CodegenComposedSchemas composedSchemas; private boolean hasMultipleTypes = false; + private LinkedHashMap content; @Override public int hashCode() { @@ -99,7 +100,7 @@ public int hashCode() { getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(), getMinLength(), exclusiveMinimum, exclusiveMaximum, getMinimum(), getMaximum(), getPattern(), is1xx, is2xx, is3xx, is4xx, is5xx, additionalPropertiesIsAnyType, hasVars, hasRequired, - hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, responseHeaders); + hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, responseHeaders, content); } @Override @@ -148,6 +149,7 @@ public boolean equals(Object o) { getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() && getHasVars() == that.getHasVars() && getHasRequired() == that.getHasRequired() && + Objects.equals(content, that.getContent()) && Objects.equals(responseHeaders, that.getResponseHeaders()) && Objects.equals(composedSchemas, that.getComposedSchemas()) && Objects.equals(vars, that.vars) && @@ -178,6 +180,14 @@ public boolean equals(Object o) { } + public LinkedHashMap getContent() { + return content; + } + + public void setContent(LinkedHashMap content) { + this.content = content; + } + public List getResponseHeaders() { return responseHeaders; } @@ -499,6 +509,7 @@ public String toString() { sb.append(", composedSchemas=").append(composedSchemas); sb.append(", hasMultipleTypes=").append(hasMultipleTypes); sb.append(", responseHeaders=").append(responseHeaders); + sb.append(", content=").append(content); sb.append('}'); return sb.toString(); } From 8a7b24dff1279fcc6185922e364ef8b59c90abe3 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 8 Dec 2021 13:47:39 -0800 Subject: [PATCH 06/11] Sets codegenResponse content --- .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 71d24de0080d..82fb182769c8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3970,6 +3970,7 @@ public CodegenOperation fromOperation(String path, } r.setResponseHeaders(responseHeaders); } + r.setContent(getContent(response.getContent(), imports)); if (r.baseType != null && !defaultIncludes.contains(r.baseType) && From 6823aa13a08114e0fc2bcbec67419340044f0452 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 10 Dec 2021 10:07:34 -0800 Subject: [PATCH 07/11] Tests added, test content-data.yaml spec update --- .../codegen/DefaultCodegenTest.java | 187 +++++++++++------- .../src/test/resources/3_0/content-data.yaml | 29 ++- 2 files changed, 148 insertions(+), 68 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 8cef5cb70853..9b5fbb9c48a0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -1673,12 +1673,12 @@ public void testLeadingSlashIsAddedIfMissing() { public void testDefaultResponseShouldBeLast() { OpenAPI openAPI = TestUtils.createOpenAPI(); Operation myOperation = new Operation().operationId("myOperation").responses( - new ApiResponses() - .addApiResponse( - "default", new ApiResponse().description("Default")) - .addApiResponse( - "422", new ApiResponse().description("Error")) - ); + new ApiResponses() + .addApiResponse( + "default", new ApiResponse().description("Default")) + .addApiResponse( + "422", new ApiResponse().description("Error")) + ); openAPI.path("/here", new PathItem().get(myOperation)); final DefaultCodegen codegen = new DefaultCodegen(); codegen.setOpenAPI(openAPI); @@ -2353,49 +2353,49 @@ public void testUseOneOfInterfaces() { @Test public void testFormComposedSchema() { OpenAPI openAPI = TestUtils.parseContent("openapi: 3.0.1\n" + - "info:\n" + - " version: '1.0.0'\n" + - " title: the title\n" + - "\n" + - "paths:\n" + - " '/users/me':\n" + - " post:\n" + - " description: Change user password.\n" + - " operationId: changeCurrentUserPassword\n" + - " requestBody:\n" + - " required: true\n" + - " content:\n" + - " multipart/form-data:\n" + - " schema:\n" + - " $ref: '#/components/schemas/ChangePasswordRequest'\n" + - " responses:\n" + - " '200':\n" + - " description: Successful operation\n" + - " content: {}\n" + - "\n" + - "components:\n" + - " schemas:\n" + - " CommonPasswordRequest:\n" + - " type: object\n" + - " required: [ password, passwordConfirmation ]\n" + - " properties:\n" + - " password:\n" + - " type: string\n" + - " format: password\n" + - " passwordConfirmation:\n" + - " type: string\n" + - " format: password\n" + - "\n" + - " ChangePasswordRequest:\n" + - " type: object\n" + - " allOf:\n" + - " - $ref: '#/components/schemas/CommonPasswordRequest'\n" + - " - type: object\n" + - " required: [ oldPassword ]\n" + - " properties:\n" + - " oldPassword:\n" + - " type: string\n" + - " format: password\n"); + "info:\n" + + " version: '1.0.0'\n" + + " title: the title\n" + + "\n" + + "paths:\n" + + " '/users/me':\n" + + " post:\n" + + " description: Change user password.\n" + + " operationId: changeCurrentUserPassword\n" + + " requestBody:\n" + + " required: true\n" + + " content:\n" + + " multipart/form-data:\n" + + " schema:\n" + + " $ref: '#/components/schemas/ChangePasswordRequest'\n" + + " responses:\n" + + " '200':\n" + + " description: Successful operation\n" + + " content: {}\n" + + "\n" + + "components:\n" + + " schemas:\n" + + " CommonPasswordRequest:\n" + + " type: object\n" + + " required: [ password, passwordConfirmation ]\n" + + " properties:\n" + + " password:\n" + + " type: string\n" + + " format: password\n" + + " passwordConfirmation:\n" + + " type: string\n" + + " format: password\n" + + "\n" + + " ChangePasswordRequest:\n" + + " type: object\n" + + " allOf:\n" + + " - $ref: '#/components/schemas/CommonPasswordRequest'\n" + + " - type: object\n" + + " required: [ oldPassword ]\n" + + " properties:\n" + + " oldPassword:\n" + + " type: string\n" + + " format: password\n"); final DefaultCodegen cg = new DefaultCodegen(); cg.setOpenAPI(openAPI); @@ -2404,16 +2404,16 @@ public void testFormComposedSchema() { final PathItem path = openAPI.getPaths().get("/users/me"); final CodegenOperation operation = cg.fromOperation( - "/users/me", - "post", - path.getPost(), - path.getServers()); + "/users/me", + "post", + path.getPost(), + path.getServers()); assertEquals(operation.formParams.size(), 3, - "The list of parameters should include inherited type"); + "The list of parameters should include inherited type"); final List names = operation.formParams.stream() - .map(param -> param.paramName) - .collect(Collectors.toList()); + .map(param -> param.paramName) + .collect(Collectors.toList()); assertTrue(names.contains("password")); assertTrue(names.contains("passwordConfirmation")); assertTrue(names.contains("oldPassword")); @@ -3347,7 +3347,7 @@ public void testHasRequiredInProperties() { assertTrue(hasRequired); } else { // All variables must be in the above sets - fail(); + fail(); } } } @@ -3930,7 +3930,8 @@ public void testResponses() { assertFalse(cr.primitiveType); } - public void testParameterContent() { + @Test + public void testRequestParameterContent() { DefaultCodegen codegen = new DefaultCodegen(); final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/content-data.yaml"); codegen.setOpenAPI(openAPI); @@ -3948,6 +3949,7 @@ public void testParameterContent() { CodegenProperty cp = mt.getSchema(); assertTrue(cp.isMap); assertEquals(cp.complexType, "object"); + assertEquals(cp.baseName, "ApplicationJsonSchema"); CodegenParameter coordinatesReferencedSchema = co.queryParams.get(1); content = coordinatesReferencedSchema.getContent(); @@ -3956,13 +3958,7 @@ public void testParameterContent() { cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - - CodegenResponse cr = co.responses.get(0); - List responseHeaders = cr.getResponseHeaders(); - assertEquals(1, responseHeaders.size()); - CodegenParameter header = responseHeaders.get(0); - assertEquals("X-Rate-Limit-Limit", header.baseName); - assertTrue(header.isUnboundedInteger); + assertEquals(cp.baseName, "ApplicationJsonSchema"); } @Test @@ -4011,4 +4007,63 @@ public void testRequestBodyContent() { assertEquals(cp.baseName, "TextPlainSchema"); assertTrue(cp.isString); } -} + + @Test + public void testResponseContentAndHeader() { + DefaultCodegen codegen = new DefaultCodegen(); + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/content-data.yaml"); + codegen.setOpenAPI(openAPI); + String path; + CodegenOperation co; + + path = "/jsonQueryParams"; + co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null); + CodegenParameter coordinatesInlineSchema = co.queryParams.get(0); + LinkedHashMap content = coordinatesInlineSchema.getContent(); + assertNotNull(content); + assertEquals(content.keySet(), new HashSet<>(Arrays.asList("application/json"))); + + CodegenParameter schemaParam = co.queryParams.get(2); + assertEquals(schemaParam.getSchema().baseName, "stringWithMinLength"); + + + CodegenResponse cr = co.responses.get(0); + List responseHeaders = cr.getResponseHeaders(); + assertEquals(1, responseHeaders.size()); + CodegenParameter header = responseHeaders.get(0); + assertEquals("X-Rate-Limit", header.baseName); + assertTrue(header.isUnboundedInteger); + assertEquals(header.getSchema().baseName, "X-Rate-Limit"); + + content = cr.getContent(); + assertEquals(content.keySet(), new HashSet<>(Arrays.asList("application/json", "text/plain"))); + CodegenMediaType mt = content.get("application/json"); + assertNull(mt.getEncoding()); + CodegenProperty cp = mt.getSchema(); + assertFalse(cp.isMap); // because it is a referenced schema + assertEquals(cp.complexType, "coordinates"); + assertEquals(cp.baseName, "ApplicationJsonSchema"); + + mt = content.get("text/plain"); + assertNull(mt.getEncoding()); + cp = mt.getSchema(); + assertEquals(cp.baseName, "TextPlainSchema"); + assertTrue(cp.isString); + + cr = co.responses.get(1); + content = cr.getContent(); + assertEquals(content.keySet(), new HashSet<>(Arrays.asList("application/json", "text/plain"))); + mt = content.get("application/json"); + assertNull(mt.getEncoding()); + cp = mt.getSchema(); + assertFalse(cp.isMap); // because it is a referenced schema + assertEquals(cp.complexType, "coordinates"); + assertEquals(cp.baseName, "ApplicationJsonSchema"); + + mt = content.get("text/plain"); + assertNull(mt.getEncoding()); + cp = mt.getSchema(); + assertEquals(cp.baseName, "TextPlainSchema"); + assertTrue(cp.isString); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/content-data.yaml b/modules/openapi-generator/src/test/resources/3_0/content-data.yaml index be6a489272f0..6296747be8a2 100644 --- a/modules/openapi-generator/src/test/resources/3_0/content-data.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/content-data.yaml @@ -26,14 +26,39 @@ paths: application/json: schema: $ref: '#/components/schemas/coordinates' + - name: stringWithMinLength + in: query + schema: + $ref: '#/components/schemas/stringWithMinLength' responses: - '201': + '200': description: 'OK' + headers: + X-Rate-Limit: + description: "The number of allowed requests in the current period" + schema: + type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/coordinates' + text/plain: + schema: + $ref: '#/components/schemas/stringWithMinLength' + '201': + description: 'Created OK' headers: X-Rate-Limit-Limit: description: "The number of allowed requests in the current period" schema: type: integer + content: + application/json: + schema: + $ref: '#/components/schemas/coordinates' + text/plain: + schema: + $ref: '#/components/schemas/stringWithMinLength' /inlineRequestBodySchemasDifferingByContentType: post: requestBody: @@ -85,4 +110,4 @@ components: lat: type: number long: - type: number + type: number \ No newline at end of file From e5f7580632e28baee60dea0fb2b7ae07c1439d1c Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 10 Dec 2021 11:07:28 -0800 Subject: [PATCH 08/11] Adds mediaTypeSchemaSuffix input to getContent --- .../org/openapitools/codegen/DefaultCodegen.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 82fb182769c8..044cf91da920 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3970,7 +3970,8 @@ public CodegenOperation fromOperation(String path, } r.setResponseHeaders(responseHeaders); } - r.setContent(getContent(response.getContent(), imports)); + String mediaTypeSchemaSuffix = String.format("For%sResponseBody", r.code); + r.setContent(getContent(response.getContent(), imports, mediaTypeSchemaSuffix)); if (r.baseType != null && !defaultIncludes.contains(r.baseType) && @@ -4515,7 +4516,7 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) codegenParameter.isDeprecated = parameter.getDeprecated(); } codegenParameter.jsonSchema = Json.pretty(parameter); - codegenParameter.setContent(getContent(parameter.getContent(), imports)); + codegenParameter.setContent(getContent(parameter.getContent(), imports, "ForParameter")); if (GlobalSettings.getProperty("debugParser") != null) { LOGGER.info("working on Parameter {}", parameter.getName()); @@ -6599,8 +6600,8 @@ protected void updateRequestBodyForString(CodegenParameter codegenParameter, Sch codegenParameter.pattern = toRegularExpression(schema.getPattern()); } - protected String toMediaTypeSchemaName(String contentType) { - return toModelName(contentType + "Schema"); + protected String toMediaTypeSchemaName(String contentType, String mediaTypeSchemaSuffix) { + return toModelName("Schema" + contentType + mediaTypeSchemaSuffix); } private CodegenParameter heeaderToCodegenParameter(Header header, String headerName, Set imports) { @@ -6627,7 +6628,7 @@ private CodegenParameter heeaderToCodegenParameter(Header header, String headerN return param; } - protected LinkedHashMap getContent(Content content, Set imports) { + protected LinkedHashMap getContent(Content content, Set imports, String mediaTypeSchemaSuffix) { if (content == null) { return null; } @@ -6662,7 +6663,7 @@ protected LinkedHashMap getContent(Content content, Se } } String contentType = contentEntry.getKey(); - CodegenProperty schemaProp = fromProperty(toMediaTypeSchemaName(contentType), mt.getSchema()); + CodegenProperty schemaProp = fromProperty(toMediaTypeSchemaName(contentType, mediaTypeSchemaSuffix), mt.getSchema()); CodegenMediaType codegenMt = new CodegenMediaType(schemaProp, ceMap); cmtContent.put(contentType, codegenMt); } @@ -6690,7 +6691,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S if (schema == null) { throw new RuntimeException("Request body cannot be null. Possible cause: missing schema in body parameter (OAS v2): " + body); } - codegenParameter.setContent(getContent(body.getContent(), imports)); + codegenParameter.setContent(getContent(body.getContent(), imports, "ForRequestBody")); if (StringUtils.isNotBlank(schema.get$ref())) { name = ModelUtils.getSimpleRef(schema.get$ref()); From db1a9a29bd954025fc69c20986f8efb888ec8451 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 10 Dec 2021 11:19:30 -0800 Subject: [PATCH 09/11] Tests updated --- .../openapitools/codegen/DefaultCodegen.java | 8 ++++---- .../codegen/DefaultCodegenTest.java | 20 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 044cf91da920..97b75695ae3f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3970,7 +3970,7 @@ public CodegenOperation fromOperation(String path, } r.setResponseHeaders(responseHeaders); } - String mediaTypeSchemaSuffix = String.format("For%sResponseBody", r.code); + String mediaTypeSchemaSuffix = String.format("%sResponseBody", r.code); r.setContent(getContent(response.getContent(), imports, mediaTypeSchemaSuffix)); if (r.baseType != null && @@ -4516,7 +4516,7 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) codegenParameter.isDeprecated = parameter.getDeprecated(); } codegenParameter.jsonSchema = Json.pretty(parameter); - codegenParameter.setContent(getContent(parameter.getContent(), imports, "ForParameter")); + codegenParameter.setContent(getContent(parameter.getContent(), imports, "Parameter")); if (GlobalSettings.getProperty("debugParser") != null) { LOGGER.info("working on Parameter {}", parameter.getName()); @@ -6601,7 +6601,7 @@ protected void updateRequestBodyForString(CodegenParameter codegenParameter, Sch } protected String toMediaTypeSchemaName(String contentType, String mediaTypeSchemaSuffix) { - return toModelName("Schema" + contentType + mediaTypeSchemaSuffix); + return "SchemaFor" + mediaTypeSchemaSuffix + toModelName(contentType); } private CodegenParameter heeaderToCodegenParameter(Header header, String headerName, Set imports) { @@ -6691,7 +6691,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set imports, S if (schema == null) { throw new RuntimeException("Request body cannot be null. Possible cause: missing schema in body parameter (OAS v2): " + body); } - codegenParameter.setContent(getContent(body.getContent(), imports, "ForRequestBody")); + codegenParameter.setContent(getContent(body.getContent(), imports, "RequestBody")); if (StringUtils.isNotBlank(schema.get$ref())) { name = ModelUtils.getSimpleRef(schema.get$ref()); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 9b5fbb9c48a0..f59d7191fbbf 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -3949,7 +3949,7 @@ public void testRequestParameterContent() { CodegenProperty cp = mt.getSchema(); assertTrue(cp.isMap); assertEquals(cp.complexType, "object"); - assertEquals(cp.baseName, "ApplicationJsonSchema"); + assertEquals(cp.baseName, "SchemaForParameterApplicationJson"); CodegenParameter coordinatesReferencedSchema = co.queryParams.get(1); content = coordinatesReferencedSchema.getContent(); @@ -3958,7 +3958,7 @@ public void testRequestParameterContent() { cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - assertEquals(cp.baseName, "ApplicationJsonSchema"); + assertEquals(cp.baseName, "SchemaForParameterApplicationJson"); } @Test @@ -3978,13 +3978,13 @@ public void testRequestBodyContent() { CodegenMediaType mt = content.get("application/json"); assertNull(mt.getEncoding()); CodegenProperty cp = mt.getSchema(); - assertEquals(cp.baseName, "ApplicationJsonSchema"); + assertEquals(cp.baseName, "SchemaForRequestBodyApplicationJson"); assertNotNull(cp); mt = content.get("text/plain"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "TextPlainSchema"); + assertEquals(cp.baseName, "SchemaForRequestBodyTextPlain"); assertNotNull(cp); // Note: the inline model resolver has a bug for this use case; it extracts an inline request body into a component // but the schema it references is not string type @@ -3998,13 +3998,13 @@ public void testRequestBodyContent() { mt = content.get("application/json"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "ApplicationJsonSchema"); + assertEquals(cp.baseName, "SchemaForRequestBodyApplicationJson"); assertEquals(cp.complexType, "coordinates"); mt = content.get("text/plain"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "TextPlainSchema"); + assertEquals(cp.baseName, "SchemaForRequestBodyTextPlain"); assertTrue(cp.isString); } @@ -4042,12 +4042,12 @@ public void testResponseContentAndHeader() { CodegenProperty cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - assertEquals(cp.baseName, "ApplicationJsonSchema"); + assertEquals(cp.baseName, "SchemaFor200ResponseBodyApplicationJson"); mt = content.get("text/plain"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "TextPlainSchema"); + assertEquals(cp.baseName, "SchemaFor200ResponseBodyTextPlain"); assertTrue(cp.isString); cr = co.responses.get(1); @@ -4058,12 +4058,12 @@ public void testResponseContentAndHeader() { cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - assertEquals(cp.baseName, "ApplicationJsonSchema"); + assertEquals(cp.baseName, "SchemaFor201ResponseBodyApplicationJson"); mt = content.get("text/plain"); assertNull(mt.getEncoding()); cp = mt.getSchema(); - assertEquals(cp.baseName, "TextPlainSchema"); + assertEquals(cp.baseName, "SchemaFor201ResponseBodyTextPlain"); assertTrue(cp.isString); } } \ No newline at end of file From 32cdb7d178f466715868812e2801cf427d15eca4 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 10 Dec 2021 11:51:01 -0800 Subject: [PATCH 10/11] Updates how response content schema names are set --- .../java/org/openapitools/codegen/DefaultCodegen.java | 9 +++++---- .../org/openapitools/codegen/DefaultCodegenTest.java | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 97b75695ae3f..e608b13cb9ce 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3965,7 +3965,7 @@ public CodegenOperation fromOperation(String path, for (Entry entry: headers.entrySet()) { String headerName = entry.getKey(); Header header = entry.getValue(); - CodegenParameter responseHeader = heeaderToCodegenParameter(header, headerName, imports); + CodegenParameter responseHeader = heeaderToCodegenParameter(header, headerName, imports, String.format("%sResponseParameter", r.code)); responseHeaders.add(responseHeader); } r.setResponseHeaders(responseHeaders); @@ -4079,6 +4079,7 @@ public CodegenOperation fromOperation(String path, param = ModelUtils.getReferencedParameter(this.openAPI, param); CodegenParameter p = fromParameter(param, imports); + p.setContent(getContent(param.getContent(), imports, "RequestParameter" + toModelName(param.getName()))); // ensure unique params if (ensureUniqueParams) { @@ -4516,7 +4517,6 @@ public CodegenParameter fromParameter(Parameter parameter, Set imports) codegenParameter.isDeprecated = parameter.getDeprecated(); } codegenParameter.jsonSchema = Json.pretty(parameter); - codegenParameter.setContent(getContent(parameter.getContent(), imports, "Parameter")); if (GlobalSettings.getProperty("debugParser") != null) { LOGGER.info("working on Parameter {}", parameter.getName()); @@ -6604,7 +6604,7 @@ protected String toMediaTypeSchemaName(String contentType, String mediaTypeSchem return "SchemaFor" + mediaTypeSchemaSuffix + toModelName(contentType); } - private CodegenParameter heeaderToCodegenParameter(Header header, String headerName, Set imports) { + private CodegenParameter heeaderToCodegenParameter(Header header, String headerName, Set imports, String mediaTypeSchemaSuffix) { if (header == null) { return null; } @@ -6625,6 +6625,7 @@ private CodegenParameter heeaderToCodegenParameter(Header header, String headerN headerParam.setContent(header.getContent()); headerParam.setExtensions(header.getExtensions()); CodegenParameter param = fromParameter(headerParam, imports); + param.setContent(getContent(headerParam.getContent(), imports, mediaTypeSchemaSuffix)); return param; } @@ -6647,7 +6648,7 @@ protected LinkedHashMap getContent(Content content, Se for (Entry headerEntry: encHeaders.entrySet()) { String headerName = headerEntry.getKey(); Header header = ModelUtils.getReferencedHeader(this.openAPI, headerEntry.getValue()); - CodegenParameter param = heeaderToCodegenParameter(header, headerName, imports); + CodegenParameter param = heeaderToCodegenParameter(header, headerName, imports, mediaTypeSchemaSuffix); headers.add(param); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index f59d7191fbbf..54a2b0d20530 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -3949,7 +3949,7 @@ public void testRequestParameterContent() { CodegenProperty cp = mt.getSchema(); assertTrue(cp.isMap); assertEquals(cp.complexType, "object"); - assertEquals(cp.baseName, "SchemaForParameterApplicationJson"); + assertEquals(cp.baseName, "SchemaForRequestParameterCoordinatesInlineSchemaApplicationJson"); CodegenParameter coordinatesReferencedSchema = co.queryParams.get(1); content = coordinatesReferencedSchema.getContent(); @@ -3958,7 +3958,7 @@ public void testRequestParameterContent() { cp = mt.getSchema(); assertFalse(cp.isMap); // because it is a referenced schema assertEquals(cp.complexType, "coordinates"); - assertEquals(cp.baseName, "SchemaForParameterApplicationJson"); + assertEquals(cp.baseName, "SchemaForRequestParameterCoordinatesReferencedSchemaApplicationJson"); } @Test From e908ac15b28d6a113f9ac06b0944926787887736 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 10 Dec 2021 12:19:57 -0800 Subject: [PATCH 11/11] Adds missing Locale to String.format invocations --- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e608b13cb9ce..7528a26445b5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3965,12 +3965,12 @@ public CodegenOperation fromOperation(String path, for (Entry entry: headers.entrySet()) { String headerName = entry.getKey(); Header header = entry.getValue(); - CodegenParameter responseHeader = heeaderToCodegenParameter(header, headerName, imports, String.format("%sResponseParameter", r.code)); + CodegenParameter responseHeader = heeaderToCodegenParameter(header, headerName, imports, String.format(Locale.ROOT, "%sResponseParameter", r.code)); responseHeaders.add(responseHeader); } r.setResponseHeaders(responseHeaders); } - String mediaTypeSchemaSuffix = String.format("%sResponseBody", r.code); + String mediaTypeSchemaSuffix = String.format(Locale.ROOT, "%sResponseBody", r.code); r.setContent(getContent(response.getContent(), imports, mediaTypeSchemaSuffix)); if (r.baseType != null &&