diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidation.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidation.mustache index c8c6946fef66..e427a43a0acd 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidation.mustache @@ -1,4 +1 @@ -{{#required}} - @NotNull -{{/required}} -{{>beanValidationCore}} \ No newline at end of file +{{#required}}{{^isReadOnly}}@NotNull {{/isReadOnly}}{{/required}}{{#isContainer}}{{^isPrimitiveType}}{{^isEnum}}@Valid {{/isEnum}}{{/isPrimitiveType}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}@Valid {{/isPrimitiveType}}{{/isContainer}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache index 071a73e0c0f2..37298ccae415 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -35,7 +35,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens private {{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{datatypeWithEnum}}} {{name}}{{#required}}{{^isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isNullable}}{{#isNullable}} = null{{/isNullable}}{{/required}}{{^required}} = null{{/required}}; {{/isContainer}} {{^isContainer}} - private {{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} {{/vars}} {{#generateBuilders}} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 749ca0e02ccf..11eaac42e571 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesAnyType") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesAnyType extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 3563c9cdc65f..7557fcb86a2f 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -21,7 +21,7 @@ @JsonTypeName("AdditionalPropertiesArray") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesArray extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 0afb07939f52..6a8dfa6fe867 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesBoolean") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesBoolean extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 31b4b91dfb26..99758756fc5e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,9 +30,9 @@ public class AdditionalPropertiesClass implements Serializable { private @Valid Map> mapArrayAnytype = null; private @Valid Map> mapMapString = null; private @Valid Map> mapMapAnytype = null; - private @Valid Object anytype1; - private @Valid Object anytype2; - private @Valid Object anytype3; + private Object anytype1; + private Object anytype2; + private Object anytype3; /** **/ @@ -79,7 +79,7 @@ public AdditionalPropertiesClass mapNumber(Map mapNumber) { @ApiModelProperty(value = "") @JsonProperty("map_number") - public Map getMapNumber() { +@Valid public Map getMapNumber() { return mapNumber; } @@ -184,7 +184,7 @@ public AdditionalPropertiesClass mapArrayInteger(Map> mapA @ApiModelProperty(value = "") @JsonProperty("map_array_integer") - public Map> getMapArrayInteger() { +@Valid public Map> getMapArrayInteger() { return mapArrayInteger; } @@ -219,7 +219,7 @@ public AdditionalPropertiesClass mapArrayAnytype(Map> mapAr @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") - public Map> getMapArrayAnytype() { +@Valid public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -254,7 +254,7 @@ public AdditionalPropertiesClass mapMapString(Map> m @ApiModelProperty(value = "") @JsonProperty("map_map_string") - public Map> getMapMapString() { +@Valid public Map> getMapMapString() { return mapMapString; } @@ -289,7 +289,7 @@ public AdditionalPropertiesClass mapMapAnytype(Map> @ApiModelProperty(value = "") @JsonProperty("map_map_anytype") - public Map> getMapMapAnytype() { +@Valid public Map> getMapMapAnytype() { return mapMapAnytype; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index 376aa5a7c61a..64e55681b1ea 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesInteger") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesInteger extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 03cf9a126d22..1f83ce76fa72 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -21,7 +21,7 @@ @JsonTypeName("AdditionalPropertiesNumber") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesNumber extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index b9fae3edf820..59e8a7a17b65 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesObject") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesObject extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index 9790203702ec..6085f6cf87d0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesString") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesString extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java index 3548453f127f..83aaed11186d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java @@ -27,8 +27,8 @@ @JsonTypeName("Animal") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Animal implements Serializable { - private @Valid String className; - private @Valid String color = "red"; + private String className; + private String color = "red"; /** **/ @@ -40,8 +40,7 @@ public Animal className(String className) { @ApiModelProperty(required = true, value = "") @JsonProperty("className") - @NotNull - public String getClassName() { +@NotNull public String getClassName() { return className; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 0385c5e82908..e61e6d5a15f5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -33,7 +33,7 @@ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") - public List> getArrayArrayNumber() { +@Valid public List<@Valid List<@Valid BigDecimal>> getArrayArrayNumber() { return arrayArrayNumber; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index cbfdb520031a..a63fd7f808e7 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -33,7 +33,7 @@ public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") - public List getArrayNumber() { +@Valid public List<@Valid BigDecimal> getArrayNumber() { return arrayNumber; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java index b2043ee09c73..ce2e91b22d4b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ArrayTest.java @@ -70,7 +70,7 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") - public List> getArrayArrayOfInteger() { +@Valid public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -105,7 +105,7 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { +@Valid public List<@Valid List<@Valid ReadOnlyFirst>> getArrayArrayOfModel() { return arrayArrayOfModel; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java index fb8229016ddf..fe86e19996d8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCat.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private @Valid KindEnum kind; + private KindEnum kind; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java index 21427933a94f..0d73177999b8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private @Valid KindEnum kind; + private KindEnum kind; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java index 862e34ac293f..e8072d6baa80 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Capitalization.java @@ -18,12 +18,12 @@ @JsonTypeName("Capitalization") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Capitalization implements Serializable { - private @Valid String smallCamel; - private @Valid String capitalCamel; - private @Valid String smallSnake; - private @Valid String capitalSnake; - private @Valid String scAETHFlowPoints; - private @Valid String ATT_NAME; + private String smallCamel; + private String capitalCamel; + private String smallSnake; + private String capitalSnake; + private String scAETHFlowPoints; + private String ATT_NAME; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java index 7fa39e3522db..ae6f69e858d4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Cat.java @@ -19,7 +19,7 @@ @JsonTypeName("Cat") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Cat extends Animal implements Serializable { - private @Valid Boolean declawed; + private Boolean declawed; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java index 491b09cbbaff..abcb2353c241 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java @@ -19,7 +19,7 @@ @JsonTypeName("Cat_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class CatAllOf implements Serializable { - private @Valid Boolean declawed; + private Boolean declawed; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java index 3ae4d3b4b42f..b7ca290ad7b8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Category.java @@ -18,8 +18,8 @@ @JsonTypeName("Category") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Category implements Serializable { - private @Valid Long id; - private @Valid String name = "default-name"; + private Long id; + private String name = "default-name"; /** **/ @@ -50,8 +50,7 @@ public Category name(String name) { @ApiModelProperty(required = true, value = "") @JsonProperty("name") - @NotNull - public String getName() { +@NotNull public String getName() { return name; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java index ee9e240aac64..67b40cc967da 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @JsonTypeName("ClassModel") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ClassModel implements Serializable { - private @Valid String propertyClass; + private String propertyClass; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java index c3efb2cbd668..92b33849e109 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Client.java @@ -18,7 +18,7 @@ @JsonTypeName("Client") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Client implements Serializable { - private @Valid String client; + private String client; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java index 2e8e10e6413c..a7b6d39a3301 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Dog.java @@ -19,7 +19,7 @@ @JsonTypeName("Dog") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Dog extends Animal implements Serializable { - private @Valid String breed; + private String breed; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java index a2e595a8a1ae..7950e56c1ed5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java @@ -19,7 +19,7 @@ @JsonTypeName("Dog_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class DogAllOf implements Serializable { - private @Valid String breed; + private String breed; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java index 4b2ef0c1c602..77a4ee2b4f07 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java @@ -67,7 +67,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private @Valid JustSymbolEnum justSymbol; + private JustSymbolEnum justSymbol; public enum ArrayEnumEnum { FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java index b4692c31c46f..34c5c5a503c4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumTest.java @@ -67,7 +67,7 @@ public static EnumStringEnum fromValue(String value) { } } - private @Valid EnumStringEnum enumString; + private EnumStringEnum enumString; public enum EnumStringRequiredEnum { UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); @@ -115,7 +115,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private @Valid EnumStringRequiredEnum enumStringRequired; + private EnumStringRequiredEnum enumStringRequired; public enum EnumIntegerEnum { NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); @@ -163,7 +163,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private @Valid EnumIntegerEnum enumInteger; + private EnumIntegerEnum enumInteger; public enum EnumNumberEnum { NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); @@ -211,8 +211,8 @@ public static EnumNumberEnum fromValue(Double value) { } } - private @Valid EnumNumberEnum enumNumber; - private @Valid OuterEnum outerEnum; + private EnumNumberEnum enumNumber; + private OuterEnum outerEnum; /** **/ @@ -243,8 +243,7 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - @NotNull - public EnumStringRequiredEnum getEnumStringRequired() { +@NotNull public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -301,7 +300,7 @@ public EnumTest outerEnum(OuterEnum outerEnum) { @ApiModelProperty(value = "") @JsonProperty("outerEnum") - public OuterEnum getOuterEnum() { +@Valid public OuterEnum getOuterEnum() { return outerEnum; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 8297178d42fc..02b429689bfe 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -21,7 +21,7 @@ @JsonTypeName("FileSchemaTestClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FileSchemaTestClass implements Serializable { - private @Valid ModelFile _file; + private ModelFile _file; private @Valid List files = null; /** @@ -34,7 +34,7 @@ public FileSchemaTestClass _file(ModelFile _file) { @ApiModelProperty(value = "") @JsonProperty("file") - public ModelFile getFile() { +@Valid public ModelFile getFile() { return _file; } @@ -53,7 +53,7 @@ public FileSchemaTestClass files(List files) { @ApiModelProperty(value = "") @JsonProperty("files") - public List getFiles() { +@Valid public List<@Valid ModelFile> getFiles() { return files; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java index 8d71c957011a..02873ba321bf 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/FormatTest.java @@ -25,20 +25,20 @@ @JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FormatTest implements Serializable { - private @Valid Integer integer; - private @Valid Integer int32; - private @Valid Long int64; - private @Valid BigDecimal number; - private @Valid Float _float; - private @Valid Double _double; - private @Valid String string; - private @Valid byte[] _byte; - private @Valid File binary; - private @Valid LocalDate date; - private @Valid Date dateTime; - private @Valid UUID uuid; - private @Valid String password; - private @Valid BigDecimal bigDecimal; + private Integer integer; + private Integer int32; + private Long int64; + private BigDecimal number; + private Float _float; + private Double _double; + private String string; + private byte[] _byte; + private File binary; + private LocalDate date; + private Date dateTime; + private UUID uuid; + private String password; + private BigDecimal bigDecimal; /** * minimum: 10 @@ -113,8 +113,7 @@ public FormatTest number(BigDecimal number) { @ApiModelProperty(required = true, value = "") @JsonProperty("number") - @NotNull - @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { +@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -194,8 +193,7 @@ public FormatTest _byte(byte[] _byte) { @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - @NotNull - @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public byte[] getByte() { +@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public byte[] getByte() { return _byte; } @@ -214,7 +212,7 @@ public FormatTest binary(File binary) { @ApiModelProperty(value = "") @JsonProperty("binary") - public File getBinary() { +@Valid public File getBinary() { return binary; } @@ -233,8 +231,7 @@ public FormatTest date(LocalDate date) { @ApiModelProperty(required = true, value = "") @JsonProperty("date") - @NotNull - public LocalDate getDate() { +@NotNull @Valid public LocalDate getDate() { return date; } @@ -253,7 +250,7 @@ public FormatTest dateTime(Date dateTime) { @ApiModelProperty(value = "") @JsonProperty("dateTime") - public Date getDateTime() { +@Valid public Date getDateTime() { return dateTime; } @@ -272,7 +269,7 @@ public FormatTest uuid(UUID uuid) { @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") - public UUID getUuid() { +@Valid public UUID getUuid() { return uuid; } @@ -291,8 +288,7 @@ public FormatTest password(String password) { @ApiModelProperty(required = true, value = "") @JsonProperty("password") - @NotNull - @Size(min=10,max=64) public String getPassword() { +@NotNull @Size(min=10,max=64) public String getPassword() { return password; } @@ -311,7 +307,7 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { @ApiModelProperty(value = "") @JsonProperty("BigDecimal") - public BigDecimal getBigDecimal() { +@Valid public BigDecimal getBigDecimal() { return bigDecimal; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index a3ff9057c6fa..3a23d3cdf433 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -19,8 +19,8 @@ @JsonTypeName("hasOnlyReadOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class HasOnlyReadOnly implements Serializable { - private @Valid String bar; - private @Valid String foo; + private String bar; + private String foo; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java index c45ee600ca2d..0382f403e934 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java @@ -82,7 +82,7 @@ public MapTest mapMapOfString(Map> mapMapOfString) { @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") - public Map> getMapMapOfString() { +@Valid public Map> getMapMapOfString() { return mapMapOfString; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index c5e37deb2390..a63a8f176b16 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -23,8 +23,8 @@ @JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { - private @Valid UUID uuid; - private @Valid Date dateTime; + private UUID uuid; + private Date dateTime; private @Valid Map map = null; /** @@ -37,7 +37,7 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { @ApiModelProperty(value = "") @JsonProperty("uuid") - public UUID getUuid() { +@Valid public UUID getUuid() { return uuid; } @@ -56,7 +56,7 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { @ApiModelProperty(value = "") @JsonProperty("dateTime") - public Date getDateTime() { +@Valid public Date getDateTime() { return dateTime; } @@ -75,7 +75,7 @@ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { +@Valid public Map getMap() { return map; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java index 9023f1b3641a..936a37498a85 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Model200Response.java @@ -21,8 +21,8 @@ @JsonTypeName("200_response") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Model200Response implements Serializable { - private @Valid Integer name; - private @Valid String propertyClass; + private Integer name; + private String propertyClass; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java index 58d4e3da8fe8..0faa3d3b54e9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -19,9 +19,9 @@ @JsonTypeName("ApiResponse") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ModelApiResponse implements Serializable { - private @Valid Integer code; - private @Valid String type; - private @Valid String message; + private Integer code; + private String type; + private String message; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java index b68b11020963..e16d5d36ab69 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelFile.java @@ -21,7 +21,7 @@ @JsonTypeName("File") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ModelFile implements Serializable { - private @Valid String sourceURI; + private String sourceURI; /** * Test capitalization diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java index 5f5c9d766d55..75cd86f9155d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelList.java @@ -19,7 +19,7 @@ @JsonTypeName("List") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ModelList implements Serializable { - private @Valid String _123list; + private String _123list; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java index 3af7ec36256e..f45525ace7a8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ModelReturn.java @@ -21,7 +21,7 @@ @JsonTypeName("Return") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ModelReturn implements Serializable { - private @Valid Integer _return; + private Integer _return; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java index 09f3be2cf444..a887aa472166 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Name.java @@ -20,10 +20,10 @@ @JsonTypeName("Name") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Name implements Serializable { - private @Valid Integer name; - private @Valid Integer snakeCase; - private @Valid String property; - private @Valid Integer _123number; + private Integer name; + private Integer snakeCase; + private String property; + private Integer _123number; /** **/ @@ -35,8 +35,7 @@ public Name name(Integer name) { @ApiModelProperty(required = true, value = "") @JsonProperty("name") - @NotNull - public Integer getName() { +@NotNull public Integer getName() { return name; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java index d8bba4783ff2..b506b4fef90a 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/NumberOnly.java @@ -19,7 +19,7 @@ @JsonTypeName("NumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class NumberOnly implements Serializable { - private @Valid BigDecimal justNumber; + private BigDecimal justNumber; /** **/ @@ -31,7 +31,7 @@ public NumberOnly justNumber(BigDecimal justNumber) { @ApiModelProperty(value = "") @JsonProperty("JustNumber") - public BigDecimal getJustNumber() { +@Valid public BigDecimal getJustNumber() { return justNumber; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java index 5a6d37a5d791..998236d4ff0e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Order.java @@ -19,10 +19,10 @@ @JsonTypeName("Order") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Order implements Serializable { - private @Valid Long id; - private @Valid Long petId; - private @Valid Integer quantity; - private @Valid Date shipDate; + private Long id; + private Long petId; + private Integer quantity; + private Date shipDate; public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -70,8 +70,8 @@ public static StatusEnum fromValue(String value) { } } - private @Valid StatusEnum status; - private @Valid Boolean complete = false; + private StatusEnum status; + private Boolean complete = false; /** **/ @@ -140,7 +140,7 @@ public Order shipDate(Date shipDate) { @ApiModelProperty(value = "") @JsonProperty("shipDate") - public Date getShipDate() { +@Valid public Date getShipDate() { return shipDate; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java index b369e965b696..b19974a7217f 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/OuterComposite.java @@ -19,9 +19,9 @@ @JsonTypeName("OuterComposite") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class OuterComposite implements Serializable { - private @Valid BigDecimal myNumber; - private @Valid String myString; - private @Valid Boolean myBoolean; + private BigDecimal myNumber; + private String myString; + private Boolean myBoolean; /** **/ @@ -33,7 +33,7 @@ public OuterComposite myNumber(BigDecimal myNumber) { @ApiModelProperty(value = "") @JsonProperty("my_number") - public BigDecimal getMyNumber() { +@Valid public BigDecimal getMyNumber() { return myNumber; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java index 509dc7f912fe..797e01781ebb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Pet.java @@ -25,9 +25,9 @@ @JsonTypeName("Pet") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Pet implements Serializable { - private @Valid Long id; - private @Valid Category category; - private @Valid String name; + private Long id; + private Category category; + private String name; private @Valid Set photoUrls = new LinkedHashSet<>(); private @Valid List tags = null; public enum StatusEnum { @@ -77,7 +77,7 @@ public static StatusEnum fromValue(String value) { } } - private @Valid StatusEnum status; + private StatusEnum status; /** **/ @@ -108,7 +108,7 @@ public Pet category(Category category) { @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { +@Valid public Category getCategory() { return category; } @@ -127,8 +127,7 @@ public Pet name(String name) { @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - @NotNull - public String getName() { +@NotNull public String getName() { return name; } @@ -147,8 +146,7 @@ public Pet photoUrls(Set photoUrls) { @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - @NotNull - public Set getPhotoUrls() { +@NotNull public Set getPhotoUrls() { return photoUrls; } @@ -184,7 +182,7 @@ public Pet tags(List tags) { @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { +@Valid public List<@Valid Tag> getTags() { return tags; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index 164caf2e4071..3904ef0f2f8c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -18,8 +18,8 @@ @JsonTypeName("ReadOnlyFirst") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ReadOnlyFirst implements Serializable { - private @Valid String bar; - private @Valid String baz; + private String bar; + private String baz; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java index 03dbaba2b8f7..c01bef7c23f9 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -19,7 +19,7 @@ @JsonTypeName("$special[model.name]") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class SpecialModelName implements Serializable { - private @Valid Long $specialPropertyName; + private Long $specialPropertyName; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java index 56dde364824e..bc7272ea4fb6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Tag.java @@ -18,8 +18,8 @@ @JsonTypeName("Tag") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Tag implements Serializable { - private @Valid Long id; - private @Valid String name; + private Long id; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 5a58d2e4a493..c64f3912633e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -21,10 +21,10 @@ @JsonTypeName("TypeHolderDefault") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class TypeHolderDefault implements Serializable { - private @Valid String stringItem = "what"; - private @Valid BigDecimal numberItem; - private @Valid Integer integerItem; - private @Valid Boolean boolItem = true; + private String stringItem = "what"; + private BigDecimal numberItem; + private Integer integerItem; + private Boolean boolItem = true; private @Valid List arrayItem = new ArrayList<>(); /** @@ -37,8 +37,7 @@ public TypeHolderDefault stringItem(String stringItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - @NotNull - public String getStringItem() { +@NotNull public String getStringItem() { return stringItem; } @@ -57,8 +56,7 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - @NotNull - public BigDecimal getNumberItem() { +@NotNull @Valid public BigDecimal getNumberItem() { return numberItem; } @@ -77,8 +75,7 @@ public TypeHolderDefault integerItem(Integer integerItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - @NotNull - public Integer getIntegerItem() { +@NotNull public Integer getIntegerItem() { return integerItem; } @@ -97,8 +94,7 @@ public TypeHolderDefault boolItem(Boolean boolItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - @NotNull - public Boolean getBoolItem() { +@NotNull public Boolean getBoolItem() { return boolItem; } @@ -117,8 +113,7 @@ public TypeHolderDefault arrayItem(List arrayItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - @NotNull - public List getArrayItem() { +@NotNull public List getArrayItem() { return arrayItem; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java index 1c24650e192a..5aebf60c1203 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -21,11 +21,11 @@ @JsonTypeName("TypeHolderExample") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class TypeHolderExample implements Serializable { - private @Valid String stringItem; - private @Valid BigDecimal numberItem; - private @Valid Float floatItem; - private @Valid Integer integerItem; - private @Valid Boolean boolItem; + private String stringItem; + private BigDecimal numberItem; + private Float floatItem; + private Integer integerItem; + private Boolean boolItem; private @Valid List arrayItem = new ArrayList<>(); /** @@ -38,8 +38,7 @@ public TypeHolderExample stringItem(String stringItem) { @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - @NotNull - public String getStringItem() { +@NotNull public String getStringItem() { return stringItem; } @@ -58,8 +57,7 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - @NotNull - public BigDecimal getNumberItem() { +@NotNull @Valid public BigDecimal getNumberItem() { return numberItem; } @@ -78,8 +76,7 @@ public TypeHolderExample floatItem(Float floatItem) { @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - @NotNull - public Float getFloatItem() { +@NotNull public Float getFloatItem() { return floatItem; } @@ -98,8 +95,7 @@ public TypeHolderExample integerItem(Integer integerItem) { @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - @NotNull - public Integer getIntegerItem() { +@NotNull public Integer getIntegerItem() { return integerItem; } @@ -118,8 +114,7 @@ public TypeHolderExample boolItem(Boolean boolItem) { @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - @NotNull - public Boolean getBoolItem() { +@NotNull public Boolean getBoolItem() { return boolItem; } @@ -138,8 +133,7 @@ public TypeHolderExample arrayItem(List arrayItem) { @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") @JsonProperty("array_item") - @NotNull - public List getArrayItem() { +@NotNull public List getArrayItem() { return arrayItem; } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java index 6b0eef1b19e4..b5fb35eb064d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/User.java @@ -18,14 +18,14 @@ @JsonTypeName("User") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class User implements Serializable { - private @Valid Long id; - private @Valid String username; - private @Valid String firstName; - private @Valid String lastName; - private @Valid String email; - private @Valid String password; - private @Valid String phone; - private @Valid Integer userStatus; + private Long id; + private String username; + private String firstName; + private String lastName; + private String email; + private String password; + private String phone; + private Integer userStatus; /** **/ diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java index eff4ff035ff0..90719fd85108 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/XmlItem.java @@ -21,33 +21,33 @@ @JsonTypeName("XmlItem") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class XmlItem implements Serializable { - private @Valid String attributeString; - private @Valid BigDecimal attributeNumber; - private @Valid Integer attributeInteger; - private @Valid Boolean attributeBoolean; + private String attributeString; + private BigDecimal attributeNumber; + private Integer attributeInteger; + private Boolean attributeBoolean; private @Valid List wrappedArray = null; - private @Valid String nameString; - private @Valid BigDecimal nameNumber; - private @Valid Integer nameInteger; - private @Valid Boolean nameBoolean; + private String nameString; + private BigDecimal nameNumber; + private Integer nameInteger; + private Boolean nameBoolean; private @Valid List nameArray = null; private @Valid List nameWrappedArray = null; - private @Valid String prefixString; - private @Valid BigDecimal prefixNumber; - private @Valid Integer prefixInteger; - private @Valid Boolean prefixBoolean; + private String prefixString; + private BigDecimal prefixNumber; + private Integer prefixInteger; + private Boolean prefixBoolean; private @Valid List prefixArray = null; private @Valid List prefixWrappedArray = null; - private @Valid String namespaceString; - private @Valid BigDecimal namespaceNumber; - private @Valid Integer namespaceInteger; - private @Valid Boolean namespaceBoolean; + private String namespaceString; + private BigDecimal namespaceNumber; + private Integer namespaceInteger; + private Boolean namespaceBoolean; private @Valid List namespaceArray = null; private @Valid List namespaceWrappedArray = null; - private @Valid String prefixNsString; - private @Valid BigDecimal prefixNsNumber; - private @Valid Integer prefixNsInteger; - private @Valid Boolean prefixNsBoolean; + private String prefixNsString; + private BigDecimal prefixNsNumber; + private Integer prefixNsInteger; + private Boolean prefixNsBoolean; private @Valid List prefixNsArray = null; private @Valid List prefixNsWrappedArray = null; @@ -80,7 +80,7 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") - public BigDecimal getAttributeNumber() { +@Valid public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -191,7 +191,7 @@ public XmlItem nameNumber(BigDecimal nameNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") - public BigDecimal getNameNumber() { +@Valid public BigDecimal getNameNumber() { return nameNumber; } @@ -337,7 +337,7 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") - public BigDecimal getPrefixNumber() { +@Valid public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -483,7 +483,7 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") - public BigDecimal getNamespaceNumber() { +@Valid public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -629,7 +629,7 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") - public BigDecimal getPrefixNsNumber() { +@Valid public BigDecimal getPrefixNsNumber() { return prefixNsNumber; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 749ca0e02ccf..11eaac42e571 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesAnyType") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesAnyType extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 3563c9cdc65f..7557fcb86a2f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -21,7 +21,7 @@ @JsonTypeName("AdditionalPropertiesArray") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesArray extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 0afb07939f52..6a8dfa6fe867 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesBoolean") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesBoolean extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 753265e81ee4..09ea213682a4 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -30,9 +30,9 @@ public class AdditionalPropertiesClass implements Serializable { private @Valid Map> mapArrayAnytype = null; private @Valid Map> mapMapString = null; private @Valid Map> mapMapAnytype = null; - private @Valid Object anytype1; - private @Valid Object anytype2; - private @Valid Object anytype3; + private Object anytype1; + private Object anytype2; + private Object anytype3; protected AdditionalPropertiesClass(AdditionalPropertiesClassBuilder b) { this.mapString = b.mapString; @@ -96,7 +96,7 @@ public AdditionalPropertiesClass mapNumber(Map mapNumber) { @ApiModelProperty(value = "") @JsonProperty("map_number") - public Map getMapNumber() { +@Valid public Map getMapNumber() { return mapNumber; } @@ -201,7 +201,7 @@ public AdditionalPropertiesClass mapArrayInteger(Map> mapA @ApiModelProperty(value = "") @JsonProperty("map_array_integer") - public Map> getMapArrayInteger() { +@Valid public Map> getMapArrayInteger() { return mapArrayInteger; } @@ -236,7 +236,7 @@ public AdditionalPropertiesClass mapArrayAnytype(Map> mapAr @ApiModelProperty(value = "") @JsonProperty("map_array_anytype") - public Map> getMapArrayAnytype() { +@Valid public Map> getMapArrayAnytype() { return mapArrayAnytype; } @@ -271,7 +271,7 @@ public AdditionalPropertiesClass mapMapString(Map> m @ApiModelProperty(value = "") @JsonProperty("map_map_string") - public Map> getMapMapString() { +@Valid public Map> getMapMapString() { return mapMapString; } @@ -306,7 +306,7 @@ public AdditionalPropertiesClass mapMapAnytype(Map> @ApiModelProperty(value = "") @JsonProperty("map_map_anytype") - public Map> getMapMapAnytype() { +@Valid public Map> getMapMapAnytype() { return mapMapAnytype; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index 376aa5a7c61a..64e55681b1ea 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesInteger") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesInteger extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index 03cf9a126d22..1f83ce76fa72 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -21,7 +21,7 @@ @JsonTypeName("AdditionalPropertiesNumber") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesNumber extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index b9fae3edf820..59e8a7a17b65 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesObject") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesObject extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index 9790203702ec..6085f6cf87d0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -20,7 +20,7 @@ @JsonTypeName("AdditionalPropertiesString") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class AdditionalPropertiesString extends HashMap implements Serializable { - private @Valid String name; + private String name; /** **/ diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java index e046b586acda..2928198242a7 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java @@ -27,8 +27,8 @@ @JsonTypeName("Animal") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Animal implements Serializable { - private @Valid String className; - private @Valid String color = "red"; + private String className; + private String color = "red"; protected Animal(AnimalBuilder b) { this.className = b.className; @@ -48,8 +48,7 @@ public Animal className(String className) { @ApiModelProperty(required = true, value = "") @JsonProperty("className") - @NotNull - public String getClassName() { +@NotNull public String getClassName() { return className; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 1f47464d3c53..ccb4ebe0da07 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -40,7 +40,7 @@ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr @ApiModelProperty(value = "") @JsonProperty("ArrayArrayNumber") - public List> getArrayArrayNumber() { +@Valid public List<@Valid List<@Valid BigDecimal>> getArrayArrayNumber() { return arrayArrayNumber; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index bab3b7270573..0f198aa3b9a8 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -40,7 +40,7 @@ public ArrayOfNumberOnly arrayNumber(List arrayNumber) { @ApiModelProperty(value = "") @JsonProperty("ArrayNumber") - public List getArrayNumber() { +@Valid public List<@Valid BigDecimal> getArrayNumber() { return arrayNumber; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java index 6ff8393ed09f..82c4026ab9c8 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ArrayTest.java @@ -79,7 +79,7 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { @ApiModelProperty(value = "") @JsonProperty("array_array_of_integer") - public List> getArrayArrayOfInteger() { +@Valid public List> getArrayArrayOfInteger() { return arrayArrayOfInteger; } @@ -114,7 +114,7 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) @ApiModelProperty(value = "") @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { +@Valid public List<@Valid List<@Valid ReadOnlyFirst>> getArrayArrayOfModel() { return arrayArrayOfModel; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java index 48dcefd8bdef..d63ba5f717fc 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCat.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private @Valid KindEnum kind; + private KindEnum kind; protected BigCat(BigCatBuilder b) { super(b); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java index 0ba47d26cf95..5a139bf2e485 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -66,7 +66,7 @@ public static KindEnum fromValue(String value) { } } - private @Valid KindEnum kind; + private KindEnum kind; protected BigCatAllOf(BigCatAllOfBuilder b) { this.kind = b.kind; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java index 3ce8aed5854e..a9316b48fac4 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Capitalization.java @@ -18,12 +18,12 @@ @JsonTypeName("Capitalization") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Capitalization implements Serializable { - private @Valid String smallCamel; - private @Valid String capitalCamel; - private @Valid String smallSnake; - private @Valid String capitalSnake; - private @Valid String scAETHFlowPoints; - private @Valid String ATT_NAME; + private String smallCamel; + private String capitalCamel; + private String smallSnake; + private String capitalSnake; + private String scAETHFlowPoints; + private String ATT_NAME; protected Capitalization(CapitalizationBuilder b) { this.smallCamel = b.smallCamel; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java index 58cad6cc8092..a150d9477ebf 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Cat.java @@ -19,7 +19,7 @@ @JsonTypeName("Cat") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Cat extends Animal implements Serializable { - private @Valid Boolean declawed; + private Boolean declawed; protected Cat(CatBuilder b) { super(b); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java index 43aa9b39cdf5..6b564aa60649 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java @@ -19,7 +19,7 @@ @JsonTypeName("Cat_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class CatAllOf implements Serializable { - private @Valid Boolean declawed; + private Boolean declawed; protected CatAllOf(CatAllOfBuilder b) { this.declawed = b.declawed; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java index 24d73db153b1..6011c9ec2c78 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Category.java @@ -18,8 +18,8 @@ @JsonTypeName("Category") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Category implements Serializable { - private @Valid Long id; - private @Valid String name = "default-name"; + private Long id; + private String name = "default-name"; protected Category(CategoryBuilder b) { this.id = b.id; @@ -58,8 +58,7 @@ public Category name(String name) { @ApiModelProperty(required = true, value = "") @JsonProperty("name") - @NotNull - public String getName() { +@NotNull public String getName() { return name; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java index d5d92b4dbc85..93a6865e964c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ClassModel.java @@ -20,7 +20,7 @@ @JsonTypeName("ClassModel") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ClassModel implements Serializable { - private @Valid String propertyClass; + private String propertyClass; protected ClassModel(ClassModelBuilder b) { this.propertyClass = b.propertyClass; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java index 899b63392296..f3403ff8d80e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Client.java @@ -18,7 +18,7 @@ @JsonTypeName("Client") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Client implements Serializable { - private @Valid String client; + private String client; protected Client(ClientBuilder b) { this.client = b.client; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java index cad870c8e461..cbd8ce1741fa 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Dog.java @@ -19,7 +19,7 @@ @JsonTypeName("Dog") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Dog extends Animal implements Serializable { - private @Valid String breed; + private String breed; protected Dog(DogBuilder b) { super(b); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java index 1034af7eb261..adc4680b7147 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java @@ -19,7 +19,7 @@ @JsonTypeName("Dog_allOf") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class DogAllOf implements Serializable { - private @Valid String breed; + private String breed; protected DogAllOf(DogAllOfBuilder b) { this.breed = b.breed; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java index 73891aaba0c1..9be82b9cfbbc 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java @@ -67,7 +67,7 @@ public static JustSymbolEnum fromValue(String value) { } } - private @Valid JustSymbolEnum justSymbol; + private JustSymbolEnum justSymbol; public enum ArrayEnumEnum { FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java index a5a94a0d35f6..d232922e41ca 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumTest.java @@ -67,7 +67,7 @@ public static EnumStringEnum fromValue(String value) { } } - private @Valid EnumStringEnum enumString; + private EnumStringEnum enumString; public enum EnumStringRequiredEnum { UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf("")); @@ -115,7 +115,7 @@ public static EnumStringRequiredEnum fromValue(String value) { } } - private @Valid EnumStringRequiredEnum enumStringRequired; + private EnumStringRequiredEnum enumStringRequired; public enum EnumIntegerEnum { NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1)); @@ -163,7 +163,7 @@ public static EnumIntegerEnum fromValue(Integer value) { } } - private @Valid EnumIntegerEnum enumInteger; + private EnumIntegerEnum enumInteger; public enum EnumNumberEnum { NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); @@ -211,8 +211,8 @@ public static EnumNumberEnum fromValue(Double value) { } } - private @Valid EnumNumberEnum enumNumber; - private @Valid OuterEnum outerEnum; + private EnumNumberEnum enumNumber; + private OuterEnum outerEnum; protected EnumTest(EnumTestBuilder b) { this.enumString = b.enumString; @@ -254,8 +254,7 @@ public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { @ApiModelProperty(required = true, value = "") @JsonProperty("enum_string_required") - @NotNull - public EnumStringRequiredEnum getEnumStringRequired() { +@NotNull public EnumStringRequiredEnum getEnumStringRequired() { return enumStringRequired; } @@ -312,7 +311,7 @@ public EnumTest outerEnum(OuterEnum outerEnum) { @ApiModelProperty(value = "") @JsonProperty("outerEnum") - public OuterEnum getOuterEnum() { +@Valid public OuterEnum getOuterEnum() { return outerEnum; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 0a79adf78448..f41368cd1e31 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -21,7 +21,7 @@ @JsonTypeName("FileSchemaTestClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FileSchemaTestClass implements Serializable { - private @Valid ModelFile _file; + private ModelFile _file; private @Valid List files = null; protected FileSchemaTestClass(FileSchemaTestClassBuilder b) { @@ -42,7 +42,7 @@ public FileSchemaTestClass _file(ModelFile _file) { @ApiModelProperty(value = "") @JsonProperty("file") - public ModelFile getFile() { +@Valid public ModelFile getFile() { return _file; } @@ -61,7 +61,7 @@ public FileSchemaTestClass files(List files) { @ApiModelProperty(value = "") @JsonProperty("files") - public List getFiles() { +@Valid public List<@Valid ModelFile> getFiles() { return files; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java index f64ed7b22ce5..0876e9d52a6b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/FormatTest.java @@ -25,20 +25,20 @@ @JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class FormatTest implements Serializable { - private @Valid Integer integer; - private @Valid Integer int32; - private @Valid Long int64; - private @Valid BigDecimal number; - private @Valid Float _float; - private @Valid Double _double; - private @Valid String string; - private @Valid byte[] _byte; - private @Valid File binary; - private @Valid LocalDate date; - private @Valid Date dateTime; - private @Valid UUID uuid; - private @Valid String password; - private @Valid BigDecimal bigDecimal; + private Integer integer; + private Integer int32; + private Long int64; + private BigDecimal number; + private Float _float; + private Double _double; + private String string; + private byte[] _byte; + private File binary; + private LocalDate date; + private Date dateTime; + private UUID uuid; + private String password; + private BigDecimal bigDecimal; protected FormatTest(FormatTestBuilder b) { this.integer = b.integer; @@ -133,8 +133,7 @@ public FormatTest number(BigDecimal number) { @ApiModelProperty(required = true, value = "") @JsonProperty("number") - @NotNull - @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { +@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { return number; } @@ -214,8 +213,7 @@ public FormatTest _byte(byte[] _byte) { @ApiModelProperty(required = true, value = "") @JsonProperty("byte") - @NotNull - @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public byte[] getByte() { +@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public byte[] getByte() { return _byte; } @@ -234,7 +232,7 @@ public FormatTest binary(File binary) { @ApiModelProperty(value = "") @JsonProperty("binary") - public File getBinary() { +@Valid public File getBinary() { return binary; } @@ -253,8 +251,7 @@ public FormatTest date(LocalDate date) { @ApiModelProperty(required = true, value = "") @JsonProperty("date") - @NotNull - public LocalDate getDate() { +@NotNull @Valid public LocalDate getDate() { return date; } @@ -273,7 +270,7 @@ public FormatTest dateTime(Date dateTime) { @ApiModelProperty(value = "") @JsonProperty("dateTime") - public Date getDateTime() { +@Valid public Date getDateTime() { return dateTime; } @@ -292,7 +289,7 @@ public FormatTest uuid(UUID uuid) { @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty("uuid") - public UUID getUuid() { +@Valid public UUID getUuid() { return uuid; } @@ -311,8 +308,7 @@ public FormatTest password(String password) { @ApiModelProperty(required = true, value = "") @JsonProperty("password") - @NotNull - @Size(min=10,max=64) public String getPassword() { +@NotNull @Size(min=10,max=64) public String getPassword() { return password; } @@ -331,7 +327,7 @@ public FormatTest bigDecimal(BigDecimal bigDecimal) { @ApiModelProperty(value = "") @JsonProperty("BigDecimal") - public BigDecimal getBigDecimal() { +@Valid public BigDecimal getBigDecimal() { return bigDecimal; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index e63688b8cec8..feab425fe06a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -19,8 +19,8 @@ @JsonTypeName("hasOnlyReadOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class HasOnlyReadOnly implements Serializable { - private @Valid String bar; - private @Valid String foo; + private String bar; + private String foo; protected HasOnlyReadOnly(HasOnlyReadOnlyBuilder b) { this.bar = b.bar; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java index d857d3073c0e..7f8f10ec3f7a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java @@ -92,7 +92,7 @@ public MapTest mapMapOfString(Map> mapMapOfString) { @ApiModelProperty(value = "") @JsonProperty("map_map_of_string") - public Map> getMapMapOfString() { +@Valid public Map> getMapMapOfString() { return mapMapOfString; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3237d6059a29..3277d67c208a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -23,8 +23,8 @@ @JsonTypeName("MixedPropertiesAndAdditionalPropertiesClass") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { - private @Valid UUID uuid; - private @Valid Date dateTime; + private UUID uuid; + private Date dateTime; private @Valid Map map = null; protected MixedPropertiesAndAdditionalPropertiesClass(MixedPropertiesAndAdditionalPropertiesClassBuilder b) { @@ -46,7 +46,7 @@ public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { @ApiModelProperty(value = "") @JsonProperty("uuid") - public UUID getUuid() { +@Valid public UUID getUuid() { return uuid; } @@ -65,7 +65,7 @@ public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { @ApiModelProperty(value = "") @JsonProperty("dateTime") - public Date getDateTime() { +@Valid public Date getDateTime() { return dateTime; } @@ -84,7 +84,7 @@ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) @ApiModelProperty(value = "") @JsonProperty("map") - public Map getMap() { +@Valid public Map getMap() { return map; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java index 61eabc7e506f..fdc4af0c933b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Model200Response.java @@ -21,8 +21,8 @@ @JsonTypeName("200_response") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Model200Response implements Serializable { - private @Valid Integer name; - private @Valid String propertyClass; + private Integer name; + private String propertyClass; protected Model200Response(Model200ResponseBuilder b) { this.name = b.name; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java index 2d7b88df51b1..83d5b1117086 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -19,9 +19,9 @@ @JsonTypeName("ApiResponse") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ModelApiResponse implements Serializable { - private @Valid Integer code; - private @Valid String type; - private @Valid String message; + private Integer code; + private String type; + private String message; protected ModelApiResponse(ModelApiResponseBuilder b) { this.code = b.code; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelFile.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelFile.java index 9ed686d7c2b9..b57716e4adb2 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelFile.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelFile.java @@ -21,7 +21,7 @@ @JsonTypeName("File") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ModelFile implements Serializable { - private @Valid String sourceURI; + private String sourceURI; protected ModelFile(ModelFileBuilder b) { this.sourceURI = b.sourceURI; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelList.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelList.java index 697bcd03cb55..037d9f769f10 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelList.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelList.java @@ -19,7 +19,7 @@ @JsonTypeName("List") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ModelList implements Serializable { - private @Valid String _123list; + private String _123list; protected ModelList(ModelListBuilder b) { this._123list = b._123list; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java index 54423218e1a3..aff7d1d68f3a 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ModelReturn.java @@ -21,7 +21,7 @@ @JsonTypeName("Return") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ModelReturn implements Serializable { - private @Valid Integer _return; + private Integer _return; protected ModelReturn(ModelReturnBuilder b) { this._return = b._return; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java index 6f4930623c08..e29eda28cce2 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Name.java @@ -20,10 +20,10 @@ @JsonTypeName("Name") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Name implements Serializable { - private @Valid Integer name; - private @Valid Integer snakeCase; - private @Valid String property; - private @Valid Integer _123number; + private Integer name; + private Integer snakeCase; + private String property; + private Integer _123number; protected Name(NameBuilder b) { this.name = b.name; @@ -45,8 +45,7 @@ public Name name(Integer name) { @ApiModelProperty(required = true, value = "") @JsonProperty("name") - @NotNull - public Integer getName() { +@NotNull public Integer getName() { return name; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java index 3dae70637105..d91a17e52d32 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/NumberOnly.java @@ -19,7 +19,7 @@ @JsonTypeName("NumberOnly") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class NumberOnly implements Serializable { - private @Valid BigDecimal justNumber; + private BigDecimal justNumber; protected NumberOnly(NumberOnlyBuilder b) { this.justNumber = b.justNumber; @@ -38,7 +38,7 @@ public NumberOnly justNumber(BigDecimal justNumber) { @ApiModelProperty(value = "") @JsonProperty("JustNumber") - public BigDecimal getJustNumber() { +@Valid public BigDecimal getJustNumber() { return justNumber; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java index 4df554866043..996ee1c545b1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Order.java @@ -19,10 +19,10 @@ @JsonTypeName("Order") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Order implements Serializable { - private @Valid Long id; - private @Valid Long petId; - private @Valid Integer quantity; - private @Valid Date shipDate; + private Long id; + private Long petId; + private Integer quantity; + private Date shipDate; public enum StatusEnum { PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); @@ -70,8 +70,8 @@ public static StatusEnum fromValue(String value) { } } - private @Valid StatusEnum status; - private @Valid Boolean complete = false; + private StatusEnum status; + private Boolean complete = false; protected Order(OrderBuilder b) { this.id = b.id; @@ -152,7 +152,7 @@ public Order shipDate(Date shipDate) { @ApiModelProperty(value = "") @JsonProperty("shipDate") - public Date getShipDate() { +@Valid public Date getShipDate() { return shipDate; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java index c9a4b090f843..700217282ac7 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/OuterComposite.java @@ -19,9 +19,9 @@ @JsonTypeName("OuterComposite") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class OuterComposite implements Serializable { - private @Valid BigDecimal myNumber; - private @Valid String myString; - private @Valid Boolean myBoolean; + private BigDecimal myNumber; + private String myString; + private Boolean myBoolean; protected OuterComposite(OuterCompositeBuilder b) { this.myNumber = b.myNumber; @@ -42,7 +42,7 @@ public OuterComposite myNumber(BigDecimal myNumber) { @ApiModelProperty(value = "") @JsonProperty("my_number") - public BigDecimal getMyNumber() { +@Valid public BigDecimal getMyNumber() { return myNumber; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java index c91f0b0ac947..0b8a79759199 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Pet.java @@ -25,9 +25,9 @@ @JsonTypeName("Pet") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Pet implements Serializable { - private @Valid Long id; - private @Valid Category category; - private @Valid String name; + private Long id; + private Category category; + private String name; private @Valid Set photoUrls = new LinkedHashSet<>(); private @Valid List tags = null; public enum StatusEnum { @@ -77,7 +77,7 @@ public static StatusEnum fromValue(String value) { } } - private @Valid StatusEnum status; + private StatusEnum status; protected Pet(PetBuilder b) { this.id = b.id; @@ -120,7 +120,7 @@ public Pet category(Category category) { @ApiModelProperty(value = "") @JsonProperty("category") - public Category getCategory() { +@Valid public Category getCategory() { return category; } @@ -139,8 +139,7 @@ public Pet name(String name) { @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") - @NotNull - public String getName() { +@NotNull public String getName() { return name; } @@ -159,8 +158,7 @@ public Pet photoUrls(Set photoUrls) { @ApiModelProperty(required = true, value = "") @JsonProperty("photoUrls") - @NotNull - public Set getPhotoUrls() { +@NotNull public Set getPhotoUrls() { return photoUrls; } @@ -196,7 +194,7 @@ public Pet tags(List tags) { @ApiModelProperty(value = "") @JsonProperty("tags") - public List getTags() { +@Valid public List<@Valid Tag> getTags() { return tags; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index c5373629fa43..94dbb828720f 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -18,8 +18,8 @@ @JsonTypeName("ReadOnlyFirst") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class ReadOnlyFirst implements Serializable { - private @Valid String bar; - private @Valid String baz; + private String bar; + private String baz; protected ReadOnlyFirst(ReadOnlyFirstBuilder b) { this.bar = b.bar; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java index 0faf305fcf42..c2208b3e0a06 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -19,7 +19,7 @@ @JsonTypeName("$special[model.name]") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class SpecialModelName implements Serializable { - private @Valid Long $specialPropertyName; + private Long $specialPropertyName; protected SpecialModelName(SpecialModelNameBuilder b) { this.$specialPropertyName = b.$specialPropertyName; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java index c29fb28af0e9..c649eb83e659 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Tag.java @@ -18,8 +18,8 @@ @JsonTypeName("Tag") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class Tag implements Serializable { - private @Valid Long id; - private @Valid String name; + private Long id; + private String name; protected Tag(TagBuilder b) { this.id = b.id; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java index a8a293b2e0f8..7e4d154b8546 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -21,10 +21,10 @@ @JsonTypeName("TypeHolderDefault") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class TypeHolderDefault implements Serializable { - private @Valid String stringItem = "what"; - private @Valid BigDecimal numberItem; - private @Valid Integer integerItem; - private @Valid Boolean boolItem = true; + private String stringItem = "what"; + private BigDecimal numberItem; + private Integer integerItem; + private Boolean boolItem = true; private @Valid List arrayItem = new ArrayList<>(); protected TypeHolderDefault(TypeHolderDefaultBuilder b) { @@ -48,8 +48,7 @@ public TypeHolderDefault stringItem(String stringItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("string_item") - @NotNull - public String getStringItem() { +@NotNull public String getStringItem() { return stringItem; } @@ -68,8 +67,7 @@ public TypeHolderDefault numberItem(BigDecimal numberItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("number_item") - @NotNull - public BigDecimal getNumberItem() { +@NotNull @Valid public BigDecimal getNumberItem() { return numberItem; } @@ -88,8 +86,7 @@ public TypeHolderDefault integerItem(Integer integerItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("integer_item") - @NotNull - public Integer getIntegerItem() { +@NotNull public Integer getIntegerItem() { return integerItem; } @@ -108,8 +105,7 @@ public TypeHolderDefault boolItem(Boolean boolItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("bool_item") - @NotNull - public Boolean getBoolItem() { +@NotNull public Boolean getBoolItem() { return boolItem; } @@ -128,8 +124,7 @@ public TypeHolderDefault arrayItem(List arrayItem) { @ApiModelProperty(required = true, value = "") @JsonProperty("array_item") - @NotNull - public List getArrayItem() { +@NotNull public List getArrayItem() { return arrayItem; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java index 2b48909d9e37..b4cd2bb5bcd5 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -21,11 +21,11 @@ @JsonTypeName("TypeHolderExample") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class TypeHolderExample implements Serializable { - private @Valid String stringItem; - private @Valid BigDecimal numberItem; - private @Valid Float floatItem; - private @Valid Integer integerItem; - private @Valid Boolean boolItem; + private String stringItem; + private BigDecimal numberItem; + private Float floatItem; + private Integer integerItem; + private Boolean boolItem; private @Valid List arrayItem = new ArrayList<>(); protected TypeHolderExample(TypeHolderExampleBuilder b) { @@ -50,8 +50,7 @@ public TypeHolderExample stringItem(String stringItem) { @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty("string_item") - @NotNull - public String getStringItem() { +@NotNull public String getStringItem() { return stringItem; } @@ -70,8 +69,7 @@ public TypeHolderExample numberItem(BigDecimal numberItem) { @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("number_item") - @NotNull - public BigDecimal getNumberItem() { +@NotNull @Valid public BigDecimal getNumberItem() { return numberItem; } @@ -90,8 +88,7 @@ public TypeHolderExample floatItem(Float floatItem) { @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty("float_item") - @NotNull - public Float getFloatItem() { +@NotNull public Float getFloatItem() { return floatItem; } @@ -110,8 +107,7 @@ public TypeHolderExample integerItem(Integer integerItem) { @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty("integer_item") - @NotNull - public Integer getIntegerItem() { +@NotNull public Integer getIntegerItem() { return integerItem; } @@ -130,8 +126,7 @@ public TypeHolderExample boolItem(Boolean boolItem) { @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty("bool_item") - @NotNull - public Boolean getBoolItem() { +@NotNull public Boolean getBoolItem() { return boolItem; } @@ -150,8 +145,7 @@ public TypeHolderExample arrayItem(List arrayItem) { @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") @JsonProperty("array_item") - @NotNull - public List getArrayItem() { +@NotNull public List getArrayItem() { return arrayItem; } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java index 27ac9ad24d08..5fe77d712542 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/User.java @@ -18,14 +18,14 @@ @JsonTypeName("User") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class User implements Serializable { - private @Valid Long id; - private @Valid String username; - private @Valid String firstName; - private @Valid String lastName; - private @Valid String email; - private @Valid String password; - private @Valid String phone; - private @Valid Integer userStatus; + private Long id; + private String username; + private String firstName; + private String lastName; + private String email; + private String password; + private String phone; + private Integer userStatus; protected User(UserBuilder b) { this.id = b.id; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java index a3c4378d8099..15955d93efbb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/XmlItem.java @@ -21,33 +21,33 @@ @JsonTypeName("XmlItem") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") public class XmlItem implements Serializable { - private @Valid String attributeString; - private @Valid BigDecimal attributeNumber; - private @Valid Integer attributeInteger; - private @Valid Boolean attributeBoolean; + private String attributeString; + private BigDecimal attributeNumber; + private Integer attributeInteger; + private Boolean attributeBoolean; private @Valid List wrappedArray = null; - private @Valid String nameString; - private @Valid BigDecimal nameNumber; - private @Valid Integer nameInteger; - private @Valid Boolean nameBoolean; + private String nameString; + private BigDecimal nameNumber; + private Integer nameInteger; + private Boolean nameBoolean; private @Valid List nameArray = null; private @Valid List nameWrappedArray = null; - private @Valid String prefixString; - private @Valid BigDecimal prefixNumber; - private @Valid Integer prefixInteger; - private @Valid Boolean prefixBoolean; + private String prefixString; + private BigDecimal prefixNumber; + private Integer prefixInteger; + private Boolean prefixBoolean; private @Valid List prefixArray = null; private @Valid List prefixWrappedArray = null; - private @Valid String namespaceString; - private @Valid BigDecimal namespaceNumber; - private @Valid Integer namespaceInteger; - private @Valid Boolean namespaceBoolean; + private String namespaceString; + private BigDecimal namespaceNumber; + private Integer namespaceInteger; + private Boolean namespaceBoolean; private @Valid List namespaceArray = null; private @Valid List namespaceWrappedArray = null; - private @Valid String prefixNsString; - private @Valid BigDecimal prefixNsNumber; - private @Valid Integer prefixNsInteger; - private @Valid Boolean prefixNsBoolean; + private String prefixNsString; + private BigDecimal prefixNsNumber; + private Integer prefixNsInteger; + private Boolean prefixNsBoolean; private @Valid List prefixNsArray = null; private @Valid List prefixNsWrappedArray = null; @@ -115,7 +115,7 @@ public XmlItem attributeNumber(BigDecimal attributeNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("attribute_number") - public BigDecimal getAttributeNumber() { +@Valid public BigDecimal getAttributeNumber() { return attributeNumber; } @@ -226,7 +226,7 @@ public XmlItem nameNumber(BigDecimal nameNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("name_number") - public BigDecimal getNameNumber() { +@Valid public BigDecimal getNameNumber() { return nameNumber; } @@ -372,7 +372,7 @@ public XmlItem prefixNumber(BigDecimal prefixNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_number") - public BigDecimal getPrefixNumber() { +@Valid public BigDecimal getPrefixNumber() { return prefixNumber; } @@ -518,7 +518,7 @@ public XmlItem namespaceNumber(BigDecimal namespaceNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("namespace_number") - public BigDecimal getNamespaceNumber() { +@Valid public BigDecimal getNamespaceNumber() { return namespaceNumber; } @@ -664,7 +664,7 @@ public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { @ApiModelProperty(example = "1.234", value = "") @JsonProperty("prefix_ns_number") - public BigDecimal getPrefixNsNumber() { +@Valid public BigDecimal getPrefixNsNumber() { return prefixNsNumber; }