forked from loafle/openapi-generator-original
Ensures a JsonCreator annotated constructor is present if there are required fields, and ensure the getters and setters are properly annotated with required=true / required=false for jaxrs-spec generator. (#19578)
This commit is contained in:
parent
6399a7a97e
commit
5ae8c03e6f
@ -34,9 +34,9 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
{{/vendorExtensions.x-field-extra-annotation}}
|
||||
private {{#isContainer}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{/isContainer}}{{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
|
||||
{{/vars}}
|
||||
|
||||
{{#generateBuilders}}
|
||||
{{^additionalProperties}}
|
||||
|
||||
protected {{classname}}({{classname}}Builder<?, ?> b) {
|
||||
{{#parent}}
|
||||
super(b);
|
||||
@ -46,11 +46,33 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
{{/vars}}
|
||||
}
|
||||
|
||||
public {{classname}}() {
|
||||
}
|
||||
{{/additionalProperties}}
|
||||
{{/generateBuilders}}
|
||||
public {{classname}}() {
|
||||
}
|
||||
|
||||
{{#hasRequired}}
|
||||
@JsonCreator
|
||||
public {{classname}}(
|
||||
{{#requiredVars}}
|
||||
@JsonProperty(required = {{required}}, value = "{{baseName}}") {{>beanValidatedType}} {{name}}{{^-last}},{{/-last}}
|
||||
{{/requiredVars}}
|
||||
) {
|
||||
{{#parent}}
|
||||
super(
|
||||
{{#parentRequiredVars}}
|
||||
{{name}}{{^-last}},{{/-last}}
|
||||
{{/parentRequiredVars}}
|
||||
);
|
||||
{{/parent}}
|
||||
{{#vars}}
|
||||
{{#required}}
|
||||
this.{{name}} = {{name}};
|
||||
{{/required}}
|
||||
{{/vars}}
|
||||
}
|
||||
|
||||
{{/hasRequired}}
|
||||
{{#vars}}
|
||||
/**
|
||||
{{#description}}
|
||||
@ -71,12 +93,12 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
|
||||
{{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}}{{#useSwaggerAnnotations}}
|
||||
@ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{/useSwaggerAnnotations}}{{#useMicroProfileOpenAPIAnnotations}}
|
||||
@org.eclipse.microprofile.openapi.annotations.media.Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}description = "{{{description}}}"){{/useMicroProfileOpenAPIAnnotations}}
|
||||
@JsonProperty("{{baseName}}")
|
||||
@JsonProperty({{#required}}required = {{required}}, value = {{/required}}"{{baseName}}")
|
||||
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}public {{>beanValidatedType}} {{getter}}() {
|
||||
return {{name}};
|
||||
}
|
||||
|
||||
@JsonProperty("{{baseName}}")
|
||||
@JsonProperty({{#required}}required = {{required}}, value = {{/required}}"{{baseName}}")
|
||||
{{#vendorExtensions.x-setter-extra-annotation}}{{{vendorExtensions.x-setter-extra-annotation}}}
|
||||
{{/vendorExtensions.x-setter-extra-annotation}}public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
|
||||
this.{{name}} = {{name}};
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesAnyType extends HashMap<String, Object> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesAnyType() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesAnyType name(String name) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesArray extends HashMap<String, List> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesArray() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesArray name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesBoolean() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesBoolean name(String name) {
|
||||
|
@ -34,6 +34,9 @@ public class AdditionalPropertiesClass implements Serializable {
|
||||
private Object anytype2;
|
||||
private Object anytype3;
|
||||
|
||||
public AdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesInteger extends HashMap<String, Integer> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesInteger() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesInteger name(String name) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesNumber() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesNumber name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesObject extends HashMap<String, Map> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesObject() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesObject name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesString extends HashMap<String, String> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesString() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesString name(String name) {
|
||||
|
@ -30,6 +30,16 @@ public class Animal implements Serializable {
|
||||
private String className;
|
||||
private String color = "red";
|
||||
|
||||
public Animal() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Animal(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Animal className(String className) {
|
||||
@ -39,12 +49,12 @@ public class Animal implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("className")
|
||||
@JsonProperty(required = true, value = "className")
|
||||
@NotNull public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
@JsonProperty("className")
|
||||
@JsonProperty(required = true, value = "className")
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
@ -24,6 +24,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ArrayOfArrayOfNumberOnly implements Serializable {
|
||||
private @Valid List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
|
||||
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
|
@ -24,6 +24,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ArrayOfNumberOnly implements Serializable {
|
||||
private @Valid List<BigDecimal> arrayNumber = new ArrayList<>();
|
||||
|
||||
public ArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
|
@ -26,6 +26,9 @@ public class ArrayTest implements Serializable {
|
||||
private @Valid List<List<Long>> arrayArrayOfInteger = new ArrayList<>();
|
||||
private @Valid List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
|
||||
|
||||
public ArrayTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
|
@ -68,6 +68,18 @@ public class BigCat extends Cat implements Serializable {
|
||||
|
||||
private KindEnum kind;
|
||||
|
||||
public BigCat() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public BigCat(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
@ -25,6 +25,9 @@ public class Capitalization implements Serializable {
|
||||
private String scAETHFlowPoints;
|
||||
private String ATT_NAME;
|
||||
|
||||
public Capitalization() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
|
@ -21,6 +21,18 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class Cat extends Animal implements Serializable {
|
||||
private Boolean declawed;
|
||||
|
||||
public Cat() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Cat(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Cat declawed(Boolean declawed) {
|
||||
|
@ -21,6 +21,16 @@ public class Category implements Serializable {
|
||||
private Long id;
|
||||
private String name = "default-name";
|
||||
|
||||
public Category() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Category(
|
||||
@JsonProperty(required = true, value = "name") String name
|
||||
) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Category id(Long id) {
|
||||
@ -49,12 +59,12 @@ public class Category implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
@NotNull public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ClassModel implements Serializable {
|
||||
private String propertyClass;
|
||||
|
||||
public ClassModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
|
@ -20,6 +20,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class Client implements Serializable {
|
||||
private String client;
|
||||
|
||||
public Client() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Client client(String client) {
|
||||
|
@ -21,6 +21,18 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class Dog extends Animal implements Serializable {
|
||||
private String breed;
|
||||
|
||||
public Dog() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Dog(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Dog breed(String breed) {
|
||||
|
@ -118,6 +118,9 @@ public class EnumArrays implements Serializable {
|
||||
|
||||
private @Valid List<ArrayEnumEnum> arrayEnum = new ArrayList<>();
|
||||
|
||||
public EnumArrays() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
|
@ -214,6 +214,16 @@ public class EnumTest implements Serializable {
|
||||
private EnumNumberEnum enumNumber;
|
||||
private OuterEnum outerEnum;
|
||||
|
||||
public EnumTest() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public EnumTest(
|
||||
@JsonProperty(required = true, value = "enum_string_required") EnumStringRequiredEnum enumStringRequired
|
||||
) {
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
@ -242,12 +252,12 @@ public class EnumTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("enum_string_required")
|
||||
@JsonProperty(required = true, value = "enum_string_required")
|
||||
@NotNull public EnumStringRequiredEnum getEnumStringRequired() {
|
||||
return enumStringRequired;
|
||||
}
|
||||
|
||||
@JsonProperty("enum_string_required")
|
||||
@JsonProperty(required = true, value = "enum_string_required")
|
||||
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
}
|
||||
|
@ -25,6 +25,9 @@ public class FileSchemaTestClass implements Serializable {
|
||||
private ModelFile _file;
|
||||
private @Valid List<@Valid ModelFile> files = new ArrayList<>();
|
||||
|
||||
public FileSchemaTestClass() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public FileSchemaTestClass _file(ModelFile _file) {
|
||||
|
@ -40,6 +40,22 @@ public class FormatTest implements Serializable {
|
||||
private String password;
|
||||
private BigDecimal bigDecimal;
|
||||
|
||||
public FormatTest() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public FormatTest(
|
||||
@JsonProperty(required = true, value = "number") BigDecimal number,
|
||||
@JsonProperty(required = true, value = "byte") byte[] _byte,
|
||||
@JsonProperty(required = true, value = "date") LocalDate date,
|
||||
@JsonProperty(required = true, value = "password") String password
|
||||
) {
|
||||
this.number = number;
|
||||
this._byte = _byte;
|
||||
this.date = date;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* minimum: 10
|
||||
* maximum: 100
|
||||
@ -112,12 +128,12 @@ public class FormatTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("number")
|
||||
@JsonProperty(required = true, value = "number")
|
||||
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")public BigDecimal getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
@JsonProperty("number")
|
||||
@JsonProperty(required = true, value = "number")
|
||||
public void setNumber(BigDecimal number) {
|
||||
this.number = number;
|
||||
}
|
||||
@ -192,12 +208,12 @@ public class FormatTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("byte")
|
||||
@JsonProperty(required = true, value = "byte")
|
||||
@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")public byte[] getByte() {
|
||||
return _byte;
|
||||
}
|
||||
|
||||
@JsonProperty("byte")
|
||||
@JsonProperty(required = true, value = "byte")
|
||||
public void setByte(byte[] _byte) {
|
||||
this._byte = _byte;
|
||||
}
|
||||
@ -230,12 +246,12 @@ public class FormatTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("date")
|
||||
@JsonProperty(required = true, value = "date")
|
||||
@NotNull public LocalDate getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
@JsonProperty("date")
|
||||
@JsonProperty(required = true, value = "date")
|
||||
public void setDate(LocalDate date) {
|
||||
this.date = date;
|
||||
}
|
||||
@ -287,12 +303,12 @@ public class FormatTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("password")
|
||||
@JsonProperty(required = true, value = "password")
|
||||
@NotNull @Size(min=10,max=64)public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
@JsonProperty("password")
|
||||
@JsonProperty(required = true, value = "password")
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ public class HasOnlyReadOnly implements Serializable {
|
||||
private String bar;
|
||||
private String foo;
|
||||
|
||||
public HasOnlyReadOnly() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public HasOnlyReadOnly bar(String bar) {
|
||||
|
@ -72,6 +72,9 @@ public class MapTest implements Serializable {
|
||||
private @Valid Map<String, Boolean> directMap = new HashMap<>();
|
||||
private @Valid Map<String, Boolean> indirectMap = new HashMap<>();
|
||||
|
||||
public MapTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
|
@ -27,6 +27,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializabl
|
||||
private Date dateTime;
|
||||
private @Valid Map<String, Animal> map = new HashMap<>();
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
|
@ -24,6 +24,9 @@ public class Model200Response implements Serializable {
|
||||
private Integer name;
|
||||
private String propertyClass;
|
||||
|
||||
public Model200Response() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Model200Response name(Integer name) {
|
||||
|
@ -23,6 +23,9 @@ public class ModelApiResponse implements Serializable {
|
||||
private String type;
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelApiResponse code(Integer code) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ModelFile implements Serializable {
|
||||
private String sourceURI;
|
||||
|
||||
public ModelFile() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test capitalization
|
||||
**/
|
||||
|
@ -21,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ModelList implements Serializable {
|
||||
private String _123list;
|
||||
|
||||
public ModelList() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelList _123list(String _123list) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ModelReturn implements Serializable {
|
||||
private Integer _return;
|
||||
|
||||
public ModelReturn() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelReturn _return(Integer _return) {
|
||||
|
@ -25,6 +25,16 @@ public class Name implements Serializable {
|
||||
private String property;
|
||||
private Integer _123number;
|
||||
|
||||
public Name() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Name(
|
||||
@JsonProperty(required = true, value = "name") Integer name
|
||||
) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Name name(Integer name) {
|
||||
@ -34,12 +44,12 @@ public class Name implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
@NotNull public Integer getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
public void setName(Integer name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -21,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class NumberOnly implements Serializable {
|
||||
private BigDecimal justNumber;
|
||||
|
||||
public NumberOnly() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
|
@ -73,6 +73,9 @@ public class Order implements Serializable {
|
||||
private StatusEnum status;
|
||||
private Boolean complete = false;
|
||||
|
||||
public Order() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order id(Long id) {
|
||||
|
@ -23,6 +23,9 @@ public class OuterComposite implements Serializable {
|
||||
private String myString;
|
||||
private Boolean myBoolean;
|
||||
|
||||
public OuterComposite() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
|
@ -80,6 +80,18 @@ public class Pet implements Serializable {
|
||||
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Pet(
|
||||
@JsonProperty(required = true, value = "name") String name,
|
||||
@JsonProperty(required = true, value = "photoUrls") Set<String> photoUrls
|
||||
) {
|
||||
this.name = name;
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet id(Long id) {
|
||||
@ -127,12 +139,12 @@ public class Pet implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
@NotNull public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@ -146,12 +158,12 @@ public class Pet implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("photoUrls")
|
||||
@JsonProperty(required = true, value = "photoUrls")
|
||||
@NotNull public Set<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
@JsonProperty(required = true, value = "photoUrls")
|
||||
@JsonDeserialize(as = LinkedHashSet.class)
|
||||
public void setPhotoUrls(Set<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
|
@ -21,6 +21,9 @@ public class ReadOnlyFirst implements Serializable {
|
||||
private String bar;
|
||||
private String baz;
|
||||
|
||||
public ReadOnlyFirst() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ReadOnlyFirst bar(String bar) {
|
||||
|
@ -21,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class SpecialModelName implements Serializable {
|
||||
private Long $specialPropertyName;
|
||||
|
||||
public SpecialModelName() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
|
||||
|
@ -21,6 +21,9 @@ public class Tag implements Serializable {
|
||||
private Long id;
|
||||
private String name;
|
||||
|
||||
public Tag() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Tag id(Long id) {
|
||||
|
@ -28,6 +28,24 @@ public class TypeHolderDefault implements Serializable {
|
||||
private Boolean boolItem = true;
|
||||
private @Valid List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderDefault() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public TypeHolderDefault(
|
||||
@JsonProperty(required = true, value = "string_item") String stringItem,
|
||||
@JsonProperty(required = true, value = "number_item") BigDecimal numberItem,
|
||||
@JsonProperty(required = true, value = "integer_item") Integer integerItem,
|
||||
@JsonProperty(required = true, value = "bool_item") Boolean boolItem,
|
||||
@JsonProperty(required = true, value = "array_item") List<Integer> arrayItem
|
||||
) {
|
||||
this.stringItem = stringItem;
|
||||
this.numberItem = numberItem;
|
||||
this.integerItem = integerItem;
|
||||
this.boolItem = boolItem;
|
||||
this.arrayItem = arrayItem;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public TypeHolderDefault stringItem(String stringItem) {
|
||||
@ -37,12 +55,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("string_item")
|
||||
@JsonProperty(required = true, value = "string_item")
|
||||
@NotNull public String getStringItem() {
|
||||
return stringItem;
|
||||
}
|
||||
|
||||
@JsonProperty("string_item")
|
||||
@JsonProperty(required = true, value = "string_item")
|
||||
public void setStringItem(String stringItem) {
|
||||
this.stringItem = stringItem;
|
||||
}
|
||||
@ -56,12 +74,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("number_item")
|
||||
@JsonProperty(required = true, value = "number_item")
|
||||
@NotNull @Valid public BigDecimal getNumberItem() {
|
||||
return numberItem;
|
||||
}
|
||||
|
||||
@JsonProperty("number_item")
|
||||
@JsonProperty(required = true, value = "number_item")
|
||||
public void setNumberItem(BigDecimal numberItem) {
|
||||
this.numberItem = numberItem;
|
||||
}
|
||||
@ -75,12 +93,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("integer_item")
|
||||
@JsonProperty(required = true, value = "integer_item")
|
||||
@NotNull public Integer getIntegerItem() {
|
||||
return integerItem;
|
||||
}
|
||||
|
||||
@JsonProperty("integer_item")
|
||||
@JsonProperty(required = true, value = "integer_item")
|
||||
public void setIntegerItem(Integer integerItem) {
|
||||
this.integerItem = integerItem;
|
||||
}
|
||||
@ -94,12 +112,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("bool_item")
|
||||
@JsonProperty(required = true, value = "bool_item")
|
||||
@NotNull public Boolean getBoolItem() {
|
||||
return boolItem;
|
||||
}
|
||||
|
||||
@JsonProperty("bool_item")
|
||||
@JsonProperty(required = true, value = "bool_item")
|
||||
public void setBoolItem(Boolean boolItem) {
|
||||
this.boolItem = boolItem;
|
||||
}
|
||||
@ -113,12 +131,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("array_item")
|
||||
@JsonProperty(required = true, value = "array_item")
|
||||
@NotNull public List<Integer> getArrayItem() {
|
||||
return arrayItem;
|
||||
}
|
||||
|
||||
@JsonProperty("array_item")
|
||||
@JsonProperty(required = true, value = "array_item")
|
||||
public void setArrayItem(List<Integer> arrayItem) {
|
||||
this.arrayItem = arrayItem;
|
||||
}
|
||||
|
@ -29,6 +29,26 @@ public class TypeHolderExample implements Serializable {
|
||||
private Boolean boolItem;
|
||||
private @Valid List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderExample() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public TypeHolderExample(
|
||||
@JsonProperty(required = true, value = "string_item") String stringItem,
|
||||
@JsonProperty(required = true, value = "number_item") BigDecimal numberItem,
|
||||
@JsonProperty(required = true, value = "float_item") Float floatItem,
|
||||
@JsonProperty(required = true, value = "integer_item") Integer integerItem,
|
||||
@JsonProperty(required = true, value = "bool_item") Boolean boolItem,
|
||||
@JsonProperty(required = true, value = "array_item") 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) {
|
||||
@ -38,12 +58,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "what", required = true, value = "")
|
||||
@JsonProperty("string_item")
|
||||
@JsonProperty(required = true, value = "string_item")
|
||||
@NotNull public String getStringItem() {
|
||||
return stringItem;
|
||||
}
|
||||
|
||||
@JsonProperty("string_item")
|
||||
@JsonProperty(required = true, value = "string_item")
|
||||
public void setStringItem(String stringItem) {
|
||||
this.stringItem = stringItem;
|
||||
}
|
||||
@ -57,12 +77,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "1.234", required = true, value = "")
|
||||
@JsonProperty("number_item")
|
||||
@JsonProperty(required = true, value = "number_item")
|
||||
@NotNull @Valid public BigDecimal getNumberItem() {
|
||||
return numberItem;
|
||||
}
|
||||
|
||||
@JsonProperty("number_item")
|
||||
@JsonProperty(required = true, value = "number_item")
|
||||
public void setNumberItem(BigDecimal numberItem) {
|
||||
this.numberItem = numberItem;
|
||||
}
|
||||
@ -76,12 +96,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "1.234", required = true, value = "")
|
||||
@JsonProperty("float_item")
|
||||
@JsonProperty(required = true, value = "float_item")
|
||||
@NotNull public Float getFloatItem() {
|
||||
return floatItem;
|
||||
}
|
||||
|
||||
@JsonProperty("float_item")
|
||||
@JsonProperty(required = true, value = "float_item")
|
||||
public void setFloatItem(Float floatItem) {
|
||||
this.floatItem = floatItem;
|
||||
}
|
||||
@ -95,12 +115,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "-2", required = true, value = "")
|
||||
@JsonProperty("integer_item")
|
||||
@JsonProperty(required = true, value = "integer_item")
|
||||
@NotNull public Integer getIntegerItem() {
|
||||
return integerItem;
|
||||
}
|
||||
|
||||
@JsonProperty("integer_item")
|
||||
@JsonProperty(required = true, value = "integer_item")
|
||||
public void setIntegerItem(Integer integerItem) {
|
||||
this.integerItem = integerItem;
|
||||
}
|
||||
@ -114,12 +134,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "true", required = true, value = "")
|
||||
@JsonProperty("bool_item")
|
||||
@JsonProperty(required = true, value = "bool_item")
|
||||
@NotNull public Boolean getBoolItem() {
|
||||
return boolItem;
|
||||
}
|
||||
|
||||
@JsonProperty("bool_item")
|
||||
@JsonProperty(required = true, value = "bool_item")
|
||||
public void setBoolItem(Boolean boolItem) {
|
||||
this.boolItem = boolItem;
|
||||
}
|
||||
@ -133,12 +153,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
|
||||
@JsonProperty("array_item")
|
||||
@JsonProperty(required = true, value = "array_item")
|
||||
@NotNull public List<Integer> getArrayItem() {
|
||||
return arrayItem;
|
||||
}
|
||||
|
||||
@JsonProperty("array_item")
|
||||
@JsonProperty(required = true, value = "array_item")
|
||||
public void setArrayItem(List<Integer> arrayItem) {
|
||||
this.arrayItem = arrayItem;
|
||||
}
|
||||
|
@ -27,6 +27,9 @@ public class User implements Serializable {
|
||||
private String phone;
|
||||
private Integer userStatus;
|
||||
|
||||
public User() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public User id(Long id) {
|
||||
|
@ -52,6 +52,9 @@ public class XmlItem implements Serializable {
|
||||
private @Valid List<Integer> prefixNsArray = new ArrayList<>();
|
||||
private @Valid List<Integer> prefixNsWrappedArray = new ArrayList<>();
|
||||
|
||||
public XmlItem() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public XmlItem attributeString(String attributeString) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesAnyType extends HashMap<String, Object> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesAnyType() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesAnyType name(String name) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesArray extends HashMap<String, List> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesArray() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesArray name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesBoolean() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesBoolean name(String name) {
|
||||
|
@ -34,6 +34,9 @@ public class AdditionalPropertiesClass implements Serializable {
|
||||
private Object anytype2;
|
||||
private Object anytype3;
|
||||
|
||||
public AdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesInteger extends HashMap<String, Integer> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesInteger() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesInteger name(String name) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesNumber() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesNumber name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesObject extends HashMap<String, Map> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesObject() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesObject name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesString extends HashMap<String, String> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesString() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesString name(String name) {
|
||||
|
@ -30,6 +30,16 @@ public class Animal implements Serializable {
|
||||
private String className;
|
||||
private String color = "red";
|
||||
|
||||
public Animal() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Animal(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Animal className(String className) {
|
||||
@ -39,12 +49,12 @@ public class Animal implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("className")
|
||||
@JsonProperty(required = true, value = "className")
|
||||
@NotNull public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
@JsonProperty("className")
|
||||
@JsonProperty(required = true, value = "className")
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
@ -24,6 +24,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ArrayOfArrayOfNumberOnly implements Serializable {
|
||||
private @Valid List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
|
||||
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
|
@ -24,6 +24,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ArrayOfNumberOnly implements Serializable {
|
||||
private @Valid List<BigDecimal> arrayNumber = new ArrayList<>();
|
||||
|
||||
public ArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
|
@ -26,6 +26,9 @@ public class ArrayTest implements Serializable {
|
||||
private @Valid List<List<Long>> arrayArrayOfInteger = new ArrayList<>();
|
||||
private @Valid List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
|
||||
|
||||
public ArrayTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
|
@ -68,6 +68,18 @@ public class BigCat extends Cat implements Serializable {
|
||||
|
||||
private KindEnum kind;
|
||||
|
||||
public BigCat() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public BigCat(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
@ -25,6 +25,9 @@ public class Capitalization implements Serializable {
|
||||
private String scAETHFlowPoints;
|
||||
private String ATT_NAME;
|
||||
|
||||
public Capitalization() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
|
@ -21,6 +21,18 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class Cat extends Animal implements Serializable {
|
||||
private Boolean declawed;
|
||||
|
||||
public Cat() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Cat(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Cat declawed(Boolean declawed) {
|
||||
|
@ -21,6 +21,16 @@ public class Category implements Serializable {
|
||||
private Long id;
|
||||
private String name = "default-name";
|
||||
|
||||
public Category() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Category(
|
||||
@JsonProperty(required = true, value = "name") String name
|
||||
) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Category id(Long id) {
|
||||
@ -49,12 +59,12 @@ public class Category implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
@NotNull public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ClassModel implements Serializable {
|
||||
private String propertyClass;
|
||||
|
||||
public ClassModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
|
@ -20,6 +20,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class Client implements Serializable {
|
||||
private String client;
|
||||
|
||||
public Client() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Client client(String client) {
|
||||
|
@ -21,6 +21,18 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class Dog extends Animal implements Serializable {
|
||||
private String breed;
|
||||
|
||||
public Dog() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Dog(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Dog breed(String breed) {
|
||||
|
@ -118,6 +118,9 @@ public class EnumArrays implements Serializable {
|
||||
|
||||
private @Valid List<ArrayEnumEnum> arrayEnum = new ArrayList<>();
|
||||
|
||||
public EnumArrays() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
|
@ -214,6 +214,16 @@ public class EnumTest implements Serializable {
|
||||
private EnumNumberEnum enumNumber;
|
||||
private OuterEnum outerEnum;
|
||||
|
||||
public EnumTest() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public EnumTest(
|
||||
@JsonProperty(required = true, value = "enum_string_required") EnumStringRequiredEnum enumStringRequired
|
||||
) {
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
@ -242,12 +252,12 @@ public class EnumTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("enum_string_required")
|
||||
@JsonProperty(required = true, value = "enum_string_required")
|
||||
@NotNull public EnumStringRequiredEnum getEnumStringRequired() {
|
||||
return enumStringRequired;
|
||||
}
|
||||
|
||||
@JsonProperty("enum_string_required")
|
||||
@JsonProperty(required = true, value = "enum_string_required")
|
||||
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
}
|
||||
|
@ -25,6 +25,9 @@ public class FileSchemaTestClass implements Serializable {
|
||||
private ModelFile _file;
|
||||
private @Valid List<@Valid ModelFile> files = new ArrayList<>();
|
||||
|
||||
public FileSchemaTestClass() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public FileSchemaTestClass _file(ModelFile _file) {
|
||||
|
@ -40,6 +40,22 @@ public class FormatTest implements Serializable {
|
||||
private String password;
|
||||
private BigDecimal bigDecimal;
|
||||
|
||||
public FormatTest() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public FormatTest(
|
||||
@JsonProperty(required = true, value = "number") BigDecimal number,
|
||||
@JsonProperty(required = true, value = "byte") byte[] _byte,
|
||||
@JsonProperty(required = true, value = "date") LocalDate date,
|
||||
@JsonProperty(required = true, value = "password") String password
|
||||
) {
|
||||
this.number = number;
|
||||
this._byte = _byte;
|
||||
this.date = date;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* minimum: 10
|
||||
* maximum: 100
|
||||
@ -112,12 +128,12 @@ public class FormatTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("number")
|
||||
@JsonProperty(required = true, value = "number")
|
||||
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")public BigDecimal getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
@JsonProperty("number")
|
||||
@JsonProperty(required = true, value = "number")
|
||||
public void setNumber(BigDecimal number) {
|
||||
this.number = number;
|
||||
}
|
||||
@ -192,12 +208,12 @@ public class FormatTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("byte")
|
||||
@JsonProperty(required = true, value = "byte")
|
||||
@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")public byte[] getByte() {
|
||||
return _byte;
|
||||
}
|
||||
|
||||
@JsonProperty("byte")
|
||||
@JsonProperty(required = true, value = "byte")
|
||||
public void setByte(byte[] _byte) {
|
||||
this._byte = _byte;
|
||||
}
|
||||
@ -230,12 +246,12 @@ public class FormatTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("date")
|
||||
@JsonProperty(required = true, value = "date")
|
||||
@NotNull public LocalDate getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
@JsonProperty("date")
|
||||
@JsonProperty(required = true, value = "date")
|
||||
public void setDate(LocalDate date) {
|
||||
this.date = date;
|
||||
}
|
||||
@ -287,12 +303,12 @@ public class FormatTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("password")
|
||||
@JsonProperty(required = true, value = "password")
|
||||
@NotNull @Size(min=10,max=64)public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
@JsonProperty("password")
|
||||
@JsonProperty(required = true, value = "password")
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ public class HasOnlyReadOnly implements Serializable {
|
||||
private String bar;
|
||||
private String foo;
|
||||
|
||||
public HasOnlyReadOnly() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public HasOnlyReadOnly bar(String bar) {
|
||||
|
@ -72,6 +72,9 @@ public class MapTest implements Serializable {
|
||||
private @Valid Map<String, Boolean> directMap = new HashMap<>();
|
||||
private @Valid Map<String, Boolean> indirectMap = new HashMap<>();
|
||||
|
||||
public MapTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
|
@ -27,6 +27,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Serializabl
|
||||
private Date dateTime;
|
||||
private @Valid Map<String, Animal> map = new HashMap<>();
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
|
@ -24,6 +24,9 @@ public class Model200Response implements Serializable {
|
||||
private Integer name;
|
||||
private String propertyClass;
|
||||
|
||||
public Model200Response() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Model200Response name(Integer name) {
|
||||
|
@ -23,6 +23,9 @@ public class ModelApiResponse implements Serializable {
|
||||
private String type;
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelApiResponse code(Integer code) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ModelFile implements Serializable {
|
||||
private String sourceURI;
|
||||
|
||||
public ModelFile() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test capitalization
|
||||
**/
|
||||
|
@ -21,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ModelList implements Serializable {
|
||||
private String _123list;
|
||||
|
||||
public ModelList() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelList _123list(String _123list) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class ModelReturn implements Serializable {
|
||||
private Integer _return;
|
||||
|
||||
public ModelReturn() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ModelReturn _return(Integer _return) {
|
||||
|
@ -25,6 +25,16 @@ public class Name implements Serializable {
|
||||
private String property;
|
||||
private Integer _123number;
|
||||
|
||||
public Name() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Name(
|
||||
@JsonProperty(required = true, value = "name") Integer name
|
||||
) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Name name(Integer name) {
|
||||
@ -34,12 +44,12 @@ public class Name implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
@NotNull public Integer getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
public void setName(Integer name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -21,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class NumberOnly implements Serializable {
|
||||
private BigDecimal justNumber;
|
||||
|
||||
public NumberOnly() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
|
@ -73,6 +73,9 @@ public class Order implements Serializable {
|
||||
private StatusEnum status;
|
||||
private Boolean complete = false;
|
||||
|
||||
public Order() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Order id(Long id) {
|
||||
|
@ -23,6 +23,9 @@ public class OuterComposite implements Serializable {
|
||||
private String myString;
|
||||
private Boolean myBoolean;
|
||||
|
||||
public OuterComposite() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
|
@ -80,6 +80,18 @@ public class Pet implements Serializable {
|
||||
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Pet(
|
||||
@JsonProperty(required = true, value = "name") String name,
|
||||
@JsonProperty(required = true, value = "photoUrls") Set<String> photoUrls
|
||||
) {
|
||||
this.name = name;
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Pet id(Long id) {
|
||||
@ -127,12 +139,12 @@ public class Pet implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
@NotNull public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@ -146,12 +158,12 @@ public class Pet implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("photoUrls")
|
||||
@JsonProperty(required = true, value = "photoUrls")
|
||||
@NotNull public Set<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
@JsonProperty(required = true, value = "photoUrls")
|
||||
@JsonDeserialize(as = LinkedHashSet.class)
|
||||
public void setPhotoUrls(Set<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
|
@ -21,6 +21,9 @@ public class ReadOnlyFirst implements Serializable {
|
||||
private String bar;
|
||||
private String baz;
|
||||
|
||||
public ReadOnlyFirst() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public ReadOnlyFirst bar(String bar) {
|
||||
|
@ -21,6 +21,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class SpecialModelName implements Serializable {
|
||||
private Long $specialPropertyName;
|
||||
|
||||
public SpecialModelName() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
|
||||
|
@ -21,6 +21,9 @@ public class Tag implements Serializable {
|
||||
private Long id;
|
||||
private String name;
|
||||
|
||||
public Tag() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Tag id(Long id) {
|
||||
|
@ -28,6 +28,24 @@ public class TypeHolderDefault implements Serializable {
|
||||
private Boolean boolItem = true;
|
||||
private @Valid List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderDefault() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public TypeHolderDefault(
|
||||
@JsonProperty(required = true, value = "string_item") String stringItem,
|
||||
@JsonProperty(required = true, value = "number_item") BigDecimal numberItem,
|
||||
@JsonProperty(required = true, value = "integer_item") Integer integerItem,
|
||||
@JsonProperty(required = true, value = "bool_item") Boolean boolItem,
|
||||
@JsonProperty(required = true, value = "array_item") List<Integer> arrayItem
|
||||
) {
|
||||
this.stringItem = stringItem;
|
||||
this.numberItem = numberItem;
|
||||
this.integerItem = integerItem;
|
||||
this.boolItem = boolItem;
|
||||
this.arrayItem = arrayItem;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public TypeHolderDefault stringItem(String stringItem) {
|
||||
@ -37,12 +55,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("string_item")
|
||||
@JsonProperty(required = true, value = "string_item")
|
||||
@NotNull public String getStringItem() {
|
||||
return stringItem;
|
||||
}
|
||||
|
||||
@JsonProperty("string_item")
|
||||
@JsonProperty(required = true, value = "string_item")
|
||||
public void setStringItem(String stringItem) {
|
||||
this.stringItem = stringItem;
|
||||
}
|
||||
@ -56,12 +74,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("number_item")
|
||||
@JsonProperty(required = true, value = "number_item")
|
||||
@NotNull @Valid public BigDecimal getNumberItem() {
|
||||
return numberItem;
|
||||
}
|
||||
|
||||
@JsonProperty("number_item")
|
||||
@JsonProperty(required = true, value = "number_item")
|
||||
public void setNumberItem(BigDecimal numberItem) {
|
||||
this.numberItem = numberItem;
|
||||
}
|
||||
@ -75,12 +93,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("integer_item")
|
||||
@JsonProperty(required = true, value = "integer_item")
|
||||
@NotNull public Integer getIntegerItem() {
|
||||
return integerItem;
|
||||
}
|
||||
|
||||
@JsonProperty("integer_item")
|
||||
@JsonProperty(required = true, value = "integer_item")
|
||||
public void setIntegerItem(Integer integerItem) {
|
||||
this.integerItem = integerItem;
|
||||
}
|
||||
@ -94,12 +112,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("bool_item")
|
||||
@JsonProperty(required = true, value = "bool_item")
|
||||
@NotNull public Boolean getBoolItem() {
|
||||
return boolItem;
|
||||
}
|
||||
|
||||
@JsonProperty("bool_item")
|
||||
@JsonProperty(required = true, value = "bool_item")
|
||||
public void setBoolItem(Boolean boolItem) {
|
||||
this.boolItem = boolItem;
|
||||
}
|
||||
@ -113,12 +131,12 @@ public class TypeHolderDefault implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("array_item")
|
||||
@JsonProperty(required = true, value = "array_item")
|
||||
@NotNull public List<Integer> getArrayItem() {
|
||||
return arrayItem;
|
||||
}
|
||||
|
||||
@JsonProperty("array_item")
|
||||
@JsonProperty(required = true, value = "array_item")
|
||||
public void setArrayItem(List<Integer> arrayItem) {
|
||||
this.arrayItem = arrayItem;
|
||||
}
|
||||
|
@ -29,6 +29,26 @@ public class TypeHolderExample implements Serializable {
|
||||
private Boolean boolItem;
|
||||
private @Valid List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderExample() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public TypeHolderExample(
|
||||
@JsonProperty(required = true, value = "string_item") String stringItem,
|
||||
@JsonProperty(required = true, value = "number_item") BigDecimal numberItem,
|
||||
@JsonProperty(required = true, value = "float_item") Float floatItem,
|
||||
@JsonProperty(required = true, value = "integer_item") Integer integerItem,
|
||||
@JsonProperty(required = true, value = "bool_item") Boolean boolItem,
|
||||
@JsonProperty(required = true, value = "array_item") 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) {
|
||||
@ -38,12 +58,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "what", required = true, value = "")
|
||||
@JsonProperty("string_item")
|
||||
@JsonProperty(required = true, value = "string_item")
|
||||
@NotNull public String getStringItem() {
|
||||
return stringItem;
|
||||
}
|
||||
|
||||
@JsonProperty("string_item")
|
||||
@JsonProperty(required = true, value = "string_item")
|
||||
public void setStringItem(String stringItem) {
|
||||
this.stringItem = stringItem;
|
||||
}
|
||||
@ -57,12 +77,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "1.234", required = true, value = "")
|
||||
@JsonProperty("number_item")
|
||||
@JsonProperty(required = true, value = "number_item")
|
||||
@NotNull @Valid public BigDecimal getNumberItem() {
|
||||
return numberItem;
|
||||
}
|
||||
|
||||
@JsonProperty("number_item")
|
||||
@JsonProperty(required = true, value = "number_item")
|
||||
public void setNumberItem(BigDecimal numberItem) {
|
||||
this.numberItem = numberItem;
|
||||
}
|
||||
@ -76,12 +96,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "1.234", required = true, value = "")
|
||||
@JsonProperty("float_item")
|
||||
@JsonProperty(required = true, value = "float_item")
|
||||
@NotNull public Float getFloatItem() {
|
||||
return floatItem;
|
||||
}
|
||||
|
||||
@JsonProperty("float_item")
|
||||
@JsonProperty(required = true, value = "float_item")
|
||||
public void setFloatItem(Float floatItem) {
|
||||
this.floatItem = floatItem;
|
||||
}
|
||||
@ -95,12 +115,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "-2", required = true, value = "")
|
||||
@JsonProperty("integer_item")
|
||||
@JsonProperty(required = true, value = "integer_item")
|
||||
@NotNull public Integer getIntegerItem() {
|
||||
return integerItem;
|
||||
}
|
||||
|
||||
@JsonProperty("integer_item")
|
||||
@JsonProperty(required = true, value = "integer_item")
|
||||
public void setIntegerItem(Integer integerItem) {
|
||||
this.integerItem = integerItem;
|
||||
}
|
||||
@ -114,12 +134,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "true", required = true, value = "")
|
||||
@JsonProperty("bool_item")
|
||||
@JsonProperty(required = true, value = "bool_item")
|
||||
@NotNull public Boolean getBoolItem() {
|
||||
return boolItem;
|
||||
}
|
||||
|
||||
@JsonProperty("bool_item")
|
||||
@JsonProperty(required = true, value = "bool_item")
|
||||
public void setBoolItem(Boolean boolItem) {
|
||||
this.boolItem = boolItem;
|
||||
}
|
||||
@ -133,12 +153,12 @@ public class TypeHolderExample implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
|
||||
@JsonProperty("array_item")
|
||||
@JsonProperty(required = true, value = "array_item")
|
||||
@NotNull public List<Integer> getArrayItem() {
|
||||
return arrayItem;
|
||||
}
|
||||
|
||||
@JsonProperty("array_item")
|
||||
@JsonProperty(required = true, value = "array_item")
|
||||
public void setArrayItem(List<Integer> arrayItem) {
|
||||
this.arrayItem = arrayItem;
|
||||
}
|
||||
|
@ -27,6 +27,9 @@ public class User implements Serializable {
|
||||
private String phone;
|
||||
private Integer userStatus;
|
||||
|
||||
public User() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public User id(Long id) {
|
||||
|
@ -52,6 +52,9 @@ public class XmlItem implements Serializable {
|
||||
private @Valid List<Integer> prefixNsArray = new ArrayList<>();
|
||||
private @Valid List<Integer> prefixNsWrappedArray = new ArrayList<>();
|
||||
|
||||
public XmlItem() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public XmlItem attributeString(String attributeString) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesAnyType extends HashMap<String, Object> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesAnyType() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesAnyType name(String name) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesArray extends HashMap<String, List> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesArray() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesArray name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesBoolean() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesBoolean name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesInteger extends HashMap<String, Integer> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesInteger() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesInteger name(String name) {
|
||||
|
@ -23,6 +23,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesNumber() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesNumber name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesObject extends HashMap<String, Map> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesObject() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesObject name(String name) {
|
||||
|
@ -22,6 +22,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
public class AdditionalPropertiesString extends HashMap<String, String> implements Serializable {
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesString() {
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public AdditionalPropertiesString name(String name) {
|
||||
|
@ -38,6 +38,13 @@ public class Animal implements Serializable {
|
||||
public Animal() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Animal(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Animal className(String className) {
|
||||
@ -47,12 +54,12 @@ public class Animal implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("className")
|
||||
@JsonProperty(required = true, value = "className")
|
||||
@NotNull public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
@JsonProperty("className")
|
||||
@JsonProperty(required = true, value = "className")
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
@ -76,6 +76,15 @@ public class BigCat extends Cat implements Serializable {
|
||||
public BigCat() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public BigCat(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
@ -29,6 +29,15 @@ public class Cat extends Animal implements Serializable {
|
||||
public Cat() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Cat(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Cat declawed(Boolean declawed) {
|
||||
|
@ -29,6 +29,13 @@ public class Category implements Serializable {
|
||||
public Category() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Category(
|
||||
@JsonProperty(required = true, value = "name") String name
|
||||
) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Category id(Long id) {
|
||||
@ -57,12 +64,12 @@ public class Category implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
@NotNull public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
@JsonProperty(required = true, value = "name")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -29,6 +29,15 @@ public class Dog extends Animal implements Serializable {
|
||||
public Dog() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public Dog(
|
||||
@JsonProperty(required = true, value = "className") String className
|
||||
) {
|
||||
super(
|
||||
className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public Dog breed(String breed) {
|
||||
|
@ -225,6 +225,13 @@ public class EnumTest implements Serializable {
|
||||
public EnumTest() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public EnumTest(
|
||||
@JsonProperty(required = true, value = "enum_string_required") EnumStringRequiredEnum enumStringRequired
|
||||
) {
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
@ -253,12 +260,12 @@ public class EnumTest implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@JsonProperty("enum_string_required")
|
||||
@JsonProperty(required = true, value = "enum_string_required")
|
||||
@NotNull public EnumStringRequiredEnum getEnumStringRequired() {
|
||||
return enumStringRequired;
|
||||
}
|
||||
|
||||
@JsonProperty("enum_string_required")
|
||||
@JsonProperty(required = true, value = "enum_string_required")
|
||||
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user