[Java][JaxRs] bean validation annotation (e.g. NotNull) is applied to body param of api interface (#2239)

* fix template so that bean validation annotation (incl. NotNull) is applied to api interface.

* regenerate samples
This commit is contained in:
Dec12 | Fujigon 2019-02-27 12:38:57 +09:00 committed by William Cheng
parent b5ce0bddee
commit 5fe0c94135
148 changed files with 331 additions and 451 deletions

View File

@ -1,4 +1 @@
{{#required}}
@NotNull
{{/required}}
{{>beanValidationCore}}
{{#required}}@NotNull {{/required}}{{^isPrimitiveType}}{{^isDate}}{{^isDateTime}}{{^isString}}{{^isFile}}@Valid {{/isFile}}{{/isString}}{{/isDateTime}}{{/isDate}}{{/isPrimitiveType}}{{>beanValidationCore}}

View File

@ -1 +1 @@
{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}

View File

@ -83,7 +83,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
@JsonProperty("{{baseName}}")
{{/jackson}}
@ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
{{#useBeanValidation}}{{>beanValidation}}{{^isPrimitiveType}}{{^isDate}}{{^isDateTime}}{{^isString}}{{^isFile}}@Valid{{/isFile}}{{/isString}}{{/isDateTime}}{{/isDate}}{{/isPrimitiveType}}{{/useBeanValidation}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}
public {{{datatypeWithEnum}}} {{getter}}() {
return {{name}};
}

View File

@ -62,7 +62,7 @@ public class AnotherFakeApi {
@io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.call123testSpecialTags(body,securityContext);

View File

@ -72,7 +72,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @Valid XmlItem xmlItem
public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createXmlItem(xmlItem,securityContext);
@ -84,7 +84,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid Boolean body
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterBooleanSerialize(body,securityContext);
@ -108,7 +108,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid BigDecimal body
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterNumberSerialize(body,securityContext);
@ -120,7 +120,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) })
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid String body
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterStringSerialize(body,securityContext);
@ -132,7 +132,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @Valid FileSchemaTestClass body
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithFileSchema(body,securityContext);
@ -145,7 +145,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithQueryParams(@ApiParam(value = "",required=true) @QueryParam("query") String query
,@ApiParam(value = "" ,required=true) @Valid User body
,@ApiParam(value = "" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithQueryParams(query,body,securityContext);
@ -157,7 +157,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response testClientModel(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClientModel(body,securityContext);
@ -238,7 +238,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @Valid Map<String, String> param
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map<String, String> param
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param,securityContext);

View File

@ -64,7 +64,7 @@ public class FakeClassnameTestApi {
}, tags={ "fake_classname_tags 123#$%^", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClassname(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response testClassname(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClassname(body,securityContext);

View File

@ -69,7 +69,7 @@ public class PetApi {
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPet(body,securityContext);
@ -164,7 +164,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePet(body,securityContext);

View File

@ -108,7 +108,7 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @Valid Order body
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.placeOrder(body,securityContext);

View File

@ -63,7 +63,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUser(@ApiParam(value = "Created user object" ,required=true) @Valid User body
public Response createUser(@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUser(body,securityContext);
@ -75,7 +75,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext);
@ -87,7 +87,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext);
@ -158,7 +158,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
,@ApiParam(value = "Updated user object" ,required=true) @Valid User body
,@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updateUser(username,body,securityContext);

View File

@ -47,7 +47,6 @@ public class Animal implements Serializable {
@JsonProperty("className")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getClassName() {
return className;
}

View File

@ -65,7 +65,6 @@ public class Category implements Serializable {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getName() {
return name;
}

View File

@ -204,7 +204,6 @@ public class EnumTest implements Serializable {
@JsonProperty("enum_string_required")
@ApiModelProperty(required = true, value = "")
@NotNull
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}

View File

@ -148,8 +148,7 @@ public class FormatTest implements Serializable {
**/
@JsonProperty("number")
@ApiModelProperty(required = true, value = "")
@NotNull
@DecimalMin("32.1") @DecimalMax("543.2")@Valid
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")
public BigDecimal getNumber() {
return number;
}
@ -233,8 +232,7 @@ public class FormatTest implements Serializable {
**/
@JsonProperty("byte")
@ApiModelProperty(required = true, value = "")
@NotNull
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
public byte[] getByte() {
return _byte;
}
@ -275,7 +273,6 @@ public class FormatTest implements Serializable {
@JsonProperty("date")
@ApiModelProperty(required = true, value = "")
@NotNull
public LocalDate getDate() {
return date;
}
@ -335,8 +332,7 @@ public class FormatTest implements Serializable {
**/
@JsonProperty("password")
@ApiModelProperty(required = true, value = "")
@NotNull
@Size(min=10,max=64)
@NotNull @Size(min=10,max=64)
public String getPassword() {
return password;
}

View File

@ -52,7 +52,6 @@ public class Name implements Serializable {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getName() {
return name;
}

View File

@ -135,7 +135,6 @@ public class Pet implements Serializable {
@JsonProperty("name")
@ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() {
return name;
}
@ -161,7 +160,6 @@ public class Pet implements Serializable {
@JsonProperty("photoUrls")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() {
return photoUrls;
}

View File

@ -57,7 +57,6 @@ public class TypeHolderDefault implements Serializable {
@JsonProperty("string_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -77,8 +76,7 @@ public class TypeHolderDefault implements Serializable {
**/
@JsonProperty("number_item")
@ApiModelProperty(required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -99,7 +97,6 @@ public class TypeHolderDefault implements Serializable {
@JsonProperty("integer_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -120,7 +117,6 @@ public class TypeHolderDefault implements Serializable {
@JsonProperty("bool_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -146,7 +142,6 @@ public class TypeHolderDefault implements Serializable {
@JsonProperty("array_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -57,7 +57,6 @@ public class TypeHolderExample implements Serializable {
@JsonProperty("string_item")
@ApiModelProperty(example = "what", required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -77,8 +76,7 @@ public class TypeHolderExample implements Serializable {
**/
@JsonProperty("number_item")
@ApiModelProperty(example = "1.234", required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -99,7 +97,6 @@ public class TypeHolderExample implements Serializable {
@JsonProperty("integer_item")
@ApiModelProperty(example = "-2", required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -120,7 +117,6 @@ public class TypeHolderExample implements Serializable {
@JsonProperty("bool_item")
@ApiModelProperty(example = "true", required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -146,7 +142,6 @@ public class TypeHolderExample implements Serializable {
@JsonProperty("array_item")
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -62,7 +62,7 @@ public class AnotherFakeApi {
@io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @Valid Client client
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client client
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.call123testSpecialTags(client,securityContext);

View File

@ -82,7 +82,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid Boolean body
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterBooleanSerialize(body,securityContext);
@ -106,7 +106,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid BigDecimal body
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterNumberSerialize(body,securityContext);
@ -118,7 +118,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) })
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid String body
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterStringSerialize(body,securityContext);
@ -130,7 +130,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @Valid FileSchemaTestClass fileSchemaTestClass
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass fileSchemaTestClass
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithFileSchema(fileSchemaTestClass,securityContext);
@ -143,7 +143,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithQueryParams(@ApiParam(value = "",required=true) @QueryParam("query") String query
,@ApiParam(value = "" ,required=true) @Valid User user
,@ApiParam(value = "" ,required=true) @NotNull @Valid User user
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithQueryParams(query,user,securityContext);
@ -155,7 +155,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(@ApiParam(value = "client model" ,required=true) @Valid Client client
public Response testClientModel(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client client
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClientModel(client,securityContext);
@ -238,7 +238,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @Valid Map<String, String> requestBody
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map<String, String> requestBody
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(requestBody,securityContext);

View File

@ -64,7 +64,7 @@ public class FakeClassnameTestApi {
}, tags={ "fake_classname_tags 123#$%^", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClassname(@ApiParam(value = "client model" ,required=true) @Valid Client client
public Response testClassname(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client client
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClassname(client,securityContext);

View File

@ -69,7 +69,7 @@ public class PetApi {
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet pet
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet pet
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPet(pet,securityContext);
@ -164,7 +164,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet pet
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet pet
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePet(pet,securityContext);

View File

@ -108,7 +108,7 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @Valid Order order
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order order
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.placeOrder(order,securityContext);

View File

@ -63,7 +63,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUser(@ApiParam(value = "Created user object" ,required=true) @Valid User user
public Response createUser(@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User user
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUser(user,securityContext);
@ -75,7 +75,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @Valid List<User> user
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> user
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithArrayInput(user,securityContext);
@ -87,7 +87,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @Valid List<User> user
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> user
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithListInput(user,securityContext);
@ -158,7 +158,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
,@ApiParam(value = "Updated user object" ,required=true) @Valid User user
,@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User user
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updateUser(username,user,securityContext);

View File

@ -46,7 +46,6 @@ public class Animal {
@JsonProperty("className")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getClassName() {
return className;
}

View File

@ -64,7 +64,6 @@ public class Category {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getName() {
return name;
}

View File

@ -215,7 +215,6 @@ public class EnumTest {
@JsonProperty("enum_string_required")
@ApiModelProperty(required = true, value = "")
@NotNull
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}

View File

@ -152,8 +152,7 @@ public class FormatTest {
**/
@JsonProperty("number")
@ApiModelProperty(required = true, value = "")
@NotNull
@DecimalMin("32.1") @DecimalMax("543.2")@Valid
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")
public BigDecimal getNumber() {
return number;
}
@ -238,7 +237,6 @@ public class FormatTest {
@JsonProperty("byte")
@ApiModelProperty(required = true, value = "")
@NotNull
public byte[] getByte() {
return _byte;
}
@ -279,7 +277,6 @@ public class FormatTest {
@JsonProperty("date")
@ApiModelProperty(required = true, value = "")
@NotNull
public Date getDate() {
return date;
}
@ -339,8 +336,7 @@ public class FormatTest {
**/
@JsonProperty("password")
@ApiModelProperty(required = true, value = "")
@NotNull
@Size(min=10,max=64)
@NotNull @Size(min=10,max=64)
public String getPassword() {
return password;
}

View File

@ -148,8 +148,7 @@ public class InlineObject3 {
**/
@JsonProperty("number")
@ApiModelProperty(required = true, value = "None")
@NotNull
@DecimalMin("32.1") @DecimalMax("543.2")@Valid
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")
public BigDecimal getNumber() {
return number;
}
@ -192,8 +191,7 @@ public class InlineObject3 {
**/
@JsonProperty("double")
@ApiModelProperty(required = true, value = "None")
@NotNull
@DecimalMin("67.8") @DecimalMax("123.4")
@NotNull @DecimalMin("67.8") @DecimalMax("123.4")
public Double getDouble() {
return _double;
}
@ -233,8 +231,7 @@ public class InlineObject3 {
**/
@JsonProperty("pattern_without_delimiter")
@ApiModelProperty(required = true, value = "None")
@NotNull
@Pattern(regexp="^[A-Z].*")
@NotNull @Pattern(regexp="^[A-Z].*")
public String getPatternWithoutDelimiter() {
return patternWithoutDelimiter;
}
@ -255,7 +252,6 @@ public class InlineObject3 {
@JsonProperty("byte")
@ApiModelProperty(required = true, value = "None")
@NotNull
public byte[] getByte() {
return _byte;
}

View File

@ -44,7 +44,6 @@ public class InlineObject4 {
@JsonProperty("param")
@ApiModelProperty(required = true, value = "field1")
@NotNull
public String getParam() {
return param;
}
@ -65,7 +64,6 @@ public class InlineObject4 {
@JsonProperty("param2")
@ApiModelProperty(required = true, value = "field2")
@NotNull
public String getParam2() {
return param2;
}

View File

@ -65,7 +65,6 @@ public class InlineObject5 {
@JsonProperty("requiredFile")
@ApiModelProperty(required = true, value = "file to upload")
@NotNull
public File getRequiredFile() {
return requiredFile;
}

View File

@ -51,7 +51,6 @@ public class Name {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getName() {
return name;
}

View File

@ -134,7 +134,6 @@ public class Pet {
@JsonProperty("name")
@ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() {
return name;
}
@ -160,7 +159,6 @@ public class Pet {
@JsonProperty("photoUrls")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() {
return photoUrls;
}

View File

@ -41,7 +41,7 @@ public class AnotherFakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response call123testSpecialTags(
@ApiParam(value = "client model" ,required=true) @Valid Client body,
@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.call123testSpecialTags(body,securityContext);

View File

@ -49,7 +49,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createXmlItem(
@ApiParam(value = "XmlItem Body" ,required=true) @Valid XmlItem xmlItem,
@ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createXmlItem(xmlItem,securityContext);
@ -62,7 +62,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
public Response fakeOuterBooleanSerialize(
@ApiParam(value = "Input boolean as post body" ) @Valid Boolean body,
@ApiParam(value = "Input boolean as post body" ) Boolean body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterBooleanSerialize(body,securityContext);
@ -88,7 +88,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
public Response fakeOuterNumberSerialize(
@ApiParam(value = "Input number as post body" ) @Valid BigDecimal body,
@ApiParam(value = "Input number as post body" ) BigDecimal body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterNumberSerialize(body,securityContext);
@ -101,7 +101,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) })
public Response fakeOuterStringSerialize(
@ApiParam(value = "Input string as post body" ) @Valid String body,
@ApiParam(value = "Input string as post body" ) String body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterStringSerialize(body,securityContext);
@ -114,7 +114,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithFileSchema(
@ApiParam(value = "" ,required=true) @Valid FileSchemaTestClass body,
@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithFileSchema(body,securityContext);
@ -128,7 +128,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithQueryParams(
@ApiParam(value = "",required=true) @QueryParam("query") String query,
@ApiParam(value = "" ,required=true) @Valid User body,
@ApiParam(value = "" ,required=true) @NotNull @Valid User body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithQueryParams(query,body,securityContext);
@ -141,7 +141,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(
@ApiParam(value = "client model" ,required=true) @Valid Client body,
@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClientModel(body,securityContext);
@ -223,7 +223,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(
@ApiParam(value = "request body" ,required=true) @Valid Map<String, String> param,
@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map<String, String> param,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param,securityContext);

View File

@ -43,7 +43,7 @@ public class FakeClassnameTags123Api {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClassname(
@ApiParam(value = "client model" ,required=true) @Valid Client body,
@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClassname(body,securityContext);

View File

@ -48,7 +48,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response addPet(
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body,
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPet(body,securityContext);
@ -142,7 +142,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
public Response updatePet(
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body,
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePet(body,securityContext);

View File

@ -86,7 +86,7 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
public Response placeOrder(
@ApiParam(value = "order placed for purchasing the pet" ,required=true) @Valid Order body,
@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.placeOrder(body,securityContext);

View File

@ -42,7 +42,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUser(
@ApiParam(value = "Created user object" ,required=true) @Valid User body,
@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUser(body,securityContext);
@ -55,7 +55,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(
@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body,
@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext);
@ -68,7 +68,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(
@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body,
@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext);
@ -139,7 +139,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response updateUser(
@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username,
@ApiParam(value = "Updated user object" ,required=true) @Valid User body,
@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updateUser(username,body,securityContext);

View File

@ -46,7 +46,6 @@ public class Animal {
@JsonProperty("className")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getClassName() {
return className;
}

View File

@ -64,7 +64,6 @@ public class Category {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getName() {
return name;
}

View File

@ -203,7 +203,6 @@ public class EnumTest {
@JsonProperty("enum_string_required")
@ApiModelProperty(required = true, value = "")
@NotNull
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}

View File

@ -146,8 +146,7 @@ public class FormatTest {
**/
@JsonProperty("number")
@ApiModelProperty(required = true, value = "")
@NotNull
@DecimalMin("32.1") @DecimalMax("543.2")@Valid
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")
public BigDecimal getNumber() {
return number;
}
@ -231,8 +230,7 @@ public class FormatTest {
**/
@JsonProperty("byte")
@ApiModelProperty(required = true, value = "")
@NotNull
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
public byte[] getByte() {
return _byte;
}
@ -273,7 +271,6 @@ public class FormatTest {
@JsonProperty("date")
@ApiModelProperty(required = true, value = "")
@NotNull
public Date getDate() {
return date;
}
@ -333,8 +330,7 @@ public class FormatTest {
**/
@JsonProperty("password")
@ApiModelProperty(required = true, value = "")
@NotNull
@Size(min=10,max=64)
@NotNull @Size(min=10,max=64)
public String getPassword() {
return password;
}

View File

@ -51,7 +51,6 @@ public class Name {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getName() {
return name;
}

View File

@ -134,7 +134,6 @@ public class Pet {
@JsonProperty("name")
@ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() {
return name;
}
@ -160,7 +159,6 @@ public class Pet {
@JsonProperty("photoUrls")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() {
return photoUrls;
}

View File

@ -56,7 +56,6 @@ public class TypeHolderDefault {
@JsonProperty("string_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -76,8 +75,7 @@ public class TypeHolderDefault {
**/
@JsonProperty("number_item")
@ApiModelProperty(required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -98,7 +96,6 @@ public class TypeHolderDefault {
@JsonProperty("integer_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -119,7 +116,6 @@ public class TypeHolderDefault {
@JsonProperty("bool_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -145,7 +141,6 @@ public class TypeHolderDefault {
@JsonProperty("array_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -56,7 +56,6 @@ public class TypeHolderExample {
@JsonProperty("string_item")
@ApiModelProperty(example = "what", required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -76,8 +75,7 @@ public class TypeHolderExample {
**/
@JsonProperty("number_item")
@ApiModelProperty(example = "1.234", required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -98,7 +96,6 @@ public class TypeHolderExample {
@JsonProperty("integer_item")
@ApiModelProperty(example = "-2", required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -119,7 +116,6 @@ public class TypeHolderExample {
@JsonProperty("bool_item")
@ApiModelProperty(example = "true", required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -145,7 +141,6 @@ public class TypeHolderExample {
@JsonProperty("array_item")
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -41,7 +41,7 @@ public class AnotherFakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response call123testSpecialTags(
@ApiParam(value = "client model" ,required=true) @Valid Client body,
@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.call123testSpecialTags(body,securityContext);

View File

@ -50,7 +50,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createXmlItem(
@ApiParam(value = "XmlItem Body" ,required=true) @Valid XmlItem xmlItem,
@ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createXmlItem(xmlItem,securityContext);
@ -63,7 +63,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
public Response fakeOuterBooleanSerialize(
@ApiParam(value = "Input boolean as post body" ) @Valid Boolean body,
@ApiParam(value = "Input boolean as post body" ) Boolean body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterBooleanSerialize(body,securityContext);
@ -89,7 +89,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
public Response fakeOuterNumberSerialize(
@ApiParam(value = "Input number as post body" ) @Valid BigDecimal body,
@ApiParam(value = "Input number as post body" ) BigDecimal body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterNumberSerialize(body,securityContext);
@ -102,7 +102,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) })
public Response fakeOuterStringSerialize(
@ApiParam(value = "Input string as post body" ) @Valid String body,
@ApiParam(value = "Input string as post body" ) String body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterStringSerialize(body,securityContext);
@ -115,7 +115,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithFileSchema(
@ApiParam(value = "" ,required=true) @Valid FileSchemaTestClass body,
@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithFileSchema(body,securityContext);
@ -129,7 +129,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithQueryParams(
@ApiParam(value = "",required=true) @QueryParam("query") String query,
@ApiParam(value = "" ,required=true) @Valid User body,
@ApiParam(value = "" ,required=true) @NotNull @Valid User body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithQueryParams(query,body,securityContext);
@ -142,7 +142,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(
@ApiParam(value = "client model" ,required=true) @Valid Client body,
@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClientModel(body,securityContext);
@ -224,7 +224,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(
@ApiParam(value = "request body" ,required=true) @Valid Map<String, String> param,
@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map<String, String> param,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param,securityContext);

View File

@ -43,7 +43,7 @@ public class FakeClassnameTestApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClassname(
@ApiParam(value = "client model" ,required=true) @Valid Client body,
@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClassname(body,securityContext);

View File

@ -48,7 +48,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response addPet(
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body,
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPet(body,securityContext);
@ -142,7 +142,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
public Response updatePet(
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body,
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePet(body,securityContext);

View File

@ -86,7 +86,7 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
public Response placeOrder(
@ApiParam(value = "order placed for purchasing the pet" ,required=true) @Valid Order body,
@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.placeOrder(body,securityContext);

View File

@ -42,7 +42,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUser(
@ApiParam(value = "Created user object" ,required=true) @Valid User body,
@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUser(body,securityContext);
@ -55,7 +55,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(
@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body,
@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext);
@ -68,7 +68,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(
@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body,
@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext);
@ -139,7 +139,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response updateUser(
@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username,
@ApiParam(value = "Updated user object" ,required=true) @Valid User body,
@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body,
@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updateUser(username,body,securityContext);

View File

@ -46,7 +46,6 @@ public class Animal {
@JsonProperty("className")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getClassName() {
return className;
}

View File

@ -64,7 +64,6 @@ public class Category {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getName() {
return name;
}

View File

@ -203,7 +203,6 @@ public class EnumTest {
@JsonProperty("enum_string_required")
@ApiModelProperty(required = true, value = "")
@NotNull
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}

View File

@ -146,8 +146,7 @@ public class FormatTest {
**/
@JsonProperty("number")
@ApiModelProperty(required = true, value = "")
@NotNull
@DecimalMin("32.1") @DecimalMax("543.2")@Valid
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")
public BigDecimal getNumber() {
return number;
}
@ -231,8 +230,7 @@ public class FormatTest {
**/
@JsonProperty("byte")
@ApiModelProperty(required = true, value = "")
@NotNull
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
public byte[] getByte() {
return _byte;
}
@ -273,7 +271,6 @@ public class FormatTest {
@JsonProperty("date")
@ApiModelProperty(required = true, value = "")
@NotNull
public Date getDate() {
return date;
}
@ -333,8 +330,7 @@ public class FormatTest {
**/
@JsonProperty("password")
@ApiModelProperty(required = true, value = "")
@NotNull
@Size(min=10,max=64)
@NotNull @Size(min=10,max=64)
public String getPassword() {
return password;
}

View File

@ -51,7 +51,6 @@ public class Name {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getName() {
return name;
}

View File

@ -134,7 +134,6 @@ public class Pet {
@JsonProperty("name")
@ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() {
return name;
}
@ -160,7 +159,6 @@ public class Pet {
@JsonProperty("photoUrls")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() {
return photoUrls;
}

View File

@ -56,7 +56,6 @@ public class TypeHolderDefault {
@JsonProperty("string_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -76,8 +75,7 @@ public class TypeHolderDefault {
**/
@JsonProperty("number_item")
@ApiModelProperty(required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -98,7 +96,6 @@ public class TypeHolderDefault {
@JsonProperty("integer_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -119,7 +116,6 @@ public class TypeHolderDefault {
@JsonProperty("bool_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -145,7 +141,6 @@ public class TypeHolderDefault {
@JsonProperty("array_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -56,7 +56,6 @@ public class TypeHolderExample {
@JsonProperty("string_item")
@ApiModelProperty(example = "what", required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -76,8 +75,7 @@ public class TypeHolderExample {
**/
@JsonProperty("number_item")
@ApiModelProperty(example = "1.234", required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -98,7 +96,6 @@ public class TypeHolderExample {
@JsonProperty("integer_item")
@ApiModelProperty(example = "-2", required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -119,7 +116,6 @@ public class TypeHolderExample {
@JsonProperty("bool_item")
@ApiModelProperty(example = "true", required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -145,7 +141,6 @@ public class TypeHolderExample {
@JsonProperty("array_item")
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -62,7 +62,7 @@ public class AnotherFakeApi {
@io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.call123testSpecialTags(body,securityContext);

View File

@ -70,7 +70,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @Valid XmlItem xmlItem
public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createXmlItem(xmlItem,securityContext);
@ -82,7 +82,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid Boolean body
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterBooleanSerialize(body,securityContext);
@ -106,7 +106,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid BigDecimal body
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterNumberSerialize(body,securityContext);
@ -118,7 +118,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) })
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid String body
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterStringSerialize(body,securityContext);
@ -130,7 +130,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @Valid FileSchemaTestClass body
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithFileSchema(body,securityContext);
@ -143,7 +143,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithQueryParams(@ApiParam(value = "",required=true) @QueryParam("query") String query
,@ApiParam(value = "" ,required=true) @Valid User body
,@ApiParam(value = "" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithQueryParams(query,body,securityContext);
@ -155,7 +155,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response testClientModel(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClientModel(body,securityContext);
@ -236,7 +236,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @Valid Map<String, String> param
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map<String, String> param
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param,securityContext);

View File

@ -64,7 +64,7 @@ public class FakeClassnameTags123Api {
}, tags={ "fake_classname_tags 123#$%^", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClassname(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response testClassname(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClassname(body,securityContext);

View File

@ -69,7 +69,7 @@ public class PetApi {
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPet(body,securityContext);
@ -164,7 +164,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePet(body,securityContext);

View File

@ -108,7 +108,7 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @Valid Order body
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.placeOrder(body,securityContext);

View File

@ -63,7 +63,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUser(@ApiParam(value = "Created user object" ,required=true) @Valid User body
public Response createUser(@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUser(body,securityContext);
@ -75,7 +75,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext);
@ -87,7 +87,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext);
@ -158,7 +158,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
,@ApiParam(value = "Updated user object" ,required=true) @Valid User body
,@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updateUser(username,body,securityContext);

View File

@ -46,7 +46,6 @@ public class Animal {
@JsonProperty("className")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getClassName() {
return className;
}

View File

@ -64,7 +64,6 @@ public class Category {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getName() {
return name;
}

View File

@ -203,7 +203,6 @@ public class EnumTest {
@JsonProperty("enum_string_required")
@ApiModelProperty(required = true, value = "")
@NotNull
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}

View File

@ -146,8 +146,7 @@ public class FormatTest {
**/
@JsonProperty("number")
@ApiModelProperty(required = true, value = "")
@NotNull
@DecimalMin("32.1") @DecimalMax("543.2")@Valid
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")
public BigDecimal getNumber() {
return number;
}
@ -231,8 +230,7 @@ public class FormatTest {
**/
@JsonProperty("byte")
@ApiModelProperty(required = true, value = "")
@NotNull
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
public byte[] getByte() {
return _byte;
}
@ -273,7 +271,6 @@ public class FormatTest {
@JsonProperty("date")
@ApiModelProperty(required = true, value = "")
@NotNull
public Date getDate() {
return date;
}
@ -333,8 +330,7 @@ public class FormatTest {
**/
@JsonProperty("password")
@ApiModelProperty(required = true, value = "")
@NotNull
@Size(min=10,max=64)
@NotNull @Size(min=10,max=64)
public String getPassword() {
return password;
}

View File

@ -51,7 +51,6 @@ public class Name {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getName() {
return name;
}

View File

@ -134,7 +134,6 @@ public class Pet {
@JsonProperty("name")
@ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() {
return name;
}
@ -160,7 +159,6 @@ public class Pet {
@JsonProperty("photoUrls")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() {
return photoUrls;
}

View File

@ -56,7 +56,6 @@ public class TypeHolderDefault {
@JsonProperty("string_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -76,8 +75,7 @@ public class TypeHolderDefault {
**/
@JsonProperty("number_item")
@ApiModelProperty(required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -98,7 +96,6 @@ public class TypeHolderDefault {
@JsonProperty("integer_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -119,7 +116,6 @@ public class TypeHolderDefault {
@JsonProperty("bool_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -145,7 +141,6 @@ public class TypeHolderDefault {
@JsonProperty("array_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -56,7 +56,6 @@ public class TypeHolderExample {
@JsonProperty("string_item")
@ApiModelProperty(example = "what", required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -76,8 +75,7 @@ public class TypeHolderExample {
**/
@JsonProperty("number_item")
@ApiModelProperty(example = "1.234", required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -98,7 +96,6 @@ public class TypeHolderExample {
@JsonProperty("integer_item")
@ApiModelProperty(example = "-2", required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -119,7 +116,6 @@ public class TypeHolderExample {
@JsonProperty("bool_item")
@ApiModelProperty(example = "true", required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -145,7 +141,6 @@ public class TypeHolderExample {
@JsonProperty("array_item")
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -62,7 +62,7 @@ public class AnotherFakeApi {
@io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.call123testSpecialTags(body,securityContext);

View File

@ -71,7 +71,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @Valid XmlItem xmlItem
public Response createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true) @NotNull @Valid XmlItem xmlItem
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createXmlItem(xmlItem,securityContext);
@ -83,7 +83,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid Boolean body
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterBooleanSerialize(body,securityContext);
@ -107,7 +107,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid BigDecimal body
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterNumberSerialize(body,securityContext);
@ -119,7 +119,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) })
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid String body
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.fakeOuterStringSerialize(body,securityContext);
@ -131,7 +131,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @Valid FileSchemaTestClass body
public Response testBodyWithFileSchema(@ApiParam(value = "" ,required=true) @NotNull @Valid FileSchemaTestClass body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithFileSchema(body,securityContext);
@ -144,7 +144,7 @@ public class FakeApi {
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Success", response = Void.class) })
public Response testBodyWithQueryParams(@ApiParam(value = "",required=true) @QueryParam("query") String query
,@ApiParam(value = "" ,required=true) @Valid User body
,@ApiParam(value = "" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testBodyWithQueryParams(query,body,securityContext);
@ -156,7 +156,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response testClientModel(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClientModel(body,securityContext);
@ -237,7 +237,7 @@ public class FakeApi {
@io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @Valid Map<String, String> param
public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) @NotNull @Valid Map<String, String> param
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param,securityContext);

View File

@ -64,7 +64,7 @@ public class FakeClassnameTestApi {
}, tags={ "fake_classname_tags 123#$%^", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClassname(@ApiParam(value = "client model" ,required=true) @Valid Client body
public Response testClassname(@ApiParam(value = "client model" ,required=true) @NotNull @Valid Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClassname(body,securityContext);

View File

@ -69,7 +69,7 @@ public class PetApi {
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPet(body,securityContext);
@ -164,7 +164,7 @@ public class PetApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @Valid Pet body
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) @NotNull @Valid Pet body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePet(body,securityContext);

View File

@ -108,7 +108,7 @@ public class StoreApi {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @Valid Order body
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) @NotNull @Valid Order body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.placeOrder(body,securityContext);

View File

@ -63,7 +63,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUser(@ApiParam(value = "Created user object" ,required=true) @Valid User body
public Response createUser(@ApiParam(value = "Created user object" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUser(body,securityContext);
@ -75,7 +75,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext);
@ -87,7 +87,7 @@ public class UserApi {
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @Valid List<User> body
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) @NotNull @Valid List<User> body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext);
@ -158,7 +158,7 @@ public class UserApi {
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) })
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
,@ApiParam(value = "Updated user object" ,required=true) @Valid User body
,@ApiParam(value = "Updated user object" ,required=true) @NotNull @Valid User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updateUser(username,body,securityContext);

View File

@ -46,7 +46,6 @@ public class Animal {
@JsonProperty("className")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getClassName() {
return className;
}

View File

@ -64,7 +64,6 @@ public class Category {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getName() {
return name;
}

View File

@ -203,7 +203,6 @@ public class EnumTest {
@JsonProperty("enum_string_required")
@ApiModelProperty(required = true, value = "")
@NotNull
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}

View File

@ -146,8 +146,7 @@ public class FormatTest {
**/
@JsonProperty("number")
@ApiModelProperty(required = true, value = "")
@NotNull
@DecimalMin("32.1") @DecimalMax("543.2")@Valid
@NotNull @Valid @DecimalMin("32.1") @DecimalMax("543.2")
public BigDecimal getNumber() {
return number;
}
@ -231,8 +230,7 @@ public class FormatTest {
**/
@JsonProperty("byte")
@ApiModelProperty(required = true, value = "")
@NotNull
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
@NotNull @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
public byte[] getByte() {
return _byte;
}
@ -273,7 +271,6 @@ public class FormatTest {
@JsonProperty("date")
@ApiModelProperty(required = true, value = "")
@NotNull
public Date getDate() {
return date;
}
@ -333,8 +330,7 @@ public class FormatTest {
**/
@JsonProperty("password")
@ApiModelProperty(required = true, value = "")
@NotNull
@Size(min=10,max=64)
@NotNull @Size(min=10,max=64)
public String getPassword() {
return password;
}

View File

@ -51,7 +51,6 @@ public class Name {
@JsonProperty("name")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getName() {
return name;
}

View File

@ -134,7 +134,6 @@ public class Pet {
@JsonProperty("name")
@ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() {
return name;
}
@ -160,7 +159,6 @@ public class Pet {
@JsonProperty("photoUrls")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<String> getPhotoUrls() {
return photoUrls;
}

View File

@ -56,7 +56,6 @@ public class TypeHolderDefault {
@JsonProperty("string_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -76,8 +75,7 @@ public class TypeHolderDefault {
**/
@JsonProperty("number_item")
@ApiModelProperty(required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -98,7 +96,6 @@ public class TypeHolderDefault {
@JsonProperty("integer_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -119,7 +116,6 @@ public class TypeHolderDefault {
@JsonProperty("bool_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -145,7 +141,6 @@ public class TypeHolderDefault {
@JsonProperty("array_item")
@ApiModelProperty(required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}

View File

@ -56,7 +56,6 @@ public class TypeHolderExample {
@JsonProperty("string_item")
@ApiModelProperty(example = "what", required = true, value = "")
@NotNull
public String getStringItem() {
return stringItem;
}
@ -76,8 +75,7 @@ public class TypeHolderExample {
**/
@JsonProperty("number_item")
@ApiModelProperty(example = "1.234", required = true, value = "")
@NotNull
@Valid
@NotNull @Valid
public BigDecimal getNumberItem() {
return numberItem;
}
@ -98,7 +96,6 @@ public class TypeHolderExample {
@JsonProperty("integer_item")
@ApiModelProperty(example = "-2", required = true, value = "")
@NotNull
public Integer getIntegerItem() {
return integerItem;
}
@ -119,7 +116,6 @@ public class TypeHolderExample {
@JsonProperty("bool_item")
@ApiModelProperty(example = "true", required = true, value = "")
@NotNull
public Boolean getBoolItem() {
return boolItem;
}
@ -145,7 +141,6 @@ public class TypeHolderExample {
@JsonProperty("array_item")
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
@NotNull
public List<Integer> getArrayItem() {
return arrayItem;
}