From b1cba96627e07d4b1bbe49f6926a464c90efb4aa Mon Sep 17 00:00:00 2001 From: agilob Date: Sun, 23 May 2021 14:59:51 +0000 Subject: [PATCH] Revert "[Java][Spring] Fix for #8659 - Different in-parameter types generated for api and delegate for files (#9331)" (#9555) This reverts commit b9a1c8f016711307b9c718dbbdf60a137372c7af. --- .../codegen/languages/SpringCodegen.java | 4 ++-- .../Java/libraries/resttemplate/api.mustache | 4 ++-- .../Java/libraries/resttemplate/api_test.mustache | 2 +- .../resources/JavaSpring/homeController.mustache | 2 +- .../codegen/java/JavaClientCodegenTest.java | 12 ++++++------ .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../openapitools/configuration/HomeController.java | 2 +- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- .../org/openapitools/virtualan/model/FormatTest.java | 8 ++++---- .../main/java/org/openapitools/model/FormatTest.java | 8 ++++---- 24 files changed, 85 insertions(+), 85 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 4c4f0e19496..058acbed956 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -336,8 +336,8 @@ public class SpringCodegen extends AbstractJavaCodegen } additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException()); - typeMapping.put("file", "org.springframework.web.multipart.MultipartFile"); - importMapping.put("org.springframework.web.multipart.MultipartFile", "org.springframework.web.multipart.MultipartFile"); + typeMapping.put("file", "org.springframework.core.io.Resource"); + importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource"); if (useOptional) { writePropertyBack(USE_OPTIONAL, useOptional); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache index dce5d647267..006e6cf8f93 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache @@ -71,7 +71,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.web.multipart.MultipartFile{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { + public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { {{#returnType}} return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody(); {{/returnType}} @@ -99,7 +99,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public ResponseEntity<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.web.multipart.MultipartFile{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { + public ResponseEntity<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache index 56d89a842d4..119194543c3 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache @@ -34,7 +34,7 @@ public class {{classname}}Test { @Test public void {{operationId}}Test() { {{#allParams}} - {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.web.multipart.MultipartFile{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; + {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; {{/allParams}} {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache index 2b244c540bc..f909a15b37d 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/homeController.mustache @@ -4,7 +4,7 @@ package {{configPackage}}; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; -import org.springframework.web.multipart.MultipartFile; +import org.springframework.core.io.Resource; {{/useSpringfox}} import org.springframework.stereotype.Controller; {{^useSpringfox}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 3a7636d631c..3ead6f31f9e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -1028,18 +1028,18 @@ public class JavaClientCodegenTest { Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); TestUtils.assertFileContains(defaultApi, //multiple files - "multipartArray(java.util.Collection files)", - "multipartArrayWithHttpInfo(java.util.Collection files)", + "multipartArray(java.util.Collection files)", + "multipartArrayWithHttpInfo(java.util.Collection files)", "formParams.addAll(\"files\", files.stream().collect(Collectors.toList()));", //mixed - "multipartMixed(org.springframework.web.multipart.MultipartFile file, MultipartMixedMarker marker)", - "multipartMixedWithHttpInfo(org.springframework.web.multipart.MultipartFile file, MultipartMixedMarker marker)", + "multipartMixed(org.springframework.core.io.Resource file, MultipartMixedMarker marker)", + "multipartMixedWithHttpInfo(org.springframework.core.io.Resource file, MultipartMixedMarker marker)", "formParams.add(\"file\", file);", //single file - "multipartSingle(org.springframework.web.multipart.MultipartFile file)", - "multipartSingleWithHttpInfo(org.springframework.web.multipart.MultipartFile file)", + "multipartSingle(org.springframework.core.io.Resource file)", + "multipartSingleWithHttpInfo(org.springframework.core.io.Resource file)", "formParams.add(\"file\", file);" ); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java index 9efca6d654b..04e164b1c52 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 06978db9b9e..0962957d79f 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -43,7 +43,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -235,7 +235,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -248,11 +248,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java index 2a1722c3190..80ea59cef11 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/FormatTest.java @@ -46,7 +46,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -238,7 +238,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -251,11 +251,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 99f755655a9..60247deff4c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -43,7 +43,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -235,7 +235,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -248,11 +248,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java index 5e4aeb0ea86..b1e5bfc21ee 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/HomeController.java @@ -3,7 +3,7 @@ package org.openapitools.configuration; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; -import org.springframework.web.multipart.MultipartFile; +import org.springframework.core.io.Resource; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; import org.springframework.web.bind.annotation.GetMapping; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 354373c3d6c..dedb11fe758 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java index 354373c3d6c..dedb11fe758 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java index 07241a089c8..d58e787c368 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java index 72f64c2b370..e894f561fc6 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java @@ -44,7 +44,7 @@ public class FormatTest { private byte[] _byte; @JsonProperty("binary") - private org.springframework.web.multipart.MultipartFile binary; + private org.springframework.core.io.Resource binary; @JsonProperty("date") @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @@ -236,7 +236,7 @@ public class FormatTest { this._byte = _byte; } - public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) { + public FormatTest binary(org.springframework.core.io.Resource binary) { this.binary = binary; return this; } @@ -249,11 +249,11 @@ public class FormatTest { @Valid - public org.springframework.web.multipart.MultipartFile getBinary() { + public org.springframework.core.io.Resource getBinary() { return binary; } - public void setBinary(org.springframework.web.multipart.MultipartFile binary) { + public void setBinary(org.springframework.core.io.Resource binary) { this.binary = binary; }