forked from loafle/openapi-generator-original
[jaxrs-cxf][jaxrs-spec] Add missing @NotNull annotation for required body parameters when using BeanValidation, fixes #4280 (#6494)
* [jaxrs-spec] Add missing @NotNull annotation for required body parameters when using BeanValidation. * [jaxrs-cxf] Add missing @NotNull annotation for required body parameters when using BeanValidation (#4280). * [jaxrs-cxf] Add @NotNull annotation only for body parameters that are required and not nullable. * [jaxrs-spec] Add @NotNull annotation only for body parameters that are required and not nullable. * [jaxrs-cxf] Updated sample files after adding missing @NotNull annotation for required body parameters when using BeanValidation. * [jaxrs-spec] Updated sample files after adding missing @NotNull annotation for required body parameters when using BeanValidation.
This commit is contained in:
parent
abe64b7976
commit
a8c56fb26a
@ -1 +1 @@
|
|||||||
{{#isBodyParam}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
|
{{#isBodyParam}}{{#useBeanValidation}}@Valid {{#required}}{{^isNullable}}@NotNull {{/isNullable}}{{/required}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
|
@ -1 +1 @@
|
|||||||
{{#isBodyParam}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
|
{{#isBodyParam}}{{#useBeanValidation}}@Valid {{#required}}{{^isNullable}}@NotNull {{/isNullable}}{{/required}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
|
@ -41,7 +41,7 @@ public interface PetApi {
|
|||||||
@ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
|
@ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input") })
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
public void addPet(@Valid Pet body);
|
public void addPet(@Valid @NotNull Pet body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
@ -112,7 +112,7 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
@ApiResponse(code = 404, message = "Pet not found"),
|
@ApiResponse(code = 404, message = "Pet not found"),
|
||||||
@ApiResponse(code = 405, message = "Validation exception") })
|
@ApiResponse(code = 405, message = "Validation exception") })
|
||||||
public void updatePet(@Valid Pet body);
|
public void updatePet(@Valid @NotNull Pet body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
|
@ -85,6 +85,6 @@ public interface StoreApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid Order") })
|
@ApiResponse(code = 400, message = "Invalid Order") })
|
||||||
public Order placeOrder(@Valid Order body);
|
public Order placeOrder(@Valid @NotNull Order body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Create user", tags={ "user" })
|
@ApiOperation(value = "Create user", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUser(@Valid User body);
|
public void createUser(@Valid @NotNull User body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@ -52,7 +52,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUsersWithArrayInput(@Valid List<User> body);
|
public void createUsersWithArrayInput(@Valid @NotNull List<User> body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@ -63,7 +63,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUsersWithListInput(@Valid List<User> body);
|
public void createUsersWithListInput(@Valid @NotNull List<User> body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
@ -129,6 +129,6 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||||
@ApiResponse(code = 404, message = "User not found") })
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
public void updateUser(@PathParam("username") String username, @Valid User body);
|
public void updateUser(@PathParam("username") String username, @Valid @NotNull User body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public interface PetApi {
|
|||||||
@ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
|
@ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 405, message = "Invalid input") })
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
public void addPet(@Valid Pet body);
|
public void addPet(@Valid @NotNull Pet body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
@ -112,7 +112,7 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
@ApiResponse(code = 404, message = "Pet not found"),
|
@ApiResponse(code = 404, message = "Pet not found"),
|
||||||
@ApiResponse(code = 405, message = "Validation exception") })
|
@ApiResponse(code = 405, message = "Validation exception") })
|
||||||
public void updatePet(@Valid Pet body);
|
public void updatePet(@Valid @NotNull Pet body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
|
@ -85,6 +85,6 @@ public interface StoreApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid Order") })
|
@ApiResponse(code = 400, message = "Invalid Order") })
|
||||||
public Order placeOrder(@Valid Order body);
|
public Order placeOrder(@Valid @NotNull Order body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Create user", tags={ "user" })
|
@ApiOperation(value = "Create user", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUser(@Valid User body);
|
public void createUser(@Valid @NotNull User body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@ -52,7 +52,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUsersWithArrayInput(@Valid List<User> body);
|
public void createUsersWithArrayInput(@Valid @NotNull List<User> body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@ -63,7 +63,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUsersWithListInput(@Valid List<User> body);
|
public void createUsersWithListInput(@Valid @NotNull List<User> body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
@ -129,6 +129,6 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||||
@ApiResponse(code = 404, message = "User not found") })
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
public void updateUser(@PathParam("username") String username, @Valid User body);
|
public void updateUser(@PathParam("username") String username, @Valid @NotNull User body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,6 @@ public interface AnotherFakeApi {
|
|||||||
@ApiOperation(value = "To test special tags", tags={ "$another-fake?" })
|
@ApiOperation(value = "To test special tags", tags={ "$another-fake?" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
public Client call123testSpecialTags(@Valid Client body);
|
public Client call123testSpecialTags(@Valid @NotNull Client body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public interface FakeApi {
|
|||||||
@ApiOperation(value = "creates an XmlItem", tags={ "fake" })
|
@ApiOperation(value = "creates an XmlItem", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createXmlItem(@Valid XmlItem xmlItem);
|
public void createXmlItem(@Valid @NotNull XmlItem xmlItem);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/outer/boolean")
|
@Path("/outer/boolean")
|
||||||
@ -90,7 +90,7 @@ public interface FakeApi {
|
|||||||
@ApiOperation(value = "", tags={ "fake" })
|
@ApiOperation(value = "", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "Success") })
|
@ApiResponse(code = 200, message = "Success") })
|
||||||
public void testBodyWithFileSchema(@Valid FileSchemaTestClass body);
|
public void testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/body-with-query-params")
|
@Path("/body-with-query-params")
|
||||||
@ -98,7 +98,7 @@ public interface FakeApi {
|
|||||||
@ApiOperation(value = "", tags={ "fake" })
|
@ApiOperation(value = "", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "Success") })
|
@ApiResponse(code = 200, message = "Success") })
|
||||||
public void testBodyWithQueryParams(@QueryParam("query") @NotNull String query, @Valid User body);
|
public void testBodyWithQueryParams(@QueryParam("query") @NotNull String query, @Valid @NotNull User body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
@ -113,7 +113,7 @@ public interface FakeApi {
|
|||||||
@ApiOperation(value = "To test \"client\" model", tags={ "fake" })
|
@ApiOperation(value = "To test \"client\" model", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
public Client testClientModel(@Valid Client body);
|
public Client testClientModel(@Valid @NotNull Client body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
@ -168,7 +168,7 @@ public interface FakeApi {
|
|||||||
@ApiOperation(value = "test inline additionalProperties", tags={ "fake" })
|
@ApiOperation(value = "test inline additionalProperties", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void testInlineAdditionalProperties(@Valid Map<String, String> param);
|
public void testInlineAdditionalProperties(@Valid @NotNull Map<String, String> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test json serialization of form data
|
* test json serialization of form data
|
||||||
|
@ -42,6 +42,6 @@ public interface FakeClassnameTags123Api {
|
|||||||
@ApiOperation(value = "To test class name in snake case", tags={ "fake_classname_tags 123#$%^" })
|
@ApiOperation(value = "To test class name in snake case", tags={ "fake_classname_tags 123#$%^" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
public Client testClassname(@Valid Client body);
|
public Client testClassname(@Valid @NotNull Client body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public interface PetApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation"),
|
@ApiResponse(code = 200, message = "successful operation"),
|
||||||
@ApiResponse(code = 405, message = "Invalid input") })
|
@ApiResponse(code = 405, message = "Invalid input") })
|
||||||
public void addPet(@Valid Pet body);
|
public void addPet(@Valid @NotNull Pet body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
@ -116,7 +116,7 @@ public interface PetApi {
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||||
@ApiResponse(code = 404, message = "Pet not found"),
|
@ApiResponse(code = 404, message = "Pet not found"),
|
||||||
@ApiResponse(code = 405, message = "Validation exception") })
|
@ApiResponse(code = 405, message = "Validation exception") })
|
||||||
public void updatePet(@Valid Pet body);
|
public void updatePet(@Valid @NotNull Pet body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
|
@ -85,6 +85,6 @@ public interface StoreApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid Order") })
|
@ApiResponse(code = 400, message = "Invalid Order") })
|
||||||
public Order placeOrder(@Valid Order body);
|
public Order placeOrder(@Valid @NotNull Order body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Create user", tags={ "user" })
|
@ApiOperation(value = "Create user", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUser(@Valid User body);
|
public void createUser(@Valid @NotNull User body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@ -52,7 +52,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUsersWithArrayInput(@Valid List<User> body);
|
public void createUsersWithArrayInput(@Valid @NotNull List<User> body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@ -63,7 +63,7 @@ public interface UserApi {
|
|||||||
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation") })
|
@ApiResponse(code = 200, message = "successful operation") })
|
||||||
public void createUsersWithListInput(@Valid List<User> body);
|
public void createUsersWithListInput(@Valid @NotNull List<User> body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
@ -129,6 +129,6 @@ public interface UserApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||||
@ApiResponse(code = 404, message = "User not found") })
|
@ApiResponse(code = 404, message = "User not found") })
|
||||||
public void updateUser(@PathParam("username") String username, @Valid User body);
|
public void updateUser(@PathParam("username") String username, @Valid @NotNull User body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,5 +23,5 @@ import javax.validation.Valid;
|
|||||||
@ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" })
|
@ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
Client call123testSpecialTags(@Valid Client body);
|
Client call123testSpecialTags(@Valid @NotNull Client body);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ import javax.validation.Valid;
|
|||||||
@ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", tags={ "fake" })
|
@ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
void createXmlItem(@Valid XmlItem xmlItem);
|
void createXmlItem(@Valid @NotNull XmlItem xmlItem);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/outer/boolean")
|
@Path("/outer/boolean")
|
||||||
@ -73,7 +73,7 @@ import javax.validation.Valid;
|
|||||||
@ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" })
|
@ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "Success", response = Void.class) })
|
@ApiResponse(code = 200, message = "Success", response = Void.class) })
|
||||||
void testBodyWithFileSchema(@Valid FileSchemaTestClass body);
|
void testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/body-with-query-params")
|
@Path("/body-with-query-params")
|
||||||
@ -81,7 +81,7 @@ import javax.validation.Valid;
|
|||||||
@ApiOperation(value = "", notes = "", tags={ "fake" })
|
@ApiOperation(value = "", notes = "", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "Success", response = Void.class) })
|
@ApiResponse(code = 200, message = "Success", response = Void.class) })
|
||||||
void testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid User body);
|
void testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body);
|
||||||
|
|
||||||
@PATCH
|
@PATCH
|
||||||
@Consumes({ "application/json" })
|
@Consumes({ "application/json" })
|
||||||
@ -89,7 +89,7 @@ import javax.validation.Valid;
|
|||||||
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" })
|
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
Client testClientModel(@Valid Client body);
|
Client testClientModel(@Valid @NotNull Client body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@ -122,7 +122,7 @@ import javax.validation.Valid;
|
|||||||
@ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" })
|
@ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
void testInlineAdditionalProperties(@Valid Map<String, String> param);
|
void testInlineAdditionalProperties(@Valid @NotNull Map<String, String> param);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/jsonFormData")
|
@Path("/jsonFormData")
|
||||||
|
@ -26,5 +26,5 @@ import javax.validation.Valid;
|
|||||||
}, tags={ "fake_classname_tags 123#$%^" })
|
}, tags={ "fake_classname_tags 123#$%^" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
Client testClassname(@Valid Client body);
|
Client testClassname(@Valid @NotNull Client body);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
|
||||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
void addPet(@Valid Pet body);
|
void addPet(@Valid @NotNull Pet body);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
@ -95,7 +95,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
||||||
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
||||||
void updatePet(@Valid Pet body);
|
void updatePet(@Valid @NotNull Pet body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
|
@ -54,5 +54,5 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
|
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
|
||||||
Order placeOrder(@Valid Order body);
|
Order placeOrder(@Valid @NotNull Order body);
|
||||||
}
|
}
|
||||||
|
@ -22,21 +22,21 @@ import javax.validation.Valid;
|
|||||||
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" })
|
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
void createUser(@Valid User body);
|
void createUser(@Valid @NotNull User body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/createWithArray")
|
@Path("/createWithArray")
|
||||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
|
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
void createUsersWithArrayInput(@Valid List<User> body);
|
void createUsersWithArrayInput(@Valid @NotNull List<User> body);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/createWithList")
|
@Path("/createWithList")
|
||||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
|
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
void createUsersWithListInput(@Valid List<User> body);
|
void createUsersWithListInput(@Valid @NotNull List<User> body);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
@ -78,5 +78,5 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
void updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid User body);
|
void updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User body);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
||||||
})
|
})
|
||||||
public Response call123testSpecialTags(@Valid Client body) {
|
public Response call123testSpecialTags(@Valid @NotNull Client body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response createXmlItem(@Valid XmlItem xmlItem) {
|
public Response createXmlItem(@Valid @NotNull XmlItem xmlItem) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "Success", response = Void.class)
|
@ApiResponse(code = 200, message = "Success", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response testBodyWithFileSchema(@Valid FileSchemaTestClass body) {
|
public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "Success", response = Void.class)
|
@ApiResponse(code = 200, message = "Success", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid User body) {
|
public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
||||||
})
|
})
|
||||||
public Response testClientModel(@Valid Client body) {
|
public Response testClientModel(@Valid @NotNull Client body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response testInlineAdditionalProperties(@Valid Map<String, String> param) {
|
public Response testInlineAdditionalProperties(@Valid @NotNull Map<String, String> param) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
||||||
})
|
})
|
||||||
public Response testClassname(@Valid Client body) {
|
public Response testClassname(@Valid @NotNull Client body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
|
||||||
@ApiResponse(code = 405, message = "Invalid input", response = Void.class)
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response addPet(@Valid Pet body) {
|
public Response addPet(@Valid @NotNull Pet body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
||||||
@ApiResponse(code = 405, message = "Validation exception", response = Void.class)
|
@ApiResponse(code = 405, message = "Validation exception", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response updatePet(@Valid Pet body) {
|
public Response updatePet(@Valid @NotNull Pet body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class)
|
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response placeOrder(@Valid Order body) {
|
public Response placeOrder(@Valid @NotNull Order body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response createUser(@Valid User body) {
|
public Response createUser(@Valid @NotNull User body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response createUsersWithArrayInput(@Valid List<User> body) {
|
public Response createUsersWithArrayInput(@Valid @NotNull List<User> body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response createUsersWithListInput(@Valid List<User> body) {
|
public Response createUsersWithListInput(@Valid @NotNull List<User> body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ import javax.validation.Valid;
|
|||||||
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class)
|
@ApiResponse(code = 404, message = "User not found", response = Void.class)
|
||||||
})
|
})
|
||||||
public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid User body) {
|
public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid @NotNull User body) {
|
||||||
return Response.ok().entity("magic!").build();
|
return Response.ok().entity("magic!").build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user