Add constructor with required parameter for Spring (#14822) (fix #9789)

* Add constructor with required parameter for spring

Fix #9789

* [Java][Spring] constructor with required args

---------

Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
This commit is contained in:
Antoine Lucas 2023-03-01 14:09:47 +01:00 committed by GitHub
parent c70a41210e
commit e1ab25c915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
328 changed files with 4790 additions and 7562 deletions

View File

@ -75,6 +75,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
public List<CodegenProperty> readOnlyVars = new ArrayList<>(); // a list of read-only properties
public List<CodegenProperty> readWriteVars = new ArrayList<>(); // a list of properties for read, write
public List<CodegenProperty> parentVars = new ArrayList<>();
public List<CodegenProperty> parentRequiredVars = new ArrayList<>();
public List<CodegenProperty> nonNullableVars = new ArrayList<>(); // a list of non-nullable properties
public Map<String, Object> allowableValues;

View File

@ -1078,6 +1078,10 @@ public class SpringCodegen extends AbstractJavaCodegen
codegenModel.getImports().add(imp);
}
}
if (property.required) {
codegenModel.parentRequiredVars.add(parentVar.clone());
}
}
}
parentCodegenModel = parentCodegenModel.getParentModel();

View File

@ -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 }}

View File

@ -95,6 +95,15 @@ public class JavaFileAssert extends AbstractAssert<JavaFileAssert, CompilationUn
return new ConstructorAssert(this, constructorDeclaration.get());
}
public JavaFileAssert assertNoConstructor(final String... paramTypes) {
Optional<ConstructorDeclaration> 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<FieldDeclaration> fieldOptional = actual.getType(0).getMembers().stream()
.filter(FieldDeclaration.class::isInstance)

View File

@ -27,7 +27,6 @@ import static org.openapitools.codegen.languages.features.DocumentationProviderF
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.Consumer;
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 class SpringCodegenTest {
assertFileContains(output.get("PersonApi.java").toPath(), interfaceTag, methodTag);
}
@Test
public void shouldGenerateConstructorWithOnlyRequiredParameters() throws IOException {
final Map<String, File> 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<String, File> generateFromContract(String url, String library) throws IOException {
return generateFromContract(url, library, new HashMap<>());
}

View File

@ -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

View File

@ -85,6 +85,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -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;

View File

@ -85,6 +85,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -85,6 +85,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -85,6 +85,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -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;

View File

@ -67,6 +67,22 @@ public class BigCat extends Cat {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -182,6 +182,22 @@ public class EnumTest {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, Set<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, Set<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -38,6 +38,26 @@ public class TypeHolderDefault {
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderDefault() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -41,6 +41,27 @@ public class TypeHolderExample {
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderExample() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -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;

View File

@ -69,6 +69,22 @@ public class BigCatDto extends CatDto {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -182,6 +182,22 @@ public class EnumTestDto {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -86,6 +86,23 @@ public class PetDto {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link PetDto#PetDto(String, Set<String>)}
*/
@Deprecated
public PetDto() {
super();
}
/**
* Constructor with only required parameters
*/
public PetDto(String name, Set<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public PetDto id(Long id) {
this.id = id;
return this;

View File

@ -40,6 +40,26 @@ public class TypeHolderDefaultDto {
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderDefaultDto#TypeHolderDefaultDto(String, BigDecimal, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderDefaultDto() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderDefaultDto(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -43,6 +43,27 @@ public class TypeHolderExampleDto {
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderExampleDto#TypeHolderExampleDto(String, BigDecimal, Float, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderExampleDto() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderExampleDto(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -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;

View File

@ -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;

View File

@ -69,6 +69,22 @@ public class BigCat extends Cat {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -184,6 +184,22 @@ public class EnumTest {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -86,6 +86,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, Set<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, Set<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -40,6 +40,26 @@ public class TypeHolderDefault {
@Valid
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderDefault() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -43,6 +43,27 @@ public class TypeHolderExample {
@Valid
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderExample() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -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;

View File

@ -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;

View File

@ -26,6 +26,22 @@ import javax.annotation.Generated;
@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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -84,6 +84,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, List<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, List<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -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;

View File

@ -68,6 +68,22 @@ public class BigCat extends Cat {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -183,6 +183,22 @@ public class EnumTest {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -85,6 +85,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, Set<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, Set<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -39,6 +39,26 @@ public class TypeHolderDefault {
@Valid
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderDefault() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -42,6 +42,27 @@ public class TypeHolderExample {
@Valid
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderExample() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -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;

View File

@ -69,6 +69,22 @@ public class BigCat extends Cat {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -184,6 +184,22 @@ public class EnumTest {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -86,6 +86,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, Set<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, Set<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -40,6 +40,26 @@ public class TypeHolderDefault {
@Valid
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderDefault() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -43,6 +43,27 @@ public class TypeHolderExample {
@Valid
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderExample() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -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;

View File

@ -69,6 +69,22 @@ public class BigCat extends Cat {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -184,6 +184,22 @@ public class EnumTest {
@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;

View File

@ -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;

View File

@ -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;

View File

@ -86,6 +86,23 @@ public class Pet {
@JsonProperty("status")
private StatusEnum status;
/**
* Default constructor
* @deprecated Use {@link Pet#Pet(String, Set<String>)}
*/
@Deprecated
public Pet() {
super();
}
/**
* Constructor with only required parameters
*/
public Pet(String name, Set<String> photoUrls) {
this.name = name;
this.photoUrls = photoUrls;
}
public Pet id(Long id) {
this.id = id;
return this;

View File

@ -40,6 +40,26 @@ public class TypeHolderDefault {
@Valid
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderDefault#TypeHolderDefault(String, BigDecimal, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderDefault() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderDefault(String stringItem, BigDecimal numberItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -43,6 +43,27 @@ public class TypeHolderExample {
@Valid
private List<Integer> arrayItem = new ArrayList<>();
/**
* Default constructor
* @deprecated Use {@link TypeHolderExample#TypeHolderExample(String, BigDecimal, Float, Integer, Boolean, List<Integer>)}
*/
@Deprecated
public TypeHolderExample() {
super();
}
/**
* Constructor with only required parameters
*/
public TypeHolderExample(String stringItem, BigDecimal numberItem, Float floatItem, Integer integerItem, Boolean boolItem, List<Integer> 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;

View File

@ -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;

View File

@ -69,6 +69,22 @@ public class BigCat extends Cat {
@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;

View File

@ -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;

Some files were not shown because too many files have changed in this diff Show More