[JAVA] Fix #7734: Correct consumes/produces attributes for Spring Controllers (#7760)

* fix #7734: Correct consumes/produces attributes for Spring Controllers

* fix #7734: Update petstore
This commit is contained in:
Simon Sprünker 2018-03-08 15:56:43 +01:00 committed by William Cheng
parent 4eeb974cb6
commit f00a1ef52c
29 changed files with 67 additions and 99 deletions

View File

@ -94,9 +94,9 @@ public interface {{classname}} {
{{/headerParams}}
})
{{/implicitHeaders}}
@RequestMapping(value = "{{{path}}}",{{#singleContentTypes}}
produces = "{{{vendorExtensions.x-accepts}}}",
consumes = "{{{vendorExtensions.x-contentType}}}",{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
@RequestMapping(value = "{{{path}}}",{{#singleContentTypes}}{{#hasProduces}}
produces = "{{{vendorExtensions.x-accepts}}}", {{/hasProduces}}{{#hasConsumes}}
consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
method = RequestMethod.{{httpMethod}})

View File

@ -36,7 +36,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
@RequestMapping(value = "/pet",
produces = "application/json",
produces = "application/json",
consumes = "application/json",
method = RequestMethod.POST)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
@ -51,8 +51,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value") })
@RequestMapping(value = "/pet/{petId}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.DELETE)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
@ -67,8 +66,7 @@ public interface PetApi {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value") })
@RequestMapping(value = "/pet/findByStatus",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status);
@ -83,8 +81,7 @@ public interface PetApi {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value") })
@RequestMapping(value = "/pet/findByTags",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags);
@ -97,8 +94,7 @@ public interface PetApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found") })
@RequestMapping(value = "/pet/{petId}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathVariable("petId") Long petId);
@ -114,7 +110,7 @@ public interface PetApi {
@ApiResponse(code = 404, message = "Pet not found"),
@ApiResponse(code = 405, message = "Validation exception") })
@RequestMapping(value = "/pet",
produces = "application/json",
produces = "application/json",
consumes = "application/json",
method = RequestMethod.PUT)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
@ -129,7 +125,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
@RequestMapping(value = "/pet/{petId}",
produces = "application/json",
produces = "application/json",
consumes = "application/x-www-form-urlencoded",
method = RequestMethod.POST)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status);
@ -144,7 +140,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
@RequestMapping(value = "/pet/{petId}/uploadImage",
produces = "application/json",
produces = "application/json",
consumes = "multipart/form-data",
method = RequestMethod.POST)
com.netflix.hystrix.HystrixCommand<ResponseEntity<ModelApiResponse>> uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestParam("file") MultipartFile file);

View File

@ -31,8 +31,7 @@ public interface StoreApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
@RequestMapping(value = "/store/order/{orderId}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.DELETE)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathVariable("orderId") String orderId);
@ -43,8 +42,7 @@ public interface StoreApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
@RequestMapping(value = "/store/inventory",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Map<String, Integer>>> getInventory();
@ -55,8 +53,7 @@ public interface StoreApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
@RequestMapping(value = "/store/order/{orderId}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathVariable("orderId") Long orderId);
@ -66,8 +63,7 @@ public interface StoreApi {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order") })
@RequestMapping(value = "/store/order",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.POST)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body);

View File

@ -30,8 +30,7 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/user",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.POST)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body);
@ -40,8 +39,7 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/user/createWithArray",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.POST)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body);
@ -50,8 +48,7 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/user/createWithList",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.POST)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body);
@ -61,8 +58,7 @@ public interface UserApi {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
@RequestMapping(value = "/user/{username}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.DELETE)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathVariable("username") String username);
@ -73,10 +69,9 @@ public interface UserApi {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
@RequestMapping(value = "/user/{username}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
com.netflix.hystrix.HystrixCommand<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username);
com.netflix.hystrix.HystrixCommand<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })
@ -84,8 +79,7 @@ public interface UserApi {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
@RequestMapping(value = "/user/login",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
com.netflix.hystrix.HystrixCommand<ResponseEntity<String>> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password);
@ -94,8 +88,7 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/user/logout",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> logoutUser();
@ -105,8 +98,7 @@ public interface UserApi {
@ApiResponse(code = 400, message = "Invalid user supplied"),
@ApiResponse(code = 404, message = "User not found") })
@RequestMapping(value = "/user/{username}",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.PUT)
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathVariable("username") String username,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody User body);

View File

@ -36,7 +36,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
@RequestMapping(value = "/pet",
produces = "application/json",
produces = "application/json",
consumes = "application/json",
method = RequestMethod.POST)
ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
@ -51,8 +51,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value") })
@RequestMapping(value = "/pet/{petId}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.DELETE)
ResponseEntity<Void> deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
@ -67,8 +66,7 @@ public interface PetApi {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value") })
@RequestMapping(value = "/pet/findByStatus",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
ResponseEntity<List<Pet>> findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status);
@ -83,8 +81,7 @@ public interface PetApi {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value") })
@RequestMapping(value = "/pet/findByTags",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
ResponseEntity<List<Pet>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags);
@ -97,8 +94,7 @@ public interface PetApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Pet not found") })
@RequestMapping(value = "/pet/{petId}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathVariable("petId") Long petId);
@ -114,7 +110,7 @@ public interface PetApi {
@ApiResponse(code = 404, message = "Pet not found"),
@ApiResponse(code = 405, message = "Validation exception") })
@RequestMapping(value = "/pet",
produces = "application/json",
produces = "application/json",
consumes = "application/json",
method = RequestMethod.PUT)
ResponseEntity<Void> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
@ -129,7 +125,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input") })
@RequestMapping(value = "/pet/{petId}",
produces = "application/json",
produces = "application/json",
consumes = "application/x-www-form-urlencoded",
method = RequestMethod.POST)
ResponseEntity<Void> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) String status);
@ -144,7 +140,7 @@ public interface PetApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
@RequestMapping(value = "/pet/{petId}/uploadImage",
produces = "application/json",
produces = "application/json",
consumes = "multipart/form-data",
method = RequestMethod.POST)
ResponseEntity<ModelApiResponse> uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file);

View File

@ -31,8 +31,7 @@ public interface StoreApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
@RequestMapping(value = "/store/order/{orderId}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.DELETE)
ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathVariable("orderId") String orderId);
@ -43,8 +42,7 @@ public interface StoreApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
@RequestMapping(value = "/store/inventory",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
ResponseEntity<Map<String, Integer>> getInventory();
@ -55,8 +53,7 @@ public interface StoreApi {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
@RequestMapping(value = "/store/order/{orderId}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
ResponseEntity<Order> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathVariable("orderId") Long orderId);
@ -66,8 +63,7 @@ public interface StoreApi {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order") })
@RequestMapping(value = "/store/order",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.POST)
ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body);

View File

@ -30,8 +30,7 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/user",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.POST)
ResponseEntity<Void> createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body);
@ -40,8 +39,7 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/user/createWithArray",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.POST)
ResponseEntity<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body);
@ -50,8 +48,7 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/user/createWithList",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.POST)
ResponseEntity<Void> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body);
@ -61,8 +58,7 @@ public interface UserApi {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
@RequestMapping(value = "/user/{username}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.DELETE)
ResponseEntity<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathVariable("username") String username);
@ -73,10 +69,9 @@ public interface UserApi {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@ApiResponse(code = 404, message = "User not found") })
@RequestMapping(value = "/user/{username}",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username);
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })
@ -84,8 +79,7 @@ public interface UserApi {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
@RequestMapping(value = "/user/login",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
ResponseEntity<String> loginUser(@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password);
@ -94,8 +88,7 @@ public interface UserApi {
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@RequestMapping(value = "/user/logout",
produces = "application/json",
consumes = "",
produces = "application/json",
method = RequestMethod.GET)
ResponseEntity<Void> logoutUser();
@ -105,8 +98,7 @@ public interface UserApi {
@ApiResponse(code = 400, message = "Invalid user supplied"),
@ApiResponse(code = 404, message = "User not found") })
@RequestMapping(value = "/user/{username}",
produces = "application/json",
consumes = "application/json",
produces = "application/json",
method = RequestMethod.PUT)
ResponseEntity<Void> updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathVariable("username") String username,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody User body);

View File

@ -47,7 +47,7 @@ public interface FakeClassnameTestApi {
return getRequest().map(r -> r.getHeader("Accept"));
}
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "", response = Client.class, authorizations = {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^", })
@ApiResponses(value = {

View File

@ -117,7 +117,7 @@ public interface UserApi {
@RequestMapping(value = "/user/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
default CompletableFuture<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username) {
default CompletableFuture<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) {
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
if (getAcceptHeader().get().contains("application/xml")) {
try {

View File

@ -25,7 +25,7 @@ import java.util.List;
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
public interface FakeClassnameTestApi {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "", response = Client.class, authorizations = {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^", })
@ApiResponses(value = {

View File

@ -71,7 +71,7 @@ public interface UserApi {
@RequestMapping(value = "/user/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username);
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })

View File

@ -57,7 +57,7 @@ public class UserApiController implements UserApi {
return new ResponseEntity<Void>(HttpStatus.NOT_IMPLEMENTED);
}
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username) {
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/xml")) {
try {

View File

@ -25,7 +25,7 @@ import java.util.List;
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
public interface FakeClassnameTestApi {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "", response = Client.class, authorizations = {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^", })
@ApiResponses(value = {

View File

@ -71,7 +71,7 @@ public interface UserApi {
@RequestMapping(value = "/user/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username);
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })

View File

@ -57,7 +57,7 @@ public class UserApiController implements UserApi {
return new ResponseEntity<Void>(HttpStatus.NOT_IMPLEMENTED);
}
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username) {
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/xml")) {
try {

View File

@ -27,7 +27,7 @@ public interface FakeClassnameTestApi {
FakeClassnameTestApiDelegate getDelegate();
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "", response = Client.class, authorizations = {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^", })
@ApiResponses(value = {

View File

@ -81,7 +81,7 @@ public interface UserApi {
@RequestMapping(value = "/user/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
default ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username) {
default ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) {
return getDelegate().getUserByName(username);
}

View File

@ -25,7 +25,7 @@ import java.util.List;
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
public interface FakeClassnameTestApi {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "", response = Client.class, authorizations = {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^", })
@ApiResponses(value = {

View File

@ -71,7 +71,7 @@ public interface UserApi {
@RequestMapping(value = "/user/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username);
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })

View File

@ -44,7 +44,7 @@ public class UserApiController implements UserApi {
return delegate.deleteUser(username);
}
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username) {
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) {
return delegate.getUserByName(username);
}

View File

@ -25,7 +25,7 @@ import java.util.List;
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
public interface FakeClassnameTestApi {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "", response = Client.class, authorizations = {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^", })
@ApiResponses(value = {

View File

@ -81,7 +81,7 @@ public interface UserApi {
@RequestMapping(value = "/user/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username);
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })

View File

@ -57,7 +57,7 @@ public class UserApiController implements UserApi {
return new ResponseEntity<Void>(HttpStatus.NOT_IMPLEMENTED);
}
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username) {
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/xml")) {
try {

View File

@ -26,7 +26,7 @@ import java.util.Optional;
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
public interface FakeClassnameTestApi {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "", response = Client.class, authorizations = {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^", })
@ApiResponses(value = {

View File

@ -72,7 +72,7 @@ public interface UserApi {
@RequestMapping(value = "/user/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username);
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })

View File

@ -58,7 +58,7 @@ public class UserApiController implements UserApi {
return new ResponseEntity<Void>(HttpStatus.NOT_IMPLEMENTED);
}
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username) {
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/xml")) {
try {

View File

@ -25,7 +25,7 @@ import java.util.List;
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
public interface FakeClassnameTestApi {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "", response = Client.class, authorizations = {
@ApiOperation(value = "To test class name in snake case", nickname = "testClassname", notes = "To test class name in snake case", response = Client.class, authorizations = {
@Authorization(value = "api_key_query")
}, tags={ "fake_classname_tags 123#$%^", })
@ApiResponses(value = {

View File

@ -71,7 +71,7 @@ public interface UserApi {
@RequestMapping(value = "/user/{username}",
produces = { "application/xml", "application/json" },
method = RequestMethod.GET)
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username);
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })

View File

@ -57,7 +57,7 @@ public class UserApiController implements UserApi {
return new ResponseEntity<Void>(HttpStatus.NOT_IMPLEMENTED);
}
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathVariable("username") String username) {
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username) {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/xml")) {
try {