mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
[Spring] openapi-generator generates an incorrect stub for types named "Resource (#8178)
* Initial push for fix #1680 * fix yaml * update samples Co-authored-by: JBurgess <joel.burgess@gmail.com>
This commit is contained in:
@@ -13,7 +13,6 @@ import java.util.Map;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.model.OuterComposite;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.openapitools.model.User;
|
||||
import org.openapitools.model.XmlItem;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@@ -8,7 +8,6 @@ import java.util.Map;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.model.OuterComposite;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.openapitools.model.User;
|
||||
import org.openapitools.model.XmlItem;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@@ -8,7 +8,6 @@ import java.util.Map;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.model.OuterComposite;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.openapitools.model.User;
|
||||
import org.openapitools.model.XmlItem;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@@ -7,7 +7,6 @@ package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.openapitools.model.Pet;
|
||||
import org.springframework.core.io.Resource;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.openapitools.model.Pet;
|
||||
import org.springframework.core.io.Resource;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.openapitools.model.Pet;
|
||||
import org.springframework.core.io.Resource;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.UUID;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
@@ -44,7 +43,7 @@ public class FormatTest {
|
||||
private byte[] _byte;
|
||||
|
||||
@JsonProperty("binary")
|
||||
private Resource 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 +235,7 @@ public class FormatTest {
|
||||
this._byte = _byte;
|
||||
}
|
||||
|
||||
public FormatTest binary(Resource binary) {
|
||||
public FormatTest binary(org.springframework.core.io.Resource binary) {
|
||||
this.binary = binary;
|
||||
return this;
|
||||
}
|
||||
@@ -249,11 +248,11 @@ public class FormatTest {
|
||||
|
||||
@Valid
|
||||
|
||||
public Resource getBinary() {
|
||||
public org.springframework.core.io.Resource getBinary() {
|
||||
return binary;
|
||||
}
|
||||
|
||||
public void setBinary(Resource binary) {
|
||||
public void setBinary(org.springframework.core.io.Resource binary) {
|
||||
this.binary = binary;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user