[Java][Spring] Fix for #8659 - Different in-parameter types generated for api and delegate for files (#9331)

This commit is contained in:
Mateusz Hubert Stefaniak 2021-04-26 03:49:21 +02:00 committed by GitHub
parent 812d563c78
commit b9a1c8f016
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 85 additions and 85 deletions

View File

@ -336,8 +336,8 @@ public class SpringCodegen extends AbstractJavaCodegen
} }
additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException()); additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException());
typeMapping.put("file", "org.springframework.core.io.Resource"); typeMapping.put("file", "org.springframework.web.multipart.MultipartFile");
importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource"); importMapping.put("org.springframework.web.multipart.MultipartFile", "org.springframework.web.multipart.MultipartFile");
if (useOptional) { if (useOptional) {
writePropertyBack(USE_OPTIONAL, useOptional); writePropertyBack(USE_OPTIONAL, useOptional);

View File

@ -71,7 +71,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/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<org.springframework.web.multipart.MultipartFile>{{/collectionFormat}}{{^collectionFormat}}org.springframework.web.multipart.MultipartFile{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException {
{{#returnType}} {{#returnType}}
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody(); return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody();
{{/returnType}} {{/returnType}}
@ -99,7 +99,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public ResponseEntity<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/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<org.springframework.web.multipart.MultipartFile>{{/collectionFormat}}{{^collectionFormat}}org.springframework.web.multipart.MultipartFile{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException {
Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set

View File

@ -34,7 +34,7 @@ public class {{classname}}Test {
@Test @Test
public void {{operationId}}Test() { public void {{operationId}}Test() {
{{#allParams}} {{#allParams}}
{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.web.multipart.MultipartFile>{{/collectionFormat}}{{^collectionFormat}}org.springframework.web.multipart.MultipartFile{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});

View File

@ -4,7 +4,7 @@ package {{configPackage}};
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.core.io.Resource; import org.springframework.web.multipart.MultipartFile;
{{/useSpringfox}} {{/useSpringfox}}
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
{{^useSpringfox}} {{^useSpringfox}}

View File

@ -1028,18 +1028,18 @@ public class JavaClientCodegenTest {
Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java");
TestUtils.assertFileContains(defaultApi, TestUtils.assertFileContains(defaultApi,
//multiple files //multiple files
"multipartArray(java.util.Collection<org.springframework.core.io.Resource> files)", "multipartArray(java.util.Collection<org.springframework.web.multipart.MultipartFile> files)",
"multipartArrayWithHttpInfo(java.util.Collection<org.springframework.core.io.Resource> files)", "multipartArrayWithHttpInfo(java.util.Collection<org.springframework.web.multipart.MultipartFile> files)",
"formParams.addAll(\"files\", files.stream().collect(Collectors.toList()));", "formParams.addAll(\"files\", files.stream().collect(Collectors.toList()));",
//mixed //mixed
"multipartMixed(org.springframework.core.io.Resource file, MultipartMixedMarker marker)", "multipartMixed(org.springframework.web.multipart.MultipartFile file, MultipartMixedMarker marker)",
"multipartMixedWithHttpInfo(org.springframework.core.io.Resource file, MultipartMixedMarker marker)", "multipartMixedWithHttpInfo(org.springframework.web.multipart.MultipartFile file, MultipartMixedMarker marker)",
"formParams.add(\"file\", file);", "formParams.add(\"file\", file);",
//single file //single file
"multipartSingle(org.springframework.core.io.Resource file)", "multipartSingle(org.springframework.web.multipart.MultipartFile file)",
"multipartSingleWithHttpInfo(org.springframework.core.io.Resource file)", "multipartSingleWithHttpInfo(org.springframework.web.multipart.MultipartFile file)",
"formParams.add(\"file\", file);" "formParams.add(\"file\", file);"
); );
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -43,7 +43,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -235,7 +235,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -248,11 +248,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -46,7 +46,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -238,7 +238,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -251,11 +251,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -43,7 +43,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -235,7 +235,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -248,11 +248,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -3,7 +3,7 @@ package org.openapitools.configuration;
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.core.io.Resource; import org.springframework.web.multipart.MultipartFile;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.util.StreamUtils; import org.springframework.util.StreamUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }

View File

@ -44,7 +44,7 @@ public class FormatTest {
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
private org.springframework.core.io.Resource binary; private org.springframework.web.multipart.MultipartFile binary;
@JsonProperty("date") @JsonProperty("date")
@org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE) @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
@ -236,7 +236,7 @@ public class FormatTest {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(org.springframework.core.io.Resource binary) { public FormatTest binary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
@ -249,11 +249,11 @@ public class FormatTest {
@Valid @Valid
public org.springframework.core.io.Resource getBinary() { public org.springframework.web.multipart.MultipartFile getBinary() {
return binary; return binary;
} }
public void setBinary(org.springframework.core.io.Resource binary) { public void setBinary(org.springframework.web.multipart.MultipartFile binary) {
this.binary = binary; this.binary = binary;
} }