Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{#isBodyParam}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
{{#isBodyParam}}{{#useBeanValidation}}@Valid {{#required}}{{^isNullable}}@NotNull {{/isNullable}}{{/required}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{#isBodyParam}}{{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
{{#isBodyParam}}{{#useBeanValidation}}@Valid {{#required}}{{^isNullable}}@NotNull {{/isNullable}}{{/required}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{/isBodyParam}}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface PetApi {
@ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
public void addPet(@Valid Pet body);
public void addPet(@Valid @NotNull Pet body);

/**
* Deletes a pet
Expand Down Expand Up @@ -112,7 +112,7 @@ public interface PetApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found"),
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ public interface StoreApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order") })
public Order placeOrder(@Valid Order body);
public Order placeOrder(@Valid @NotNull Order body);
}

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface UserApi {
@ApiOperation(value = "Create user", tags={ "user" })
@ApiResponses(value = {
@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
Expand All @@ -52,7 +52,7 @@ public interface UserApi {
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@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
Expand All @@ -63,7 +63,7 @@ public interface UserApi {
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithListInput(@Valid List<User> body);
public void createUsersWithListInput(@Valid @NotNull List<User> body);

/**
* Delete user
Expand Down Expand Up @@ -129,6 +129,6 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
@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);
}

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface PetApi {
@ApiOperation(value = "Add a new pet to the store", tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
public void addPet(@Valid Pet body);
public void addPet(@Valid @NotNull Pet body);

/**
* Deletes a pet
Expand Down Expand Up @@ -112,7 +112,7 @@ public interface PetApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found"),
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ public interface StoreApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order") })
public Order placeOrder(@Valid Order body);
public Order placeOrder(@Valid @NotNull Order body);
}

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface UserApi {
@ApiOperation(value = "Create user", tags={ "user" })
@ApiResponses(value = {
@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
Expand All @@ -52,7 +52,7 @@ public interface UserApi {
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@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
Expand All @@ -63,7 +63,7 @@ public interface UserApi {
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithListInput(@Valid List<User> body);
public void createUsersWithListInput(@Valid @NotNull List<User> body);

/**
* Delete user
Expand Down Expand Up @@ -129,6 +129,6 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
@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);
}

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public interface AnotherFakeApi {
@ApiOperation(value = "To test special tags", tags={ "$another-fake?" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Client call123testSpecialTags(@Valid Client body);
public Client call123testSpecialTags(@Valid @NotNull Client body);
}

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public interface FakeApi {
@ApiOperation(value = "creates an XmlItem", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createXmlItem(@Valid XmlItem xmlItem);
public void createXmlItem(@Valid @NotNull XmlItem xmlItem);

@POST
@Path("/outer/boolean")
Expand Down Expand Up @@ -90,15 +90,15 @@ public interface FakeApi {
@ApiOperation(value = "", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
public void testBodyWithFileSchema(@Valid FileSchemaTestClass body);
public void testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body);

@PUT
@Path("/body-with-query-params")
@Consumes({ "application/json" })
@ApiOperation(value = "", tags={ "fake" })
@ApiResponses(value = {
@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 \&quot;client\&quot; model
Expand All @@ -113,7 +113,7 @@ public interface FakeApi {
@ApiOperation(value = "To test \"client\" model", tags={ "fake" })
@ApiResponses(value = {
@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 假端點 偽のエンドポイント 가짜 엔드 포인트
Expand Down Expand Up @@ -168,7 +168,7 @@ public interface FakeApi {
@ApiOperation(value = "test inline additionalProperties", tags={ "fake" })
@ApiResponses(value = {
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public interface FakeClassnameTags123Api {
@ApiOperation(value = "To test class name in snake case", tags={ "fake_classname_tags 123#$%^" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Client testClassname(@Valid Client body);
public Client testClassname(@Valid @NotNull Client body);
}

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation"),
@ApiResponse(code = 405, message = "Invalid input") })
public void addPet(@Valid Pet body);
public void addPet(@Valid @NotNull Pet body);

/**
* Deletes a pet
Expand Down Expand Up @@ -116,7 +116,7 @@ public interface PetApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found"),
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ public interface StoreApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order") })
public Order placeOrder(@Valid Order body);
public Order placeOrder(@Valid @NotNull Order body);
}

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface UserApi {
@ApiOperation(value = "Create user", tags={ "user" })
@ApiResponses(value = {
@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
Expand All @@ -52,7 +52,7 @@ public interface UserApi {
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@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
Expand All @@ -63,7 +63,7 @@ public interface UserApi {
@ApiOperation(value = "Creates list of users with given input array", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
public void createUsersWithListInput(@Valid List<User> body);
public void createUsersWithListInput(@Valid @NotNull List<User> body);

/**
* Delete user
Expand Down Expand Up @@ -129,6 +129,6 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
@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);
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
@ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
Client call123testSpecialTags(@Valid Client body);
Client call123testSpecialTags(@Valid @NotNull Client body);
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void createXmlItem(@Valid XmlItem xmlItem);
void createXmlItem(@Valid @NotNull XmlItem xmlItem);

@POST
@Path("/outer/boolean")
Expand Down Expand Up @@ -73,23 +73,23 @@
@ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = Void.class) })
void testBodyWithFileSchema(@Valid FileSchemaTestClass body);
void testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass body);

@PUT
@Path("/body-with-query-params")
@Consumes({ "application/json" })
@ApiOperation(value = "", notes = "", tags={ "fake" })
@ApiResponses(value = {
@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
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
Client testClientModel(@Valid Client body);
Client testClientModel(@Valid @NotNull Client body);

@POST
@Consumes({ "application/x-www-form-urlencoded" })
Expand Down Expand Up @@ -122,7 +122,7 @@
@ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" })
@ApiResponses(value = {
@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
@Path("/jsonFormData")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
}, tags={ "fake_classname_tags 123#$%^" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
Client testClassname(@Valid Client body);
Client testClassname(@Valid @NotNull Client body);
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
void addPet(@Valid Pet body);
void addPet(@Valid @NotNull Pet body);

@DELETE
@Path("/{petId}")
Expand Down Expand Up @@ -95,7 +95,7 @@
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
void updatePet(@Valid Pet body);
void updatePet(@Valid @NotNull Pet body);

@POST
@Path("/{petId}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
Order placeOrder(@Valid Order body);
Order placeOrder(@Valid @NotNull Order body);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void createUser(@Valid User body);
void createUser(@Valid @NotNull User body);

@POST
@Path("/createWithArray")
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void createUsersWithArrayInput(@Valid List<User> body);
void createUsersWithArrayInput(@Valid @NotNull List<User> body);

@POST
@Path("/createWithList")
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void createUsersWithListInput(@Valid List<User> body);
void createUsersWithListInput(@Valid @NotNull List<User> body);

@DELETE
@Path("/{username}")
Expand Down Expand Up @@ -78,5 +78,5 @@
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied", 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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@ApiResponses(value = {
@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();
}
}
Loading