diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 26d06d5fbb6d..46790a8cad09 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -75,6 +75,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { public List readOnlyVars = new ArrayList<>(); // a list of read-only properties public List readWriteVars = new ArrayList<>(); // a list of properties for read, write public List parentVars = new ArrayList<>(); + public List parentRequiredVars = new ArrayList<>(); public List nonNullableVars = new ArrayList<>(); // a list of non-nullable properties public Map allowableValues; 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 7f6e6bf8e9d9..b68e22a4d353 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 @@ -1078,6 +1078,10 @@ public Map postProcessAllModels(Map objs) codegenModel.getImports().add(imp); } } + + if (property.required) { + codegenModel.parentRequiredVars.add(parentVar.clone()); + } } } parentCodegenModel = parentCodegenModel.getParentModel(); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index a41cb8eac753..45c9c96dcd44 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -80,6 +80,36 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}} {{/openApiNullable}} {{/isContainer}} {{/vars}} + {{#hasRequired}} + + /** + * Default constructor + * @deprecated Use {@link {{classname}}#{{classname}}({{#requiredVars}}{{{datatypeWithEnum}}}{{^-last}}, {{/-last}}{{/requiredVars}})} + */ + @Deprecated + public {{classname}}() { + super(); + } + + /** + * Constructor with only required parameters + */ + public {{classname}}({{#requiredVars}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/requiredVars}}) { + {{#parent}} + super({{#parentRequiredVars}}{{name}}{{^-last}}, {{/-last}}{{/parentRequiredVars}}); + {{/parent}} + {{#vars}} + {{#required}} + {{#openApiNullable}} + this.{{name}} = {{#isNullable}}JsonNullable.of({{name}}){{/isNullable}}{{^isNullable}}{{name}}{{/isNullable}}; + {{/openApiNullable}} + {{^openApiNullable}} + this.{{name}} = {{name}}; + {{/openApiNullable}} + {{/required}} + {{/vars}} + } + {{/hasRequired}} {{#vars}} {{! begin feature: fluent setter methods }} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java index c2ba4827defa..949dc9c5eb03 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java @@ -95,6 +95,15 @@ public ConstructorAssert assertConstructor(final String... paramTypes) { return new ConstructorAssert(this, constructorDeclaration.get()); } + public JavaFileAssert assertNoConstructor(final String... paramTypes) { + Optional constructorDeclaration = actual.getType(0).getConstructorByParameterTypes(paramTypes); + Assertions.assertThat(constructorDeclaration) + .withFailMessage("Found constructor with parameter(s) %s", Arrays.toString(paramTypes)) + .isEmpty(); + + return this; + } + public PropertyAssert hasProperty(final String propertyName) { Optional fieldOptional = actual.getType(0).getMembers().stream() .filter(FieldDeclaration.class::isInstance) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index bb62eef7ded8..da09be673953 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -27,7 +27,6 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; -import com.github.javaparser.ast.nodeTypes.NodeWithName; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; @@ -45,8 +44,6 @@ import java.util.function.Function; import java.util.stream.Collectors; -import javax.validation.Valid; - import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.CliOption; @@ -2041,6 +2038,25 @@ public void shouldUseTheSameTagNameForTheInterfaceAndTheMethod_issue11570() thro assertFileContains(output.get("PersonApi.java").toPath(), interfaceTag, methodTag); } + @Test + public void shouldGenerateConstructorWithOnlyRequiredParameters() throws IOException { + final Map output = generateFromContract("src/test/resources/3_0/spring/issue_9789.yml", SPRING_BOOT); + + JavaFileAssert.assertThat(output.get("ObjectWithNoRequiredParameter.java")).assertNoConstructor("String"); + + JavaFileAssert.assertThat(output.get("ObjectWithRequiredParameter.java")).assertConstructor(); + JavaFileAssert.assertThat(output.get("ObjectWithRequiredParameter.java")).assertConstructor("String", "String") + .hasParameter("param2").toConstructor() + .hasParameter("param3"); + + JavaFileAssert.assertThat(output.get("ObjectWithInheritedRequiredParameter.java")).assertConstructor(); + JavaFileAssert.assertThat(output.get("ObjectWithInheritedRequiredParameter.java")).assertConstructor("Integer", "String", "String") + .hasParameter("param2").toConstructor() + .hasParameter("param3").toConstructor() + .hasParameter("param6").toConstructor() + .bodyContainsLines("super(param2, param3)", "this.param6 = param6"); + } + private Map generateFromContract(String url, String library) throws IOException { return generateFromContract(url, library, new HashMap<>()); } diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/issue_9789.yml b/modules/openapi-generator/src/test/resources/3_0/spring/issue_9789.yml new file mode 100644 index 000000000000..32e66d0a8fe7 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/spring/issue_9789.yml @@ -0,0 +1,52 @@ +openapi: 3.0.1 +info: + title: Test Issue #9789 + version: v1 +paths: + /test: + get: + responses: + '200': + description: default response + content: + '*/*': + schema: + $ref: '#/components/schemas/ObjectWithNoRequiredParameter' +components: + schemas: + ObjectWithNoRequiredParameter: + type: object + properties: + param1: + type: string + ObjectWithRequiredParameter: + type: object + properties: + param1: + type: string + param2: + type: string + param3: + type: string + nullable: true + param4: + type: string + required: + - param2 + - param3 + discriminator: + propertyName: param1 + ObjectWithInheritedRequiredParameter: + allOf: + - $ref: '#/components/schemas/ObjectWithRequiredParameter' + - type: object + properties: + param5: + type: boolean + param6: + type: integer + param7: + type: number + required: + - param6 + diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index f68824372a74..60af3a5b92a2 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -85,6 +85,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java index 5523df897c1e..b8d21304b6c4 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java @@ -46,6 +46,22 @@ public class Pet { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate dateOfBirth = LocalDate.parse("2021-01-01"); + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String atType) { + this.atType = atType; + } + public Pet atType(String atType) { this.atType = atType; return this; diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java index f68824372a74..60af3a5b92a2 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java @@ -85,6 +85,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index f68824372a74..60af3a5b92a2 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -85,6 +85,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index f68824372a74..60af3a5b92a2 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -85,6 +85,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java index dfa4f2b2b129..babc11283a29 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java @@ -42,6 +42,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCat.java index b89e1d790199..d965e16521bb 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -67,6 +67,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Cat.java index 49ff8de95db3..3e54e9eb2588 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Cat.java @@ -36,6 +36,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java index fb6e71cd900f..dcbbaf3e1e35 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java @@ -25,6 +25,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Dog.java index d3bf137ed76e..c23c2b8c3d6b 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Dog.java @@ -27,6 +27,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java index b5e97d1f98e6..c3d6f8740bee 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -182,6 +182,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java index 6d4ecbf01a0e..ea6488d76b12 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -71,6 +71,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java index bc0467bafa06..b67fffabe9f6 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java @@ -31,6 +31,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java index 40474b46031d..417eda278e2d 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index 638a79b6a315..8701e55eaa3a 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -38,6 +38,26 @@ public class TypeHolderDefault { private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index 8e9f40d83315..7b3eb0aec7f0 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -41,6 +41,27 @@ public class TypeHolderExample { private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AnimalDto.java index c17b0385407e..98943e769c29 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/AnimalDto.java @@ -43,6 +43,22 @@ public class AnimalDto { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link AnimalDto#AnimalDto(String)} + */ + @Deprecated + public AnimalDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public AnimalDto(String className) { + this.className = className; + } + public AnimalDto className(String className) { this.className = className; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/BigCatDto.java index 4277020c8dca..6608ecfa7a4d 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/BigCatDto.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCatDto#BigCatDto(String)} + */ + @Deprecated + public BigCatDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCatDto(String className) { + super(className); + } + public BigCatDto kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java index 61f8bc958e63..c350847bb898 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CatDto.java @@ -37,6 +37,22 @@ public class CatDto extends AnimalDto { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link CatDto#CatDto(String)} + */ + @Deprecated + public CatDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CatDto(String className) { + super(className); + } + public CatDto declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CategoryDto.java index b3aebedbe87d..5936031e79c7 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/CategoryDto.java @@ -27,6 +27,22 @@ public class CategoryDto { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link CategoryDto#CategoryDto(String)} + */ + @Deprecated + public CategoryDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CategoryDto(String name) { + this.name = name; + } + public CategoryDto id(Long id) { this.id = id; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/DogDto.java index 3cd4ba41e445..19f8d6d95c6a 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/DogDto.java @@ -29,6 +29,22 @@ public class DogDto extends AnimalDto { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link DogDto#DogDto(String)} + */ + @Deprecated + public DogDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DogDto(String className) { + super(className); + } + public DogDto breed(String breed) { this.breed = breed; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java index f799473c14f3..f825319a573a 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/EnumTestDto.java @@ -182,6 +182,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnumDto outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTestDto#EnumTestDto(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTestDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTestDto(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTestDto enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FormatTestDto.java index c3f24d344c51..77f950cdef4b 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/FormatTestDto.java @@ -71,6 +71,25 @@ public class FormatTestDto { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTestDto#FormatTestDto(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTestDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTestDto(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTestDto integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NameDto.java index d560dd759ec0..ba75b859251c 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/NameDto.java @@ -33,6 +33,22 @@ public class NameDto { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link NameDto#NameDto(Integer)} + */ + @Deprecated + public NameDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public NameDto(Integer name) { + this.name = name; + } + public NameDto name(Integer name) { this.name = name; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java index 4cb331580866..95ec99c34d54 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link PetDto#PetDto(String, Set)} + */ + @Deprecated + public PetDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PetDto(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public PetDto id(Long id) { this.id = id; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 37047d9a2e28..70b2a2cebacf 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -40,6 +40,26 @@ public class TypeHolderDefaultDto { private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefaultDto#TypeHolderDefaultDto(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefaultDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefaultDto(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefaultDto stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index 6ca0eb07b4e1..31e61fbd0e65 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -43,6 +43,27 @@ public class TypeHolderExampleDto { private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExampleDto#TypeHolderExampleDto(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExampleDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExampleDto(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExampleDto stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java index b8e62ad54d06..16a192536ec0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 900258877039..ad48ebd85ebf 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java index c34a27cf1d68..d4de6f244098 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java @@ -45,6 +45,22 @@ public class Pet { @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate dateOfBirth = LocalDate.parse("2021-01-01"); + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String atType) { + this.atType = atType; + } + public Pet atType(String atType) { this.atType = atType; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java index 079192f597a2..1ecf10efc5c1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Animal.java @@ -44,6 +44,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java index 1b367854915c..8c5453c4a5b0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCat.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java index 41d9863046f1..a2feece8de89 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Cat.java @@ -38,6 +38,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java index 980faf6cbc2e..7ee1fde06461 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Category.java @@ -27,6 +27,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java index e39fe3fdab2c..1bb3d6b51028 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Dog.java @@ -29,6 +29,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java index a92050b09f5d..6f08d4ee9fb3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/EnumTest.java @@ -184,6 +184,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java index 23130acbb766..06e9dde8e89d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/FormatTest.java @@ -73,6 +73,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java index 708b0b90b016..d6dcb665651a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Name.java @@ -34,6 +34,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index acb7ce6b37b3..6adaaba97d76 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java index e37caaf5784c..67ef036857d1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -40,6 +40,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java index c821c0257d20..5b77bee14c17 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -43,6 +43,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 900258877039..ad48ebd85ebf 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 900258877039..ad48ebd85ebf 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java index 900258877039..ad48ebd85ebf 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index 900258877039..ad48ebd85ebf 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java index 01d0de23ab9f..39979e84ce8e 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java @@ -39,6 +39,23 @@ public class Bar extends Entity implements BarRefOrValue { @JsonProperty("foo") private FooRefOrValue foo; + /** + * Default constructor + * @deprecated Use {@link Bar#Bar(String, String)} + */ + @Deprecated + public Bar() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Bar(String id, String atType) { + super(atType); + this.id = id; + } + public Bar id(String id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java index 9df84a029bf2..2e54e090ba2e 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java @@ -38,6 +38,22 @@ public class BarCreate extends Entity { @JsonProperty("foo") private FooRefOrValue foo; + /** + * Default constructor + * @deprecated Use {@link BarCreate#BarCreate(String)} + */ + @Deprecated + public BarCreate() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BarCreate(String atType) { + super(atType); + } + public BarCreate barPropA(String barPropA) { this.barPropA = barPropA; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java index abae00509426..921825b36bad 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java @@ -26,6 +26,22 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class BarRef extends EntityRef implements BarRefOrValue { + /** + * Default constructor + * @deprecated Use {@link BarRef#BarRef(String)} + */ + @Deprecated + public BarRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BarRef(String atType) { + super(atType); + } + public BarRef name(String name) { super.setName(name); return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java index 3beb1e1bf1b6..f562753ad8ae 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Entity.java @@ -59,6 +59,22 @@ public class Entity { @JsonProperty("@type") private String atType; + /** + * Default constructor + * @deprecated Use {@link Entity#Entity(String)} + */ + @Deprecated + public Entity() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Entity(String atType) { + this.atType = atType; + } + public Entity href(String href) { this.href = href; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java index c8e16278648f..aa5d638da283 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/EntityRef.java @@ -58,6 +58,22 @@ public class EntityRef { @JsonProperty("@type") private String atType; + /** + * Default constructor + * @deprecated Use {@link EntityRef#EntityRef(String)} + */ + @Deprecated + public EntityRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EntityRef(String atType) { + this.atType = atType; + } + public EntityRef name(String name) { this.name = name; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java index 8a8371959ebf..1a441eee6e83 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Extensible.java @@ -30,6 +30,22 @@ public class Extensible { @JsonProperty("@type") private String atType; + /** + * Default constructor + * @deprecated Use {@link Extensible#Extensible(String)} + */ + @Deprecated + public Extensible() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Extensible(String atType) { + this.atType = atType; + } + public Extensible atSchemaLocation(String atSchemaLocation) { this.atSchemaLocation = atSchemaLocation; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java index c8ef90c37569..2a62b82f81de 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java @@ -32,6 +32,22 @@ public class Foo extends Entity implements FooRefOrValue { @JsonProperty("fooPropB") private String fooPropB; + /** + * Default constructor + * @deprecated Use {@link Foo#Foo(String)} + */ + @Deprecated + public Foo() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Foo(String atType) { + super(atType); + } + public Foo fooPropA(String fooPropA) { this.fooPropA = fooPropA; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java index a99d6658c3bc..f0386a82498c 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java @@ -29,6 +29,22 @@ public class FooRef extends EntityRef implements FooRefOrValue { @JsonProperty("foorefPropA") private String foorefPropA; + /** + * Default constructor + * @deprecated Use {@link FooRef#FooRef(String)} + */ + @Deprecated + public FooRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FooRef(String atType) { + super(atType); + } + public FooRef foorefPropA(String foorefPropA) { this.foorefPropA = foorefPropA; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java index ef6cfbd858e6..ad5306785356 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java @@ -29,6 +29,22 @@ public class Pasta extends Entity { @JsonProperty("vendor") private String vendor; + /** + * Default constructor + * @deprecated Use {@link Pasta#Pasta(String)} + */ + @Deprecated + public Pasta() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pasta(String atType) { + super(atType); + } + public Pasta vendor(String vendor) { this.vendor = vendor; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java index c8506f6b8633..a87109514066 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java @@ -39,6 +39,22 @@ public class Pizza extends Entity { @JsonProperty("pizzaSize") private BigDecimal pizzaSize; + /** + * Default constructor + * @deprecated Use {@link Pizza#Pizza(String)} + */ + @Deprecated + public Pizza() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pizza(String atType) { + super(atType); + } + public Pizza pizzaSize(BigDecimal pizzaSize) { this.pizzaSize = pizzaSize; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java index 1a0b7c1011fb..a4c5f53565e2 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java @@ -30,6 +30,22 @@ public class PizzaSpeziale extends Pizza { @JsonProperty("toppings") private String toppings; + /** + * Default constructor + * @deprecated Use {@link PizzaSpeziale#PizzaSpeziale(String)} + */ + @Deprecated + public PizzaSpeziale() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PizzaSpeziale(String atType) { + super(atType); + } + public PizzaSpeziale toppings(String toppings) { this.toppings = toppings; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java index 900258877039..ad48ebd85ebf 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java index b8e62ad54d06..16a192536ec0 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index 13eab9408175..269a4170ff7e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -43,6 +43,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index 1d952b246468..f07e9f4b5621 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -68,6 +68,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index ce3da009d719..c6048b1335ae 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -37,6 +37,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index ea14aa64d4bd..155f4416d9fc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -26,6 +26,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index 14d4446e57f2..0de88edc8abb 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -28,6 +28,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 8bc42c5fb63c..cbd60e48575e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -183,6 +183,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java index 188151523939..ae54e71df26b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/FormatTest.java @@ -72,6 +72,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index 7ea2ac488f52..7835f479ed30 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -33,6 +33,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index 6d50217f368d..551a899b72cc 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -85,6 +85,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 58d15bcd9409..3f6d4a259b81 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -39,6 +39,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index 4856b64ceec8..6365a70bc6e7 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -42,6 +42,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 079192f597a2..1ecf10efc5c1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -44,6 +44,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 1b367854915c..8c5453c4a5b0 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index 41d9863046f1..a2feece8de89 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -38,6 +38,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index 980faf6cbc2e..7ee1fde06461 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -27,6 +27,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index e39fe3fdab2c..1bb3d6b51028 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -29,6 +29,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index a92050b09f5d..6f08d4ee9fb3 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -184,6 +184,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java index 23130acbb766..06e9dde8e89d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/FormatTest.java @@ -73,6 +73,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 708b0b90b016..d6dcb665651a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -34,6 +34,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index acb7ce6b37b3..6adaaba97d76 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index e37caaf5784c..67ef036857d1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -40,6 +40,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index c821c0257d20..5b77bee14c17 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -43,6 +43,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index 079192f597a2..1ecf10efc5c1 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -44,6 +44,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 1b367854915c..8c5453c4a5b0 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index 41d9863046f1..a2feece8de89 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -38,6 +38,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index 980faf6cbc2e..7ee1fde06461 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -27,6 +27,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index e39fe3fdab2c..1bb3d6b51028 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -29,6 +29,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index a92050b09f5d..6f08d4ee9fb3 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -184,6 +184,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java index 23130acbb766..06e9dde8e89d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/FormatTest.java @@ -73,6 +73,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 708b0b90b016..d6dcb665651a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -34,6 +34,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index acb7ce6b37b3..6adaaba97d76 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index e37caaf5784c..67ef036857d1 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -40,6 +40,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index c821c0257d20..5b77bee14c17 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -43,6 +43,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index 079192f597a2..1ecf10efc5c1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -44,6 +44,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 1b367854915c..8c5453c4a5b0 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index 41d9863046f1..a2feece8de89 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -38,6 +38,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index 980faf6cbc2e..7ee1fde06461 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -27,6 +27,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index e39fe3fdab2c..1bb3d6b51028 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -29,6 +29,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index a92050b09f5d..6f08d4ee9fb3 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -184,6 +184,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java index 23130acbb766..06e9dde8e89d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/FormatTest.java @@ -73,6 +73,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 708b0b90b016..d6dcb665651a 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -34,6 +34,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index acb7ce6b37b3..6adaaba97d76 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index e37caaf5784c..67ef036857d1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -40,6 +40,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index c821c0257d20..5b77bee14c17 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -43,6 +43,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java index 39a1b5dc7dce..4f55bcef672e 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java @@ -82,6 +82,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index 079192f597a2..1ecf10efc5c1 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -44,6 +44,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 1b367854915c..8c5453c4a5b0 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 41d9863046f1..a2feece8de89 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -38,6 +38,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index 980faf6cbc2e..7ee1fde06461 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -27,6 +27,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index e39fe3fdab2c..1bb3d6b51028 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -29,6 +29,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index a92050b09f5d..6f08d4ee9fb3 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -184,6 +184,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java index 23130acbb766..06e9dde8e89d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/FormatTest.java @@ -73,6 +73,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 708b0b90b016..d6dcb665651a 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -34,6 +34,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index acb7ce6b37b3..6adaaba97d76 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index e37caaf5784c..67ef036857d1 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -40,6 +40,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index c821c0257d20..5b77bee14c17 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -43,6 +43,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/openapi3/server/petstore/springboot/.openapi-generator-ignore b/samples/openapi3/server/petstore/springboot/.openapi-generator-ignore index 7484ee590a38..c0363b94e249 100644 --- a/samples/openapi3/server/petstore/springboot/.openapi-generator-ignore +++ b/samples/openapi3/server/petstore/springboot/.openapi-generator-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot/.openapi-generator/FILES index 48cc81960647..60d8efc53ef4 100644 --- a/samples/openapi3/server/petstore/springboot/.openapi-generator/FILES +++ b/samples/openapi3/server/petstore/springboot/.openapi-generator/FILES @@ -19,4 +19,3 @@ src/main/java/org/openapitools/model/Tag.java src/main/java/org/openapitools/model/User.java src/main/resources/application.properties src/main/resources/openapi.yaml -src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 900258877039..ad48ebd85ebf 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/openapi3/server/petstore/springboot/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java b/samples/openapi3/server/petstore/springboot/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java index 3681f67e7705..13000f988ff7 100644 --- a/samples/openapi3/server/petstore/springboot/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java +++ b/samples/openapi3/server/petstore/springboot/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java @@ -1,6 +1,13 @@ package org.openapitools; +import static org.assertj.core.api.Assertions.assertThat; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Collections; +import java.util.List; import org.junit.jupiter.api.Test; +import org.openapitools.model.Pet; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest @@ -10,4 +17,24 @@ class OpenApiGeneratorApplicationTests { void contextLoads() { } + @Test + void shouldDeserializeWithoutLoss() throws JsonProcessingException { + // Given + Long petId = 5L; + String petName = "Rex"; + List photoUrls = Collections.singletonList("url1"); + Pet pet = new Pet(petName, photoUrls).id(petId); + + // When + ObjectMapper mapper = new ObjectMapper(); + Pet deserializedPet = mapper.readValue(mapper.writeValueAsString(pet), Pet.class); + + // Then + assertThat(deserializedPet) + .isNotNull() + .hasFieldOrPropertyWithValue("name", petName) + .hasFieldOrPropertyWithValue("photoUrls", photoUrls) + .hasFieldOrPropertyWithValue("id", petId) + .hasFieldOrPropertyWithValue("category", null); + } } \ No newline at end of file diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java index b6a5c50f5173..bcdc28b161b1 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java @@ -98,6 +98,23 @@ public static StatusEnum fromValue(String value) { @JacksonXmlProperty(localName = "status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java index 079192f597a2..1ecf10efc5c1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Animal.java @@ -44,6 +44,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java index 1b367854915c..8c5453c4a5b0 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCat.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java index 41d9863046f1..a2feece8de89 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Cat.java @@ -38,6 +38,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java index 980faf6cbc2e..7ee1fde06461 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Category.java @@ -27,6 +27,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java index e39fe3fdab2c..1bb3d6b51028 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Dog.java @@ -29,6 +29,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java index a92050b09f5d..6f08d4ee9fb3 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/EnumTest.java @@ -184,6 +184,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java index 23130acbb766..06e9dde8e89d 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/FormatTest.java @@ -73,6 +73,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java index 708b0b90b016..d6dcb665651a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Name.java @@ -34,6 +34,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java index acb7ce6b37b3..6adaaba97d76 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/Pet.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java index e37caaf5784c..67ef036857d1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -40,6 +40,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java index c821c0257d20..5b77bee14c17 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -43,6 +43,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index f68824372a74..60af3a5b92a2 100644 --- a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -85,6 +85,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index eef2ae958def..c914c2141a75 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -44,6 +44,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java index b95757e117c6..5b4fd14d861b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCat.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java index 4adc223f0a2e..aeb4370edc37 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Cat.java @@ -38,6 +38,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java index 84d42b07658e..e7e940c65fc1 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Category.java @@ -27,6 +27,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java index b452c16dae45..4a406912e6f9 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Dog.java @@ -29,6 +29,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java index 7463264a7077..3779fa30d64a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/EnumTest.java @@ -184,6 +184,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 c985b0b1554f..dcbbc7fbde73 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 @@ -73,6 +73,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java index 73c079cba91c..d4d9ed411d9b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Name.java @@ -34,6 +34,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index a34be04dd90f..51bf8f521964 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java index 675a2453ad16..00e1edd884bf 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -40,6 +40,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java index a342162fcc30..ba77803deb7d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -43,6 +43,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java index e11ae425d9e9..d91e6d2ef40a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java @@ -45,6 +45,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java index ec95c1253fad..e9a1391ec0de 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java @@ -70,6 +70,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java index 097ddbef7980..ebd1416c5bd5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Cat.java @@ -39,6 +39,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index d3674b6bdaa4..02620d045262 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -87,6 +87,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java index e11ae425d9e9..d91e6d2ef40a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java @@ -45,6 +45,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java index ec95c1253fad..e9a1391ec0de 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java @@ -70,6 +70,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java index 097ddbef7980..ebd1416c5bd5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Cat.java @@ -39,6 +39,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index d3674b6bdaa4..02620d045262 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -87,6 +87,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index e11ae425d9e9..d91e6d2ef40a 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -45,6 +45,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index ec95c1253fad..e9a1391ec0de 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -70,6 +70,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java index 097ddbef7980..ebd1416c5bd5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Cat.java @@ -39,6 +39,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index d3674b6bdaa4..02620d045262 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -87,6 +87,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java index 39a1b5dc7dce..4f55bcef672e 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java @@ -82,6 +82,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index e11ae425d9e9..d91e6d2ef40a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -45,6 +45,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index ec95c1253fad..e9a1391ec0de 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -70,6 +70,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java index 097ddbef7980..ebd1416c5bd5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Cat.java @@ -39,6 +39,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index d3674b6bdaa4..02620d045262 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -87,6 +87,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index e11ae425d9e9..d91e6d2ef40a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -45,6 +45,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index ec95c1253fad..e9a1391ec0de 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -70,6 +70,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java index 097ddbef7980..ebd1416c5bd5 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Cat.java @@ -39,6 +39,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index d3674b6bdaa4..02620d045262 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -87,6 +87,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java index 798ec01a7fbe..aa84943bc684 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -43,6 +43,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java index 9c77b07695d5..d89c77e1749d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -30,6 +30,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java index 0d88a6b4a958..9e739aefac2d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java index 798ec01a7fbe..aa84943bc684 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java @@ -43,6 +43,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java index 9c77b07695d5..d89c77e1749d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Cat.java @@ -30,6 +30,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java index 0d88a6b4a958..9e739aefac2d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java index 798ec01a7fbe..aa84943bc684 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -43,6 +43,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java index 9c77b07695d5..d89c77e1749d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Cat.java @@ -30,6 +30,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java index 0d88a6b4a958..9e739aefac2d 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java index 798ec01a7fbe..aa84943bc684 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -43,6 +43,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java index 9c77b07695d5..d89c77e1749d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Cat.java @@ -30,6 +30,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java index 0d88a6b4a958..9e739aefac2d 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Pet.java @@ -84,6 +84,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, List)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index e11ae425d9e9..d91e6d2ef40a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -45,6 +45,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index ec95c1253fad..e9a1391ec0de 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -70,6 +70,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 097ddbef7980..ebd1416c5bd5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -39,6 +39,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java index 27a4a9f25665..77ded60a4715 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Category.java @@ -28,6 +28,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index 9b61a2fa29b6..6d869993c196 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -30,6 +30,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index c20bc1460143..806094a98300 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 0e2aeaa78a22..b7fd007ab1d0 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 @@ -74,6 +74,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java index 51cc37bbeea7..cc8f667dbf05 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Name.java @@ -35,6 +35,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index d3674b6bdaa4..02620d045262 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -87,6 +87,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java index f10cff73bb78..fae0d6dac4ad 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -41,6 +41,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java index d2ae69a4e5a8..068f9dc83fd8 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -44,6 +44,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java index 7d50fcbc3ace..e28dd10f0a7e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java @@ -44,6 +44,22 @@ public class Animal { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link Animal#Animal(String)} + */ + @Deprecated + public Animal() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Animal(String className) { + this.className = className; + } + public Animal className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java index 5ed55f542ab1..bb4792650589 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java @@ -69,6 +69,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCat#BigCat(String)} + */ + @Deprecated + public BigCat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCat(String className) { + super(className); + } + public BigCat kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java index 8cd028aab21a..163822a26564 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Cat.java @@ -38,6 +38,22 @@ public class Cat extends Animal { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link Cat#Cat(String)} + */ + @Deprecated + public Cat() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Cat(String className) { + super(className); + } + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java index f7257c19d175..f781ae5574ce 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Category.java @@ -27,6 +27,22 @@ public class Category { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link Category#Category(String)} + */ + @Deprecated + public Category() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Category(String name) { + this.name = name; + } + public Category id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java index 880447cade4c..1ae16f68d796 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Dog.java @@ -29,6 +29,22 @@ public class Dog extends Animal { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link Dog#Dog(String)} + */ + @Deprecated + public Dog() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Dog(String className) { + super(className); + } + public Dog breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index 658f63037c8c..a9557c84a908 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -184,6 +184,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnum outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTest#EnumTest(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTest(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTest enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; 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 ea57de0367cc..e4ad2be91770 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 @@ -73,6 +73,25 @@ public class FormatTest { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTest#FormatTest(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTest(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTest integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java index 38efd12ee156..c765c47d4623 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Name.java @@ -34,6 +34,22 @@ public class Name { @JsonProperty("123Number") private Integer _123number; + /** + * Default constructor + * @deprecated Use {@link Name#Name(Integer)} + */ + @Deprecated + public Name() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Name(Integer name) { + this.name = name; + } + public Name name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index e5ae7ff02f41..acb4d1464eff 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -86,6 +86,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link Pet#Pet(String, Set)} + */ + @Deprecated + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public Pet id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java index faacdc8c3ead..4b652fe31706 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderDefault.java @@ -40,6 +40,26 @@ public class TypeHolderDefault { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefault() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefault stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java index 6b88530b5a7f..3bcd0c5f3891 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/TypeHolderExample.java @@ -43,6 +43,27 @@ public class TypeHolderExample { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExample() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExample stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot/.openapi-generator-ignore b/samples/server/petstore/springboot/.openapi-generator-ignore index 7484ee590a38..1bad35efe5d4 100644 --- a/samples/server/petstore/springboot/.openapi-generator-ignore +++ b/samples/server/petstore/springboot/.openapi-generator-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +src/test/java/org/openapitools/JacksonTest.java diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java deleted file mode 100644 index 8e4c17989762..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * AdditionalPropertiesAnyType - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesAnyType extends HashMap { - - @JsonProperty("name") - private String name; - - public AdditionalPropertiesAnyType name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesAnyType {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java deleted file mode 100644 index 27a8f01607f1..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * AdditionalPropertiesArray - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesArray extends HashMap { - - @JsonProperty("name") - private String name; - - public AdditionalPropertiesArray name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesArray {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java deleted file mode 100644 index bc7b87d760a9..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * AdditionalPropertiesBoolean - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesBoolean extends HashMap { - - @JsonProperty("name") - private String name; - - public AdditionalPropertiesBoolean name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesBoolean {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java deleted file mode 100644 index b5e88d5d7ccb..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ /dev/null @@ -1,400 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * AdditionalPropertiesClass - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesClass { - - @JsonProperty("map_string") - @Valid - private Map mapString = null; - - @JsonProperty("map_number") - @Valid - private Map mapNumber = null; - - @JsonProperty("map_integer") - @Valid - private Map mapInteger = null; - - @JsonProperty("map_boolean") - @Valid - private Map mapBoolean = null; - - @JsonProperty("map_array_integer") - @Valid - private Map> mapArrayInteger = null; - - @JsonProperty("map_array_anytype") - @Valid - private Map> mapArrayAnytype = null; - - @JsonProperty("map_map_string") - @Valid - private Map> mapMapString = null; - - @JsonProperty("map_map_anytype") - @Valid - private Map> mapMapAnytype = null; - - @JsonProperty("anytype_1") - private Object anytype1; - - @JsonProperty("anytype_2") - private Object anytype2; - - @JsonProperty("anytype_3") - private Object anytype3; - - public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; - return this; - } - - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); - } - this.mapString.put(key, mapStringItem); - return this; - } - - /** - * Get mapString - * @return mapString - */ - - @ApiModelProperty(value = "") - public Map getMapString() { - return mapString; - } - - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - return this; - } - - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); - } - this.mapNumber.put(key, mapNumberItem); - return this; - } - - /** - * Get mapNumber - * @return mapNumber - */ - @Valid - @ApiModelProperty(value = "") - public Map getMapNumber() { - return mapNumber; - } - - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - */ - - @ApiModelProperty(value = "") - public Map getMapInteger() { - return mapInteger; - } - - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - */ - - @ApiModelProperty(value = "") - public Map getMapBoolean() { - return mapBoolean; - } - - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - */ - @Valid - @ApiModelProperty(value = "") - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - */ - @Valid - @ApiModelProperty(value = "") - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - */ - @Valid - @ApiModelProperty(value = "") - public Map> getMapMapString() { - return mapMapString; - } - - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - */ - @Valid - @ApiModelProperty(value = "") - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - public AdditionalPropertiesClass anytype1(Object anytype1) { - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - */ - - @ApiModelProperty(value = "") - public Object getAnytype1() { - return anytype1; - } - - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - */ - - @ApiModelProperty(value = "") - public Object getAnytype2() { - return anytype2; - } - - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - public AdditionalPropertiesClass anytype3(Object anytype3) { - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - */ - - @ApiModelProperty(value = "") - public Object getAnytype3() { - return anytype3; - } - - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); - } - - @Override - public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java deleted file mode 100644 index 00b5174e93b7..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * AdditionalPropertiesInteger - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesInteger extends HashMap { - - @JsonProperty("name") - private String name; - - public AdditionalPropertiesInteger name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesInteger {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java deleted file mode 100644 index 8fec423ffb1b..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * AdditionalPropertiesNumber - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesNumber extends HashMap { - - @JsonProperty("name") - private String name; - - public AdditionalPropertiesNumber name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesNumber {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java deleted file mode 100644 index 67033332b0d6..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * AdditionalPropertiesObject - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesObject extends HashMap { - - @JsonProperty("name") - private String name; - - public AdditionalPropertiesObject name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesObject {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java deleted file mode 100644 index 993f83bb2cc1..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * AdditionalPropertiesString - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class AdditionalPropertiesString extends HashMap { - - @JsonProperty("name") - private String name; - - public AdditionalPropertiesString name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesString {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java deleted file mode 100644 index e11ae425d9e9..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.BigCat; -import org.openapitools.model.Cat; -import org.openapitools.model.Dog; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Animal - */ - -@JsonIgnoreProperties( - value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the className to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog") -}) - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Animal { - - @JsonProperty("className") - private String className; - - @JsonProperty("color") - private String color = "red"; - - public Animal className(String className) { - this.className = className; - return this; - } - - /** - * Get className - * @return className - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public String getClassName() { - return className; - } - - public void setClassName(String className) { - this.className = className; - } - - public Animal color(String color) { - this.color = color; - return this; - } - - /** - * Get color - * @return color - */ - - @ApiModelProperty(value = "") - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalDto.java index 3d6817c8f8ce..ac989cfb9c37 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/AnimalDto.java @@ -46,6 +46,22 @@ public class AnimalDto { @JsonProperty("color") private String color = "red"; + /** + * Default constructor + * @deprecated Use {@link AnimalDto#AnimalDto(String)} + */ + @Deprecated + public AnimalDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public AnimalDto(String className) { + this.className = className; + } + public AnimalDto className(String className) { this.className = className; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java deleted file mode 100644 index df67eda87fd1..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ArrayOfArrayOfNumberOnly - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfArrayOfNumberOnly { - - @JsonProperty("ArrayArrayNumber") - @Valid - private List> arrayArrayNumber = null; - - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList<>(); - } - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - /** - * Get arrayArrayNumber - * @return arrayArrayNumber - */ - @Valid - @ApiModelProperty(value = "") - public List> getArrayArrayNumber() { - return arrayArrayNumber; - } - - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java deleted file mode 100644 index 05f1ca376a68..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ArrayOfNumberOnly - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayOfNumberOnly { - - @JsonProperty("ArrayNumber") - @Valid - private List arrayNumber = null; - - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - return this; - } - - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList<>(); - } - this.arrayNumber.add(arrayNumberItem); - return this; - } - - /** - * Get arrayNumber - * @return arrayNumber - */ - @Valid - @ApiModelProperty(value = "") - public List getArrayNumber() { - return arrayNumber; - } - - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java deleted file mode 100644 index ba67885edc8a..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ArrayTest.java +++ /dev/null @@ -1,162 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.ReadOnlyFirst; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ArrayTest - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ArrayTest { - - @JsonProperty("array_of_string") - @Valid - private List arrayOfString = null; - - @JsonProperty("array_array_of_integer") - @Valid - private List> arrayArrayOfInteger = null; - - @JsonProperty("array_array_of_model") - @Valid - private List> arrayArrayOfModel = null; - - public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - return this; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList<>(); - } - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - /** - * Get arrayOfString - * @return arrayOfString - */ - - @ApiModelProperty(value = "") - public List getArrayOfString() { - return arrayOfString; - } - - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList<>(); - } - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger - */ - @Valid - @ApiModelProperty(value = "") - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList<>(); - } - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel - */ - @Valid - @ApiModelProperty(value = "") - public List> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java deleted file mode 100644 index ec95c1253fad..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java +++ /dev/null @@ -1,146 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.Cat; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCat - */ - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCat extends Cat { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("kind") - private KindEnum kind; - - public BigCat kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - public BigCat declawed(Boolean declawed) { - super.setDeclawed(declawed); - return this; - } - - public BigCat className(String className) { - super.setClassName(className); - return this; - } - - public BigCat color(String color) { - super.setColor(color); - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCat bigCat = (BigCat) o; - return Objects.equals(this.kind, bigCat.kind) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(kind, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 35ae937c0009..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("kind") - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatDto.java index 71217951e99e..dd08693ca408 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatDto.java @@ -72,6 +72,22 @@ public static KindEnum fromValue(String value) { @JsonProperty("kind") private KindEnum kind; + /** + * Default constructor + * @deprecated Use {@link BigCatDto#BigCatDto(String)} + */ + @Deprecated + public BigCatDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BigCatDto(String className) { + super(className); + } + public BigCatDto kind(KindEnum kind) { this.kind = kind; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java deleted file mode 100644 index e9cce9de0115..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Capitalization.java +++ /dev/null @@ -1,204 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Capitalization - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Capitalization { - - @JsonProperty("smallCamel") - private String smallCamel; - - @JsonProperty("CapitalCamel") - private String capitalCamel; - - @JsonProperty("small_Snake") - private String smallSnake; - - @JsonProperty("Capital_Snake") - private String capitalSnake; - - @JsonProperty("SCA_ETH_Flow_Points") - private String scAETHFlowPoints; - - @JsonProperty("ATT_NAME") - private String ATT_NAME; - - public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; - return this; - } - - /** - * Get smallCamel - * @return smallCamel - */ - - @ApiModelProperty(value = "") - public String getSmallCamel() { - return smallCamel; - } - - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - return this; - } - - /** - * Get capitalCamel - * @return capitalCamel - */ - - @ApiModelProperty(value = "") - public String getCapitalCamel() { - return capitalCamel; - } - - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; - return this; - } - - /** - * Get smallSnake - * @return smallSnake - */ - - @ApiModelProperty(value = "") - public String getSmallSnake() { - return smallSnake; - } - - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - return this; - } - - /** - * Get capitalSnake - * @return capitalSnake - */ - - @ApiModelProperty(value = "") - public String getCapitalSnake() { - return capitalSnake; - } - - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints - */ - - @ApiModelProperty(value = "") - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - return this; - } - - /** - * Name of the pet - * @return ATT_NAME - */ - - @ApiModelProperty(value = "Name of the pet ") - public String getATTNAME() { - return ATT_NAME; - } - - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java deleted file mode 100644 index 097ddbef7980..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Cat.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.Animal; -import org.openapitools.model.BigCat; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Cat - */ - -@JsonIgnoreProperties( - value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the className to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat") -}) - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Cat extends Animal { - - @JsonProperty("declawed") - private Boolean declawed; - - public Cat declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - public Cat className(String className) { - super.setClassName(className); - return this; - } - - public Cat color(String color) { - super.setColor(color); - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index eed74bea751a..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - @JsonProperty("declawed") - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java index 3d11bd7ba3aa..a990352b6073 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CatDto.java @@ -40,6 +40,22 @@ public class CatDto extends AnimalDto { @JsonProperty("declawed") private Boolean declawed; + /** + * Default constructor + * @deprecated Use {@link CatDto#CatDto(String)} + */ + @Deprecated + public CatDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CatDto(String className) { + super(className); + } + public CatDto declawed(Boolean declawed) { this.declawed = declawed; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java deleted file mode 100644 index 27a4a9f25665..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Category.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Category - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Category { - - @JsonProperty("id") - private Long id; - - @JsonProperty("name") - private String name = "default-name"; - - public Category id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @ApiModelProperty(value = "") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Category name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CategoryDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CategoryDto.java index b4475a45965b..557df9bb685d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CategoryDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/CategoryDto.java @@ -30,6 +30,22 @@ public class CategoryDto { @JsonProperty("name") private String name = "default-name"; + /** + * Default constructor + * @deprecated Use {@link CategoryDto#CategoryDto(String)} + */ + @Deprecated + public CategoryDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CategoryDto(String name) { + this.name = name; + } + public CategoryDto id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java deleted file mode 100644 index 69296da7e60e..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ClassModel.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Model for testing model with \"_class\" property - */ - -@ApiModel(description = "Model for testing model with \"_class\" property") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ClassModel { - - @JsonProperty("_class") - private String propertyClass; - - public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - */ - - @ApiModelProperty(value = "") - public String getPropertyClass() { - return propertyClass; - } - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java deleted file mode 100644 index b788daea14a3..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Client.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Client - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Client { - - @JsonProperty("client") - private String client; - - public Client client(String client) { - this.client = client; - return this; - } - - /** - * Get client - * @return client - */ - - @ApiModelProperty(value = "") - public String getClient() { - return client; - } - - public void setClient(String client) { - this.client = client; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); - } - - @Override - public int hashCode() { - return Objects.hash(client); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java deleted file mode 100644 index 9b61a2fa29b6..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Dog.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.Animal; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Dog - */ - - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Dog extends Animal { - - @JsonProperty("breed") - private String breed; - - public Dog breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - public Dog className(String className) { - super.setClassName(className); - return this; - } - - public Dog color(String color) { - super.setColor(color); - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 4f275e535333..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - @JsonProperty("breed") - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogDto.java index c93b73a0d1e3..44649549f191 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/DogDto.java @@ -32,6 +32,22 @@ public class DogDto extends AnimalDto { @JsonProperty("breed") private String breed; + /** + * Default constructor + * @deprecated Use {@link DogDto#DogDto(String)} + */ + @Deprecated + public DogDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DogDto(String className) { + super(className); + } + public DogDto breed(String breed) { this.breed = breed; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java deleted file mode 100644 index dba32cf2b710..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java +++ /dev/null @@ -1,190 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * EnumArrays - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumArrays { - - /** - * Gets or Sets justSymbol - */ - public enum JustSymbolEnum { - GREATER_THAN_OR_EQUAL_TO(">="), - - DOLLAR("$"); - - private String value; - - JustSymbolEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("just_symbol") - private JustSymbolEnum justSymbol; - - /** - * Gets or Sets arrayEnum - */ - public enum ArrayEnumEnum { - FISH("fish"), - - CRAB("crab"); - - private String value; - - ArrayEnumEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("array_enum") - @Valid - private List arrayEnum = null; - - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - return this; - } - - /** - * Get justSymbol - * @return justSymbol - */ - - @ApiModelProperty(value = "") - public JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - return this; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList<>(); - } - this.arrayEnum.add(arrayEnumItem); - return this; - } - - /** - * Get arrayEnum - * @return arrayEnum - */ - - @ApiModelProperty(value = "") - public List getArrayEnum() { - return arrayEnum; - } - - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java deleted file mode 100644 index c2abaaed4305..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets EnumClass - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public enum EnumClass { - - _ABC("_abc"), - - _EFG("-efg"), - - _XYZ_("(xyz)"); - - private String value; - - EnumClass(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java deleted file mode 100644 index c20bc1460143..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java +++ /dev/null @@ -1,328 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.model.OuterEnum; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * EnumTest - */ - -@JsonTypeName("Enum_Test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class EnumTest { - - /** - * Gets or Sets enumString - */ - public enum EnumStringEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private String value; - - EnumStringEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("enum_string") - private EnumStringEnum enumString; - - /** - * Gets or Sets enumStringRequired - */ - public enum EnumStringRequiredEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private String value; - - EnumStringRequiredEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("enum_string_required") - private EnumStringRequiredEnum enumStringRequired; - - /** - * Gets or Sets enumInteger - */ - public enum EnumIntegerEnum { - NUMBER_1(1), - - NUMBER_MINUS_1(-1); - - private Integer value; - - EnumIntegerEnum(Integer value) { - this.value = value; - } - - @JsonValue - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("enum_integer") - private EnumIntegerEnum enumInteger; - - /** - * Gets or Sets enumNumber - */ - public enum EnumNumberEnum { - NUMBER_1_DOT_1(1.1), - - NUMBER_MINUS_1_DOT_2(-1.2); - - private Double value; - - EnumNumberEnum(Double value) { - this.value = value; - } - - @JsonValue - public Double getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("enum_number") - private EnumNumberEnum enumNumber; - - @JsonProperty("outerEnum") - private OuterEnum outerEnum; - - public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; - return this; - } - - /** - * Get enumString - * @return enumString - */ - - @ApiModelProperty(value = "") - public EnumStringEnum getEnumString() { - return enumString; - } - - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - return this; - } - - /** - * Get enumStringRequired - * @return enumStringRequired - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - return this; - } - - /** - * Get enumInteger - * @return enumInteger - */ - - @ApiModelProperty(value = "") - public EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - return this; - } - - /** - * Get enumNumber - * @return enumNumber - */ - - @ApiModelProperty(value = "") - public EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - return this; - } - - /** - * Get outerEnum - * @return outerEnum - */ - @Valid - @ApiModelProperty(value = "") - public OuterEnum getOuterEnum() { - return outerEnum; - } - - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); - sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); - sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java index a1865db759b9..ddf3979b7b2f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTestDto.java @@ -185,6 +185,22 @@ public static EnumNumberEnum fromValue(Double value) { @JsonProperty("outerEnum") private OuterEnumDto outerEnum; + /** + * Default constructor + * @deprecated Use {@link EnumTestDto#EnumTestDto(EnumStringRequiredEnum)} + */ + @Deprecated + public EnumTestDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EnumTestDto(EnumStringRequiredEnum enumStringRequired) { + this.enumStringRequired = enumStringRequired; + } + public EnumTestDto enumString(EnumStringEnum enumString) { this.enumString = enumString; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java deleted file mode 100644 index d82e4902623d..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/File.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Must be named `File` for test. - */ - -@ApiModel(description = "Must be named `File` for test.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class File { - - @JsonProperty("sourceURI") - private String sourceURI; - - public File sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - /** - * Test capitalization - * @return sourceURI - */ - - @ApiModelProperty(value = "Test capitalization") - public String getSourceURI() { - return sourceURI; - } - - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - File file = (File) o; - return Objects.equals(this.sourceURI, file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class File {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java deleted file mode 100644 index 2ea153bd6468..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * FileSchemaTestClass - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FileSchemaTestClass { - - @JsonProperty("file") - private File file; - - @JsonProperty("files") - @Valid - private List files = null; - - public FileSchemaTestClass file(File file) { - this.file = file; - return this; - } - - /** - * Get file - * @return file - */ - @Valid - @ApiModelProperty(value = "") - public File getFile() { - return file; - } - - public void setFile(File file) { - this.file = file; - } - - public FileSchemaTestClass files(List files) { - this.files = files; - return this; - } - - public FileSchemaTestClass addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Get files - * @return files - */ - @Valid - @ApiModelProperty(value = "") - public List getFiles() { - return files; - } - - public void setFiles(List files) { - this.files = files; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this.file, fileSchemaTestClass.file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(file, files); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - 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 deleted file mode 100644 index 0e2aeaa78a22..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTest.java +++ /dev/null @@ -1,416 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.springframework.format.annotation.DateTimeFormat; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * FormatTest - */ - -@JsonTypeName("format_test") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class FormatTest { - - @JsonProperty("integer") - private Integer integer; - - @JsonProperty("int32") - private Integer int32; - - @JsonProperty("int64") - private Long int64; - - @JsonProperty("number") - private BigDecimal number; - - @JsonProperty("float") - private Float _float; - - @JsonProperty("double") - private Double _double; - - @JsonProperty("string") - private String string; - - @JsonProperty("byte") - private byte[] _byte; - - @JsonProperty("binary") - private org.springframework.core.io.Resource binary; - - @JsonProperty("date") - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; - - @JsonProperty("dateTime") - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private OffsetDateTime dateTime; - - @JsonProperty("uuid") - private UUID uuid; - - @JsonProperty("password") - private String password; - - @JsonProperty("BigDecimal") - private BigDecimal bigDecimal; - - public FormatTest integer(Integer integer) { - this.integer = integer; - return this; - } - - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer - */ - @Min(10) @Max(100) - @ApiModelProperty(value = "") - public Integer getInteger() { - return integer; - } - - public void setInteger(Integer integer) { - this.integer = integer; - } - - public FormatTest int32(Integer int32) { - this.int32 = int32; - return this; - } - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 - */ - @Min(20) @Max(200) - @ApiModelProperty(value = "") - public Integer getInt32() { - return int32; - } - - public void setInt32(Integer int32) { - this.int32 = int32; - } - - public FormatTest int64(Long int64) { - this.int64 = int64; - return this; - } - - /** - * Get int64 - * @return int64 - */ - - @ApiModelProperty(value = "") - public Long getInt64() { - return int64; - } - - public void setInt64(Long int64) { - this.int64 = int64; - } - - public FormatTest number(BigDecimal number) { - this.number = number; - return this; - } - - /** - * Get number - * minimum: 32.1 - * maximum: 543.2 - * @return number - */ - @NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") - @ApiModelProperty(required = true, value = "") - public BigDecimal getNumber() { - return number; - } - - public void setNumber(BigDecimal number) { - this.number = number; - } - - public FormatTest _float(Float _float) { - this._float = _float; - return this; - } - - /** - * Get _float - * minimum: 54.3 - * maximum: 987.6 - * @return _float - */ - @DecimalMin("54.3") @DecimalMax("987.6") - @ApiModelProperty(value = "") - public Float getFloat() { - return _float; - } - - public void setFloat(Float _float) { - this._float = _float; - } - - public FormatTest _double(Double _double) { - this._double = _double; - return this; - } - - /** - * Get _double - * minimum: 67.8 - * maximum: 123.4 - * @return _double - */ - @DecimalMin("67.8") @DecimalMax("123.4") - @ApiModelProperty(value = "") - public Double getDouble() { - return _double; - } - - public void setDouble(Double _double) { - this._double = _double; - } - - public FormatTest string(String string) { - this.string = string; - return this; - } - - /** - * Get string - * @return string - */ - @Pattern(regexp = "/[a-z]/i") - @ApiModelProperty(value = "") - public String getString() { - return string; - } - - public void setString(String string) { - this.string = string; - } - - public FormatTest _byte(byte[] _byte) { - this._byte = _byte; - return this; - } - - /** - * Get _byte - * @return _byte - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public byte[] getByte() { - return _byte; - } - - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - public FormatTest binary(org.springframework.core.io.Resource binary) { - this.binary = binary; - return this; - } - - /** - * Get binary - * @return binary - */ - @Valid - @ApiModelProperty(value = "") - public org.springframework.core.io.Resource getBinary() { - return binary; - } - - public void setBinary(org.springframework.core.io.Resource binary) { - this.binary = binary; - } - - public FormatTest date(LocalDate date) { - this.date = date; - return this; - } - - /** - * Get date - * @return date - */ - @NotNull @Valid - @ApiModelProperty(required = true, value = "") - public LocalDate getDate() { - return date; - } - - public void setDate(LocalDate date) { - this.date = date; - } - - public FormatTest dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - */ - @Valid - @ApiModelProperty(value = "") - public OffsetDateTime getDateTime() { - return dateTime; - } - - public void setDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - public FormatTest uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - */ - @Valid - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - public UUID getUuid() { - return uuid; - } - - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - public FormatTest password(String password) { - this.password = password; - return this; - } - - /** - * Get password - * @return password - */ - @NotNull @Size(min = 10, max = 64) - @ApiModelProperty(required = true, value = "") - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - return this; - } - - /** - * Get bigDecimal - * @return bigDecimal - */ - @Valid - @ApiModelProperty(value = "") - public BigDecimal getBigDecimal() { - return bigDecimal; - } - - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java index 03b844ee81e7..9958d734539c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/FormatTestDto.java @@ -74,6 +74,25 @@ public class FormatTestDto { @JsonProperty("BigDecimal") private BigDecimal bigDecimal; + /** + * Default constructor + * @deprecated Use {@link FormatTestDto#FormatTestDto(BigDecimal, byte[], LocalDate, String)} + */ + @Deprecated + public FormatTestDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FormatTestDto(BigDecimal number, byte[] _byte, LocalDate date, String password) { + this.number = number; + this._byte = _byte; + this.date = date; + this.password = password; + } + public FormatTestDto integer(Integer integer) { this.integer = integer; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java deleted file mode 100644 index 224b16d1a2d3..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * HasOnlyReadOnly - */ - -@JsonTypeName("hasOnlyReadOnly") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class HasOnlyReadOnly { - - @JsonProperty("bar") - private String bar; - - @JsonProperty("foo") - private String foo; - - public HasOnlyReadOnly bar(String bar) { - this.bar = bar; - return this; - } - - /** - * Get bar - * @return bar - */ - - @ApiModelProperty(readOnly = true, value = "") - public String getBar() { - return bar; - } - - public void setBar(String bar) { - this.bar = bar; - } - - public HasOnlyReadOnly foo(String foo) { - this.foo = foo; - return this; - } - - /** - * Get foo - * @return foo - */ - - @ApiModelProperty(readOnly = true, value = "") - public String getFoo() { - return foo; - } - - public void setFoo(String foo) { - this.foo = foo; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java deleted file mode 100644 index f2867ac50403..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ /dev/null @@ -1,230 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * MapTest - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MapTest { - - @JsonProperty("map_map_of_string") - @Valid - private Map> mapMapOfString = null; - - /** - * Gets or Sets inner - */ - public enum InnerEnum { - UPPER("UPPER"), - - LOWER("lower"); - - private String value; - - InnerEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("map_of_enum_string") - @Valid - private Map mapOfEnumString = null; - - @JsonProperty("direct_map") - @Valid - private Map directMap = null; - - @JsonProperty("indirect_map") - @Valid - private Map indirectMap = null; - - public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - return this; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap<>(); - } - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - /** - * Get mapMapOfString - * @return mapMapOfString - */ - @Valid - @ApiModelProperty(value = "") - public Map> getMapMapOfString() { - return mapMapOfString; - } - - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - return this; - } - - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap<>(); - } - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - /** - * Get mapOfEnumString - * @return mapOfEnumString - */ - - @ApiModelProperty(value = "") - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - public MapTest directMap(Map directMap) { - this.directMap = directMap; - return this; - } - - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap<>(); - } - this.directMap.put(key, directMapItem); - return this; - } - - /** - * Get directMap - * @return directMap - */ - - @ApiModelProperty(value = "") - public Map getDirectMap() { - return directMap; - } - - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - return this; - } - - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap<>(); - } - this.indirectMap.put(key, indirectMapItem); - return this; - } - - /** - * Get indirectMap - * @return indirectMap - */ - - @ApiModelProperty(value = "") - public Map getIndirectMap() { - return indirectMap; - } - - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java deleted file mode 100644 index 901c65b2924d..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.openapitools.model.Animal; -import org.springframework.format.annotation.DateTimeFormat; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * MixedPropertiesAndAdditionalPropertiesClass - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { - - @JsonProperty("uuid") - private UUID uuid; - - @JsonProperty("dateTime") - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private OffsetDateTime dateTime; - - @JsonProperty("map") - @Valid - private Map map = null; - - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - */ - @Valid - @ApiModelProperty(value = "") - public UUID getUuid() { - return uuid; - } - - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - */ - @Valid - @ApiModelProperty(value = "") - public OffsetDateTime getDateTime() { - return dateTime; - } - - public void setDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - if (this.map == null) { - this.map = new HashMap<>(); - } - this.map.put(key, mapItem); - return this; - } - - /** - * Get map - * @return map - */ - @Valid - @ApiModelProperty(value = "") - public Map getMap() { - return map; - } - - public void setMap(Map map) { - this.map = map; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java deleted file mode 100644 index b7484deccc24..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Model200Response.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Model for testing model name starting with number - */ - -@ApiModel(description = "Model for testing model name starting with number") -@JsonTypeName("200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Model200Response { - - @JsonProperty("name") - private Integer name; - - @JsonProperty("class") - private String propertyClass; - - public Model200Response name(Integer name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public Integer getName() { - return name; - } - - public void setName(Integer name) { - this.name = name; - } - - public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - */ - - @ApiModelProperty(value = "") - public String getPropertyClass() { - return propertyClass; - } - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200Response = (Model200Response) o; - return Objects.equals(this.name, _200Response.name) && - Objects.equals(this.propertyClass, _200Response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java deleted file mode 100644 index dfba6cb672d4..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelApiResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ModelApiResponse - */ - -@JsonTypeName("ApiResponse") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelApiResponse { - - @JsonProperty("code") - private Integer code; - - @JsonProperty("type") - private String type; - - @JsonProperty("message") - private String message; - - public ModelApiResponse code(Integer code) { - this.code = code; - return this; - } - - /** - * Get code - * @return code - */ - - @ApiModelProperty(value = "") - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public ModelApiResponse type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - - @ApiModelProperty(value = "") - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public ModelApiResponse message(String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @ApiModelProperty(value = "") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelFile.java deleted file mode 100644 index d61b764d4be1..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelFile.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; - -/** - * Must be named `File` for test. - */ -@ApiModel(description = "Must be named `File` for test.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelFile { - @JsonProperty("sourceURI") - private String sourceURI; - - public ModelFile sourceURI(String sourceURI) { - this.sourceURI = sourceURI; - return this; - } - - /** - * Test capitalization - * @return sourceURI - */ - @ApiModelProperty(value = "Test capitalization") - - - public String getSourceURI() { - return sourceURI; - } - - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelFile {\n"); - - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java deleted file mode 100644 index 4bb0e66c8673..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelList.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ModelList - */ - -@JsonTypeName("List") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelList { - - @JsonProperty("123-list") - private String _123List; - - public ModelList _123List(String _123List) { - this._123List = _123List; - return this; - } - - /** - * Get _123List - * @return _123List - */ - - @ApiModelProperty(value = "") - public String get123List() { - return _123List; - } - - public void set123List(String _123List) { - this._123List = _123List; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123List, _list._123List); - } - - @Override - public int hashCode() { - return Objects.hash(_123List); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelList {\n"); - sb.append(" _123List: ").append(toIndentedString(_123List)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java deleted file mode 100644 index 4505ddfeeeca..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ModelReturn.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Model for testing reserved words - */ - -@ApiModel(description = "Model for testing reserved words") -@JsonTypeName("Return") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ModelReturn { - - @JsonProperty("return") - private Integer _return; - - public ModelReturn _return(Integer _return) { - this._return = _return; - return this; - } - - /** - * Get _return - * @return _return - */ - - @ApiModelProperty(value = "") - public Integer getReturn() { - return _return; - } - - public void setReturn(Integer _return) { - this._return = _return; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); - } - - @Override - public int hashCode() { - return Objects.hash(_return); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java deleted file mode 100644 index 41a7593f0efc..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Name.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Model for testing model name same as property name - */ - -@ApiModel(description = "Model for testing model name same as property name") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Name { - - @JsonProperty("name") - private Integer name; - - @JsonProperty("snake_case") - private Integer snakeCase; - - @JsonProperty("property") - private String property; - - @JsonProperty("123Number") - private Integer _123Number; - - public Name name(Integer name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public Integer getName() { - return name; - } - - public void setName(Integer name) { - this.name = name; - } - - public Name snakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - return this; - } - - /** - * Get snakeCase - * @return snakeCase - */ - - @ApiModelProperty(readOnly = true, value = "") - public Integer getSnakeCase() { - return snakeCase; - } - - public void setSnakeCase(Integer snakeCase) { - this.snakeCase = snakeCase; - } - - public Name property(String property) { - this.property = property; - return this; - } - - /** - * Get property - * @return property - */ - - @ApiModelProperty(value = "") - public String getProperty() { - return property; - } - - public void setProperty(String property) { - this.property = property; - } - - public Name _123Number(Integer _123Number) { - this._123Number = _123Number; - return this; - } - - /** - * Get _123Number - * @return _123Number - */ - - @ApiModelProperty(readOnly = true, value = "") - public Integer get123Number() { - return _123Number; - } - - public void set123Number(Integer _123Number) { - this._123Number = _123Number; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123Number, name._123Number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123Number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123Number: ").append(toIndentedString(_123Number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NameDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NameDto.java index 7cc3de50b3dc..1428f8ee913b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NameDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NameDto.java @@ -37,6 +37,22 @@ public class NameDto { @JsonProperty("123Number") private Integer _123Number; + /** + * Default constructor + * @deprecated Use {@link NameDto#NameDto(Integer)} + */ + @Deprecated + public NameDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public NameDto(Integer name) { + this.name = name; + } + public NameDto name(Integer name) { this.name = name; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java deleted file mode 100644 index 278146bfb899..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/NumberOnly.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * NumberOnly - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NumberOnly { - - @JsonProperty("JustNumber") - private BigDecimal justNumber; - - public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - return this; - } - - /** - * Get justNumber - * @return justNumber - */ - @Valid - @ApiModelProperty(value = "") - public BigDecimal getJustNumber() { - return justNumber; - } - - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - - @Override - public int hashCode() { - return Objects.hash(justNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java deleted file mode 100644 index 9a9ed4f6c960..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import org.springframework.format.annotation.DateTimeFormat; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Order - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Order { - - @JsonProperty("id") - private Long id; - - @JsonProperty("petId") - private Long petId; - - @JsonProperty("quantity") - private Integer quantity; - - @JsonProperty("shipDate") - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private OffsetDateTime shipDate; - - /** - * Order Status - */ - public enum StatusEnum { - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("status") - private StatusEnum status; - - @JsonProperty("complete") - private Boolean complete = false; - - public Order id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @ApiModelProperty(value = "") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Order petId(Long petId) { - this.petId = petId; - return this; - } - - /** - * Get petId - * @return petId - */ - - @ApiModelProperty(value = "") - public Long getPetId() { - return petId; - } - - public void setPetId(Long petId) { - this.petId = petId; - } - - public Order quantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - */ - - @ApiModelProperty(value = "") - public Integer getQuantity() { - return quantity; - } - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - public Order shipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; - return this; - } - - /** - * Get shipDate - * @return shipDate - */ - @Valid - @ApiModelProperty(value = "") - public OffsetDateTime getShipDate() { - return shipDate; - } - - public void setShipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; - } - - public Order status(StatusEnum status) { - this.status = status; - return this; - } - - /** - * Order Status - * @return status - */ - - @ApiModelProperty(value = "Order Status") - public StatusEnum getStatus() { - return status; - } - - public void setStatus(StatusEnum status) { - this.status = status; - } - - public Order complete(Boolean complete) { - this.complete = complete; - return this; - } - - /** - * Get complete - * @return complete - */ - - @ApiModelProperty(value = "") - public Boolean getComplete() { - return complete; - } - - public void setComplete(Boolean complete) { - this.complete = complete; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java deleted file mode 100644 index c1a709bb26ad..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterComposite.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OuterComposite - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OuterComposite { - - @JsonProperty("my_number") - private BigDecimal myNumber; - - @JsonProperty("my_string") - private String myString; - - @JsonProperty("my_boolean") - private Boolean myBoolean; - - public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - return this; - } - - /** - * Get myNumber - * @return myNumber - */ - @Valid - @ApiModelProperty(value = "") - public BigDecimal getMyNumber() { - return myNumber; - } - - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - public OuterComposite myString(String myString) { - this.myString = myString; - return this; - } - - /** - * Get myString - * @return myString - */ - - @ApiModelProperty(value = "") - public String getMyString() { - return myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } - - public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - return this; - } - - /** - * Get myBoolean - * @return myBoolean - */ - - @ApiModelProperty(value = "") - public Boolean getMyBoolean() { - return myBoolean; - } - - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java deleted file mode 100644 index 1f09d0a5d17a..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnum - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public enum OuterEnum { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java deleted file mode 100644 index 4d705acedcd2..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ /dev/null @@ -1,265 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import org.openapitools.model.Category; -import org.openapitools.model.Tag; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Pet - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Pet { - - @JsonProperty("id") - private Long id; - - @JsonProperty("category") - private Category category; - - @JsonProperty("name") - private String name; - - @JsonProperty("photoUrls") - @Valid - private Set photoUrls = new LinkedHashSet<>(); - - @JsonProperty("tags") - @Valid - private List tags = null; - - /** - * pet status in the store - */ - public enum StatusEnum { - AVAILABLE("available"), - - PENDING("pending"), - - SOLD("sold"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("status") - private StatusEnum status; - - public Pet id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @ApiModelProperty(value = "") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Pet category(Category category) { - this.category = category; - return this; - } - - /** - * Get category - * @return category - */ - @Valid - @ApiModelProperty(value = "") - public Category getCategory() { - return category; - } - - public void setCategory(Category category) { - this.category = category; - } - - public Pet name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Pet photoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - return this; - } - - public Pet addPhotoUrlsItem(String photoUrlsItem) { - this.photoUrls.add(photoUrlsItem); - return this; - } - - /** - * Get photoUrls - * @return photoUrls - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public Set getPhotoUrls() { - return photoUrls; - } - - @JsonDeserialize(as = LinkedHashSet.class) - public void setPhotoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - } - - public Pet tags(List tags) { - this.tags = tags; - return this; - } - - public Pet addTagsItem(Tag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - */ - @Valid - @ApiModelProperty(value = "") - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public Pet status(StatusEnum status) { - this.status = status; - return this; - } - - /** - * pet status in the store - * @return status - */ - - @ApiModelProperty(value = "pet status in the store") - public StatusEnum getStatus() { - return status; - } - - public void setStatus(StatusEnum status) { - this.status = status; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java index b0de266bac95..2a8f59a30af2 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java @@ -89,6 +89,23 @@ public static StatusEnum fromValue(String value) { @JsonProperty("status") private StatusEnum status; + /** + * Default constructor + * @deprecated Use {@link PetDto#PetDto(String, Set)} + */ + @Deprecated + public PetDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PetDto(String name, Set photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + public PetDto id(Long id) { this.id = id; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java deleted file mode 100644 index b7a0a416782e..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ReadOnlyFirst - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ReadOnlyFirst { - - @JsonProperty("bar") - private String bar; - - @JsonProperty("baz") - private String baz; - - public ReadOnlyFirst bar(String bar) { - this.bar = bar; - return this; - } - - /** - * Get bar - * @return bar - */ - - @ApiModelProperty(readOnly = true, value = "") - public String getBar() { - return bar; - } - - public void setBar(String bar) { - this.bar = bar; - } - - public ReadOnlyFirst baz(String baz) { - this.baz = baz; - return this; - } - - /** - * Get baz - * @return baz - */ - - @ApiModelProperty(value = "") - public String getBaz() { - return baz; - } - - public void setBaz(String baz) { - this.baz = baz; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); - } - - @Override - public int hashCode() { - return Objects.hash(bar, baz); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java deleted file mode 100644 index 62a433154987..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/SpecialModelName.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * SpecialModelName - */ - -@JsonTypeName("$special[model.name]") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class SpecialModelName { - - @JsonProperty("$special[property.name]") - private Long $SpecialPropertyName; - - public SpecialModelName $SpecialPropertyName(Long $SpecialPropertyName) { - this.$SpecialPropertyName = $SpecialPropertyName; - return this; - } - - /** - * Get $SpecialPropertyName - * @return $SpecialPropertyName - */ - - @ApiModelProperty(value = "") - public Long get$SpecialPropertyName() { - return $SpecialPropertyName; - } - - public void set$SpecialPropertyName(Long $SpecialPropertyName) { - this.$SpecialPropertyName = $SpecialPropertyName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName $SpecialModelName = (SpecialModelName) o; - return Objects.equals(this.$SpecialPropertyName, $SpecialModelName.$SpecialPropertyName); - } - - @Override - public int hashCode() { - return Objects.hash($SpecialPropertyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - sb.append(" $SpecialPropertyName: ").append(toIndentedString($SpecialPropertyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java deleted file mode 100644 index 6161be4a9229..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Tag.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Tag - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class Tag { - - @JsonProperty("id") - private Long id; - - @JsonProperty("name") - private String name; - - public Tag id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @ApiModelProperty(value = "") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Tag name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - - @ApiModelProperty(value = "") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java deleted file mode 100644 index f10cff73bb78..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ /dev/null @@ -1,189 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * TypeHolderDefault - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderDefault { - - @JsonProperty("string_item") - private String stringItem = "what"; - - @JsonProperty("number_item") - private BigDecimal numberItem; - - @JsonProperty("integer_item") - private Integer integerItem; - - @JsonProperty("bool_item") - private Boolean boolItem = true; - - @JsonProperty("array_item") - @Valid - private List arrayItem = new ArrayList<>(); - - public TypeHolderDefault stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public String getStringItem() { - return stringItem; - } - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - public TypeHolderDefault numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - */ - @NotNull @Valid - @ApiModelProperty(required = true, value = "") - public BigDecimal getNumberItem() { - return numberItem; - } - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - public TypeHolderDefault integerItem(Integer integerItem) { - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public Integer getIntegerItem() { - return integerItem; - } - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - public TypeHolderDefault boolItem(Boolean boolItem) { - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public Boolean getBoolItem() { - return boolItem; - } - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - public TypeHolderDefault arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - */ - @NotNull - @ApiModelProperty(required = true, value = "") - public List getArrayItem() { - return arrayItem; - } - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; - return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && - Objects.equals(this.numberItem, typeHolderDefault.numberItem) && - Objects.equals(this.integerItem, typeHolderDefault.integerItem) && - Objects.equals(this.boolItem, typeHolderDefault.boolItem) && - Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java index 697f32570a97..33a4f10606cc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java @@ -43,6 +43,26 @@ public class TypeHolderDefaultDto { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderDefaultDto#TypeHolderDefaultDto(String, BigDecimal, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderDefaultDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderDefaultDto(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderDefaultDto stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java deleted file mode 100644 index d2ae69a4e5a8..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExample.java +++ /dev/null @@ -1,213 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * TypeHolderExample - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class TypeHolderExample { - - @JsonProperty("string_item") - private String stringItem; - - @JsonProperty("number_item") - private BigDecimal numberItem; - - @JsonProperty("float_item") - private Float floatItem; - - @JsonProperty("integer_item") - private Integer integerItem; - - @JsonProperty("bool_item") - private Boolean boolItem; - - @JsonProperty("array_item") - @Valid - private List arrayItem = new ArrayList<>(); - - public TypeHolderExample stringItem(String stringItem) { - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - */ - @NotNull - @ApiModelProperty(example = "what", required = true, value = "") - public String getStringItem() { - return stringItem; - } - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - public TypeHolderExample numberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - */ - @NotNull @Valid - @ApiModelProperty(example = "1.234", required = true, value = "") - public BigDecimal getNumberItem() { - return numberItem; - } - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - public TypeHolderExample floatItem(Float floatItem) { - this.floatItem = floatItem; - return this; - } - - /** - * Get floatItem - * @return floatItem - */ - @NotNull - @ApiModelProperty(example = "1.234", required = true, value = "") - public Float getFloatItem() { - return floatItem; - } - - public void setFloatItem(Float floatItem) { - this.floatItem = floatItem; - } - - public TypeHolderExample integerItem(Integer integerItem) { - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - */ - @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") - public Integer getIntegerItem() { - return integerItem; - } - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - public TypeHolderExample boolItem(Boolean boolItem) { - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - */ - @NotNull - @ApiModelProperty(example = "true", required = true, value = "") - public Boolean getBoolItem() { - return boolItem; - } - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - public TypeHolderExample arrayItem(List arrayItem) { - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - */ - @NotNull - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - public List getArrayItem() { - return arrayItem; - } - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderExample typeHolderExample = (TypeHolderExample) o; - return Objects.equals(this.stringItem, typeHolderExample.stringItem) && - Objects.equals(this.numberItem, typeHolderExample.numberItem) && - Objects.equals(this.floatItem, typeHolderExample.floatItem) && - Objects.equals(this.integerItem, typeHolderExample.integerItem) && - Objects.equals(this.boolItem, typeHolderExample.boolItem) && - Objects.equals(this.arrayItem, typeHolderExample.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java index ee81816ad629..396dab179f4f 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/TypeHolderExampleDto.java @@ -46,6 +46,27 @@ public class TypeHolderExampleDto { @Valid private List arrayItem = new ArrayList<>(); + /** + * Default constructor + * @deprecated Use {@link TypeHolderExampleDto#TypeHolderExampleDto(String, BigDecimal, Float, Integer, Boolean, List)} + */ + @Deprecated + public TypeHolderExampleDto() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TypeHolderExampleDto(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List arrayItem) { + this.stringItem = stringItem; + this.numberItem = numberItem; + this.floatItem = floatItem; + this.integerItem = integerItem; + this.boolItem = boolItem; + this.arrayItem = arrayItem; + } + public TypeHolderExampleDto stringItem(String stringItem) { this.stringItem = stringItem; return this; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java deleted file mode 100644 index ec85459bc99a..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/User.java +++ /dev/null @@ -1,252 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * User - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class User { - - @JsonProperty("id") - private Long id; - - @JsonProperty("username") - private String username; - - @JsonProperty("firstName") - private String firstName; - - @JsonProperty("lastName") - private String lastName; - - @JsonProperty("email") - private String email; - - @JsonProperty("password") - private String password; - - @JsonProperty("phone") - private String phone; - - @JsonProperty("userStatus") - private Integer userStatus; - - public User id(Long id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - - @ApiModelProperty(value = "") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public User username(String username) { - this.username = username; - return this; - } - - /** - * Get username - * @return username - */ - - @ApiModelProperty(value = "") - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public User firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - */ - - @ApiModelProperty(value = "") - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public User lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - */ - - @ApiModelProperty(value = "") - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public User email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - - @ApiModelProperty(value = "") - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public User password(String password) { - this.password = password; - return this; - } - - /** - * Get password - * @return password - */ - - @ApiModelProperty(value = "") - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public User phone(String phone) { - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - */ - - @ApiModelProperty(value = "") - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public User userStatus(Integer userStatus) { - this.userStatus = userStatus; - return this; - } - - /** - * User Status - * @return userStatus - */ - - @ApiModelProperty(value = "User Status") - public Integer getUserStatus() { - return userStatus; - } - - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java deleted file mode 100644 index 27d5f8282818..000000000000 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/XmlItem.java +++ /dev/null @@ -1,840 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * XmlItem - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class XmlItem { - - @JsonProperty("attribute_string") - private String attributeString; - - @JsonProperty("attribute_number") - private BigDecimal attributeNumber; - - @JsonProperty("attribute_integer") - private Integer attributeInteger; - - @JsonProperty("attribute_boolean") - private Boolean attributeBoolean; - - @JsonProperty("wrapped_array") - @Valid - private List wrappedArray = null; - - @JsonProperty("name_string") - private String nameString; - - @JsonProperty("name_number") - private BigDecimal nameNumber; - - @JsonProperty("name_integer") - private Integer nameInteger; - - @JsonProperty("name_boolean") - private Boolean nameBoolean; - - @JsonProperty("name_array") - @Valid - private List nameArray = null; - - @JsonProperty("name_wrapped_array") - @Valid - private List nameWrappedArray = null; - - @JsonProperty("prefix_string") - private String prefixString; - - @JsonProperty("prefix_number") - private BigDecimal prefixNumber; - - @JsonProperty("prefix_integer") - private Integer prefixInteger; - - @JsonProperty("prefix_boolean") - private Boolean prefixBoolean; - - @JsonProperty("prefix_array") - @Valid - private List prefixArray = null; - - @JsonProperty("prefix_wrapped_array") - @Valid - private List prefixWrappedArray = null; - - @JsonProperty("namespace_string") - private String namespaceString; - - @JsonProperty("namespace_number") - private BigDecimal namespaceNumber; - - @JsonProperty("namespace_integer") - private Integer namespaceInteger; - - @JsonProperty("namespace_boolean") - private Boolean namespaceBoolean; - - @JsonProperty("namespace_array") - @Valid - private List namespaceArray = null; - - @JsonProperty("namespace_wrapped_array") - @Valid - private List namespaceWrappedArray = null; - - @JsonProperty("prefix_ns_string") - private String prefixNsString; - - @JsonProperty("prefix_ns_number") - private BigDecimal prefixNsNumber; - - @JsonProperty("prefix_ns_integer") - private Integer prefixNsInteger; - - @JsonProperty("prefix_ns_boolean") - private Boolean prefixNsBoolean; - - @JsonProperty("prefix_ns_array") - @Valid - private List prefixNsArray = null; - - @JsonProperty("prefix_ns_wrapped_array") - @Valid - private List prefixNsWrappedArray = null; - - public XmlItem attributeString(String attributeString) { - this.attributeString = attributeString; - return this; - } - - /** - * Get attributeString - * @return attributeString - */ - - @ApiModelProperty(example = "string", value = "") - public String getAttributeString() { - return attributeString; - } - - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - public XmlItem attributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - return this; - } - - /** - * Get attributeNumber - * @return attributeNumber - */ - @Valid - @ApiModelProperty(example = "1.234", value = "") - public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - public XmlItem attributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - return this; - } - - /** - * Get attributeInteger - * @return attributeInteger - */ - - @ApiModelProperty(example = "-2", value = "") - public Integer getAttributeInteger() { - return attributeInteger; - } - - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - public XmlItem attributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - return this; - } - - /** - * Get attributeBoolean - * @return attributeBoolean - */ - - @ApiModelProperty(example = "true", value = "") - public Boolean getAttributeBoolean() { - return attributeBoolean; - } - - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - public XmlItem wrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - return this; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList<>(); - } - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - /** - * Get wrappedArray - * @return wrappedArray - */ - - @ApiModelProperty(value = "") - public List getWrappedArray() { - return wrappedArray; - } - - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - public XmlItem nameString(String nameString) { - this.nameString = nameString; - return this; - } - - /** - * Get nameString - * @return nameString - */ - - @ApiModelProperty(example = "string", value = "") - public String getNameString() { - return nameString; - } - - public void setNameString(String nameString) { - this.nameString = nameString; - } - - public XmlItem nameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - return this; - } - - /** - * Get nameNumber - * @return nameNumber - */ - @Valid - @ApiModelProperty(example = "1.234", value = "") - public BigDecimal getNameNumber() { - return nameNumber; - } - - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - public XmlItem nameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - return this; - } - - /** - * Get nameInteger - * @return nameInteger - */ - - @ApiModelProperty(example = "-2", value = "") - public Integer getNameInteger() { - return nameInteger; - } - - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - public XmlItem nameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - return this; - } - - /** - * Get nameBoolean - * @return nameBoolean - */ - - @ApiModelProperty(example = "true", value = "") - public Boolean getNameBoolean() { - return nameBoolean; - } - - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - public XmlItem nameArray(List nameArray) { - this.nameArray = nameArray; - return this; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList<>(); - } - this.nameArray.add(nameArrayItem); - return this; - } - - /** - * Get nameArray - * @return nameArray - */ - - @ApiModelProperty(value = "") - public List getNameArray() { - return nameArray; - } - - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - public XmlItem nameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - return this; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList<>(); - } - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - /** - * Get nameWrappedArray - * @return nameWrappedArray - */ - - @ApiModelProperty(value = "") - public List getNameWrappedArray() { - return nameWrappedArray; - } - - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - public XmlItem prefixString(String prefixString) { - this.prefixString = prefixString; - return this; - } - - /** - * Get prefixString - * @return prefixString - */ - - @ApiModelProperty(example = "string", value = "") - public String getPrefixString() { - return prefixString; - } - - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - public XmlItem prefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - return this; - } - - /** - * Get prefixNumber - * @return prefixNumber - */ - @Valid - @ApiModelProperty(example = "1.234", value = "") - public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - public XmlItem prefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - return this; - } - - /** - * Get prefixInteger - * @return prefixInteger - */ - - @ApiModelProperty(example = "-2", value = "") - public Integer getPrefixInteger() { - return prefixInteger; - } - - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - public XmlItem prefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - return this; - } - - /** - * Get prefixBoolean - * @return prefixBoolean - */ - - @ApiModelProperty(example = "true", value = "") - public Boolean getPrefixBoolean() { - return prefixBoolean; - } - - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - public XmlItem prefixArray(List prefixArray) { - this.prefixArray = prefixArray; - return this; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList<>(); - } - this.prefixArray.add(prefixArrayItem); - return this; - } - - /** - * Get prefixArray - * @return prefixArray - */ - - @ApiModelProperty(value = "") - public List getPrefixArray() { - return prefixArray; - } - - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList<>(); - } - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - /** - * Get prefixWrappedArray - * @return prefixWrappedArray - */ - - @ApiModelProperty(value = "") - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - public XmlItem namespaceString(String namespaceString) { - this.namespaceString = namespaceString; - return this; - } - - /** - * Get namespaceString - * @return namespaceString - */ - - @ApiModelProperty(example = "string", value = "") - public String getNamespaceString() { - return namespaceString; - } - - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - return this; - } - - /** - * Get namespaceNumber - * @return namespaceNumber - */ - @Valid - @ApiModelProperty(example = "1.234", value = "") - public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - public XmlItem namespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - return this; - } - - /** - * Get namespaceInteger - * @return namespaceInteger - */ - - @ApiModelProperty(example = "-2", value = "") - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - return this; - } - - /** - * Get namespaceBoolean - * @return namespaceBoolean - */ - - @ApiModelProperty(example = "true", value = "") - public Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - public XmlItem namespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - return this; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList<>(); - } - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - /** - * Get namespaceArray - * @return namespaceArray - */ - - @ApiModelProperty(value = "") - public List getNamespaceArray() { - return namespaceArray; - } - - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList<>(); - } - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - /** - * Get namespaceWrappedArray - * @return namespaceWrappedArray - */ - - @ApiModelProperty(value = "") - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - public XmlItem prefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - return this; - } - - /** - * Get prefixNsString - * @return prefixNsString - */ - - @ApiModelProperty(example = "string", value = "") - public String getPrefixNsString() { - return prefixNsString; - } - - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - return this; - } - - /** - * Get prefixNsNumber - * @return prefixNsNumber - */ - @Valid - @ApiModelProperty(example = "1.234", value = "") - public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - return this; - } - - /** - * Get prefixNsInteger - * @return prefixNsInteger - */ - - @ApiModelProperty(example = "-2", value = "") - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - /** - * Get prefixNsBoolean - * @return prefixNsBoolean - */ - - @ApiModelProperty(example = "true", value = "") - public Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - public XmlItem prefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - return this; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList<>(); - } - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - /** - * Get prefixNsArray - * @return prefixNsArray - */ - - @ApiModelProperty(value = "") - public List getPrefixNsArray() { - return prefixNsArray; - } - - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList<>(); - } - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - /** - * Get prefixNsWrappedArray - * @return prefixNsWrappedArray - */ - - @ApiModelProperty(value = "") - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot/src/test/java/org/openapitools/JacksonTest.java b/samples/server/petstore/springboot/src/test/java/org/openapitools/JacksonTest.java new file mode 100644 index 000000000000..6c1b2bad1b70 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/org/openapitools/JacksonTest.java @@ -0,0 +1,52 @@ +package org.openapitools; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; +import org.openapitools.model.AnimalDto; +import org.openapitools.model.BigCatDto; +import org.openapitools.model.CatDto; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +@SpringBootTest +class JacksonTest { + + @Autowired + private ObjectMapper mapper; + + @Test + void shouldDeserializeWithoutLoss() throws JsonProcessingException { + // Given + CatDto animal = new CatDto() + .color("Red"); + + // When + CatDto deserializedPet = mapper.readValue(mapper.writeValueAsString(animal), CatDto.class); + + // Then + assertThat(deserializedPet) + .isNotNull() + .returns("CatDto", AnimalDto::getClassName) + .returns("Red", AnimalDto::getColor); + } + + @Test + void shouldDeserializeObjectWithInheritanceWithoutLoss() throws JsonProcessingException { + // Given + String json = "{\"className\":\"BigCat\",\"color\":\"red\",\"declawed\":null,\"kind\":\"tigers\"}"; + + // When + BigCatDto deserializedCat = mapper.readValue(json, BigCatDto.class); + + // Then + assertThat(deserializedCat) + .isNotNull() + .returns("BigCat", AnimalDto::getClassName) + .returns("red", AnimalDto::getColor) + .returns(BigCatDto.KindEnum.TIGERS, BigCatDto::getKind); + } +} \ No newline at end of file