diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache
index 7b3cc1f9465..4722038fcd3 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache
@@ -84,6 +84,25 @@ public interface {{classname}} {
{{/jdk8-default-interface}}
{{#operation}}
+ /**
+ * {{httpMethod}} {{{path}}}{{#summary}} : {{.}}{{/summary}}
+ {{#notes}}
+ * {{.}}
+ {{/notes}}
+ *
+ {{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
+ {{/allParams}}
+ * @return {{#responses}}{{message}} (status code {{code}}){{#hasMore}}
+ * or {{/hasMore}}{{/responses}}
+ {{#isDeprecated}}
+ * @deprecated
+ {{/isDeprecated}}
+ {{#externalDocs}}
+ * {{description}}
+ * @see {{summary}} Documentation
+ {{/externalDocs}}
+ */
{{#virtualService}}
@ApiVirtual
{{/virtualService}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache
index 5052f367a27..75892028502 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiController.mustache
@@ -89,6 +89,26 @@ public class {{classname}}Controller implements {{classname}} {
{{^jdk8}}
{{#operation}}
+ /**
+ * {{httpMethod}} {{{path}}}{{#summary}} : {{.}}{{/summary}}
+ {{#notes}}
+ * {{.}}
+ {{/notes}}
+ *
+ {{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
+ {{/allParams}}
+ * @return {{#responses}}{{message}} (status code {{code}}){{#hasMore}}
+ * or {{/hasMore}}{{/responses}}
+ {{#isDeprecated}}
+ * @deprecated
+ {{/isDeprecated}}
+ {{#externalDocs}}
+ * {{description}}
+ * @see {{summary}} Documentation
+ {{/externalDocs}}
+ * @see {{classname}}#{{operationId}}
+ */
public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}) {
{{^isDelegate}}
{{^async}}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache
index a055cb86d5a..478d0ea3cf3 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache
@@ -48,6 +48,23 @@ public interface {{classname}}Delegate {
{{#operation}}
/**
+ * {{httpMethod}} {{{path}}}{{#summary}} : {{.}}{{/summary}}
+ {{#notes}}
+ * {{.}}
+ {{/notes}}
+ *
+ {{#allParams}}
+ * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
+ {{/allParams}}
+ * @return {{#responses}}{{message}} (status code {{code}}){{#hasMore}}
+ * or {{/hasMore}}{{/responses}}
+ {{#isDeprecated}}
+ * @deprecated
+ {{/isDeprecated}}
+ {{#externalDocs}}
+ * {{description}}
+ * @see {{summary}} Documentation
+ {{/externalDocs}}
* @see {{classname}}#{{operationId}}
*/
{{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isListContainer}}Mono{{/isListContainer}}{{#isListContainer}}Flux{{/isListContainer}}<{{{baseType}}}>{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}MultipartFile{{/isFile}} {{paramName}}{{#hasMore}},
diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java
index e77f58a9ece..91a6c5f585d 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java
@@ -34,6 +34,12 @@ import java.util.concurrent.CompletableFuture;
@Api(value = "Pet", description = "the Pet API")
public interface PetApi {
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -48,6 +54,13 @@ public interface PetApi {
CompletableFuture> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
+ /**
+ * DELETE /pet/{petId} : Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return Invalid pet value (status code 400)
+ */
@ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -61,6 +74,14 @@ public interface PetApi {
CompletableFuture> deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
+ /**
+ * GET /pet/findByStatus : Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @param status Status values that need to be considered for filter (required)
+ * @return successful operation (status code 200)
+ * or Invalid status value (status code 400)
+ */
@ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -76,6 +97,15 @@ public interface PetApi {
CompletableFuture>> 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 status);
+ /**
+ * GET /pet/findByTags : Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param tags Tags to filter by (required)
+ * @return successful operation (status code 200)
+ * or Invalid tag value (status code 400)
+ * @deprecated
+ */
@ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -91,6 +121,15 @@ public interface PetApi {
CompletableFuture>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags);
+ /**
+ * GET /pet/{petId} : Find pet by ID
+ * Returns a single pet
+ *
+ * @param petId ID of pet to return (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ */
@ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = {
@Authorization(value = "api_key")
}, tags={ "pet", })
@@ -104,6 +143,14 @@ public interface PetApi {
CompletableFuture> getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathVariable("petId") Long petId);
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * or Validation exception (status code 405)
+ */
@ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -120,6 +167,14 @@ public interface PetApi {
CompletableFuture> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
+ /**
+ * POST /pet/{petId} : Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -134,6 +189,14 @@ public interface PetApi {
CompletableFuture> 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);
+ /**
+ * POST /pet/{petId}/uploadImage : uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java
index 94dfff38907..17070797043 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java
@@ -33,6 +33,14 @@ import java.util.concurrent.CompletableFuture;
@Api(value = "Store", description = "the Store API")
public interface StoreApi {
+ /**
+ * DELETE /store/order/{orderId} : Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@@ -42,6 +50,12 @@ public interface StoreApi {
CompletableFuture> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathVariable("orderId") String orderId);
+ /**
+ * GET /store/inventory : Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@Authorization(value = "api_key")
}, tags={ "store", })
@@ -53,6 +67,15 @@ public interface StoreApi {
CompletableFuture>> getInventory();
+ /**
+ * GET /store/order/{orderId} : Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
+ * @param orderId ID of pet that needs to be fetched (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@@ -64,6 +87,13 @@ public interface StoreApi {
CompletableFuture> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathVariable("orderId") Long orderId);
+ /**
+ * POST /store/order : Place an order for a pet
+ *
+ * @param body order placed for purchasing the pet (required)
+ * @return successful operation (status code 200)
+ * or Invalid Order (status code 400)
+ */
@ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java
index 145c71d1afa..13fc9485410 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java
@@ -33,6 +33,13 @@ import java.util.concurrent.CompletableFuture;
@Api(value = "User", description = "the User API")
public interface UserApi {
+ /**
+ * POST /user : Create user
+ * This can only be done by the logged in user.
+ *
+ * @param body Created user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -41,6 +48,12 @@ public interface UserApi {
CompletableFuture> createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body);
+ /**
+ * POST /user/createWithArray : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -49,6 +62,12 @@ public interface UserApi {
CompletableFuture> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List body);
+ /**
+ * POST /user/createWithList : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -57,6 +76,14 @@ public interface UserApi {
CompletableFuture> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List body);
+ /**
+ * DELETE /user/{username} : Delete user
+ * This can only be done by the logged in user.
+ *
+ * @param username The name that needs to be deleted (required)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@@ -66,6 +93,14 @@ public interface UserApi {
CompletableFuture> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathVariable("username") String username);
+ /**
+ * GET /user/{username} : Get user by user name
+ *
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @return successful operation (status code 200)
+ * or Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@@ -77,6 +112,14 @@ public interface UserApi {
CompletableFuture> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
+ /**
+ * GET /user/login : Logs user into the system
+ *
+ * @param username The user name for login (required)
+ * @param password The password for login in clear text (required)
+ * @return successful operation (status code 200)
+ * or Invalid username/password supplied (status code 400)
+ */
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@@ -87,6 +130,11 @@ public interface UserApi {
CompletableFuture> 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);
+ /**
+ * GET /user/logout : Logs out current logged in user session
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -95,6 +143,15 @@ public interface UserApi {
CompletableFuture> logoutUser();
+ /**
+ * PUT /user/{username} : Updated user
+ * This can only be done by the logged in user.
+ *
+ * @param username name that need to be deleted (required)
+ * @param body Updated user object (required)
+ * @return Invalid user supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
index d59976057e6..3ff235fc412 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
@@ -33,6 +33,12 @@ import java.util.Optional;
@Api(value = "Pet", description = "the Pet API")
public interface PetApi {
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -47,6 +53,13 @@ public interface PetApi {
com.netflix.hystrix.HystrixCommand> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
+ /**
+ * DELETE /pet/{petId} : Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return Invalid pet value (status code 400)
+ */
@ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -60,6 +73,14 @@ public interface PetApi {
com.netflix.hystrix.HystrixCommand> deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
+ /**
+ * GET /pet/findByStatus : Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @param status Status values that need to be considered for filter (required)
+ * @return successful operation (status code 200)
+ * or Invalid status value (status code 400)
+ */
@ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -75,6 +96,15 @@ public interface PetApi {
com.netflix.hystrix.HystrixCommand>> 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 status);
+ /**
+ * GET /pet/findByTags : Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param tags Tags to filter by (required)
+ * @return successful operation (status code 200)
+ * or Invalid tag value (status code 400)
+ * @deprecated
+ */
@ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -90,6 +120,15 @@ public interface PetApi {
com.netflix.hystrix.HystrixCommand>> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags);
+ /**
+ * GET /pet/{petId} : Find pet by ID
+ * Returns a single pet
+ *
+ * @param petId ID of pet to return (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ */
@ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = {
@Authorization(value = "api_key")
}, tags={ "pet", })
@@ -103,6 +142,14 @@ public interface PetApi {
com.netflix.hystrix.HystrixCommand> getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathVariable("petId") Long petId);
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * or Validation exception (status code 405)
+ */
@ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -119,6 +166,14 @@ public interface PetApi {
com.netflix.hystrix.HystrixCommand> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
+ /**
+ * POST /pet/{petId} : Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -133,6 +188,14 @@ public interface PetApi {
com.netflix.hystrix.HystrixCommand> 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);
+ /**
+ * POST /pet/{petId}/uploadImage : uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
index 85cf089e497..96704d92b32 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
@@ -32,6 +32,14 @@ import java.util.Optional;
@Api(value = "Store", description = "the Store API")
public interface StoreApi {
+ /**
+ * DELETE /store/order/{orderId} : Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@@ -41,6 +49,12 @@ public interface StoreApi {
com.netflix.hystrix.HystrixCommand> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathVariable("orderId") String orderId);
+ /**
+ * GET /store/inventory : Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@Authorization(value = "api_key")
}, tags={ "store", })
@@ -52,6 +66,15 @@ public interface StoreApi {
com.netflix.hystrix.HystrixCommand>> getInventory();
+ /**
+ * GET /store/order/{orderId} : Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
+ * @param orderId ID of pet that needs to be fetched (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@@ -63,6 +86,13 @@ public interface StoreApi {
com.netflix.hystrix.HystrixCommand> getOrderById(@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathVariable("orderId") Long orderId);
+ /**
+ * POST /store/order : Place an order for a pet
+ *
+ * @param body order placed for purchasing the pet (required)
+ * @return successful operation (status code 200)
+ * or Invalid Order (status code 400)
+ */
@ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
index 2cbd2ed99b3..c682375f3fa 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
@@ -32,6 +32,13 @@ import java.util.Optional;
@Api(value = "User", description = "the User API")
public interface UserApi {
+ /**
+ * POST /user : Create user
+ * This can only be done by the logged in user.
+ *
+ * @param body Created user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -40,6 +47,12 @@ public interface UserApi {
com.netflix.hystrix.HystrixCommand> createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body);
+ /**
+ * POST /user/createWithArray : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -48,6 +61,12 @@ public interface UserApi {
com.netflix.hystrix.HystrixCommand> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List body);
+ /**
+ * POST /user/createWithList : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -56,6 +75,14 @@ public interface UserApi {
com.netflix.hystrix.HystrixCommand> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List body);
+ /**
+ * DELETE /user/{username} : Delete user
+ * This can only be done by the logged in user.
+ *
+ * @param username The name that needs to be deleted (required)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@@ -65,6 +92,14 @@ public interface UserApi {
com.netflix.hystrix.HystrixCommand> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathVariable("username") String username);
+ /**
+ * GET /user/{username} : Get user by user name
+ *
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @return successful operation (status code 200)
+ * or Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@@ -76,6 +111,14 @@ public interface UserApi {
com.netflix.hystrix.HystrixCommand> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathVariable("username") String username);
+ /**
+ * GET /user/login : Logs user into the system
+ *
+ * @param username The user name for login (required)
+ * @param password The password for login in clear text (required)
+ * @return successful operation (status code 200)
+ * or Invalid username/password supplied (status code 400)
+ */
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@@ -86,6 +129,11 @@ public interface UserApi {
com.netflix.hystrix.HystrixCommand> 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);
+ /**
+ * GET /user/logout : Logs out current logged in user session
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -94,6 +142,15 @@ public interface UserApi {
com.netflix.hystrix.HystrixCommand> logoutUser();
+ /**
+ * PUT /user/{username} : Updated user
+ * This can only be done by the logged in user.
+ *
+ * @param username name that need to be deleted (required)
+ * @param body Updated user object (required)
+ * @return Invalid user supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
index f36b7b750b9..d79052c73d0 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
@@ -37,6 +37,12 @@ public interface PetApi {
return Optional.empty();
}
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -54,6 +60,13 @@ public interface PetApi {
}
+ /**
+ * DELETE /pet/{petId} : Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return Invalid pet value (status code 400)
+ */
@ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -70,6 +83,14 @@ public interface PetApi {
}
+ /**
+ * GET /pet/findByStatus : Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @param status Status values that need to be considered for filter (required)
+ * @return successful operation (status code 200)
+ * or Invalid status value (status code 400)
+ */
@ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -102,6 +123,15 @@ public interface PetApi {
}
+ /**
+ * GET /pet/findByTags : Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param tags Tags to filter by (required)
+ * @return successful operation (status code 200)
+ * or Invalid tag value (status code 400)
+ * @deprecated
+ */
@ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -134,6 +164,15 @@ public interface PetApi {
}
+ /**
+ * GET /pet/{petId} : Find pet by ID
+ * Returns a single pet
+ *
+ * @param petId ID of pet to return (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ */
@ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = {
@Authorization(value = "api_key")
}, tags={ "pet", })
@@ -164,6 +203,14 @@ public interface PetApi {
}
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * or Validation exception (status code 405)
+ */
@ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -183,6 +230,14 @@ public interface PetApi {
}
+ /**
+ * POST /pet/{petId} : Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -200,6 +255,14 @@ public interface PetApi {
}
+ /**
+ * POST /pet/{petId}/uploadImage : uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
index 4ee1b2cbdd2..b40f869ca51 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
@@ -36,6 +36,14 @@ public interface StoreApi {
return Optional.empty();
}
+ /**
+ * DELETE /store/order/{orderId} : Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@@ -48,6 +56,12 @@ public interface StoreApi {
}
+ /**
+ * GET /store/inventory : Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@Authorization(value = "api_key")
}, tags={ "store", })
@@ -62,6 +76,15 @@ public interface StoreApi {
}
+ /**
+ * GET /store/order/{orderId} : Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
+ * @param orderId ID of pet that needs to be fetched (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@@ -90,6 +113,13 @@ public interface StoreApi {
}
+ /**
+ * POST /store/order : Place an order for a pet
+ *
+ * @param body order placed for purchasing the pet (required)
+ * @return successful operation (status code 200)
+ * or Invalid Order (status code 400)
+ */
@ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java
index d2f2ee3f765..87e80226028 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java
@@ -36,6 +36,13 @@ public interface UserApi {
return Optional.empty();
}
+ /**
+ * POST /user : Create user
+ * This can only be done by the logged in user.
+ *
+ * @param body Created user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -47,6 +54,12 @@ public interface UserApi {
}
+ /**
+ * POST /user/createWithArray : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -58,6 +71,12 @@ public interface UserApi {
}
+ /**
+ * POST /user/createWithList : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -69,6 +88,14 @@ public interface UserApi {
}
+ /**
+ * DELETE /user/{username} : Delete user
+ * This can only be done by the logged in user.
+ *
+ * @param username The name that needs to be deleted (required)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@@ -81,6 +108,14 @@ public interface UserApi {
}
+ /**
+ * GET /user/{username} : Get user by user name
+ *
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @return successful operation (status code 200)
+ * or Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@@ -109,6 +144,14 @@ public interface UserApi {
}
+ /**
+ * GET /user/login : Logs user into the system
+ *
+ * @param username The user name for login (required)
+ * @param password The password for login in clear text (required)
+ * @return successful operation (status code 200)
+ * or Invalid username/password supplied (status code 400)
+ */
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@@ -122,6 +165,11 @@ public interface UserApi {
}
+ /**
+ * GET /user/logout : Logs out current logged in user session
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -133,6 +181,15 @@ public interface UserApi {
}
+ /**
+ * PUT /user/{username} : Updated user
+ * This can only be done by the logged in user.
+ *
+ * @param username name that need to be deleted (required)
+ * @param body Updated user object (required)
+ * @return Invalid user supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 25cf444b839..d190ed8cd03 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -36,6 +36,13 @@ public interface AnotherFakeApi {
return Optional.empty();
}
+ /**
+ * PATCH /another-fake/dummy : To test special tags
+ * To test special tags and operation ID starting with number
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java
index 4f2d81b78b5..afd60347b77 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java
@@ -46,6 +46,13 @@ public interface FakeApi {
return Optional.empty();
}
+ /**
+ * POST /fake/create_xml_item : creates an XmlItem
+ * this route creates an XmlItem
+ *
+ * @param xmlItem XmlItem Body (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -58,6 +65,13 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/outer/boolean
+ * Test serialization of outer boolean types
+ *
+ * @param body Input boolean as post body (optional)
+ * @return Output boolean (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
@@ -70,6 +84,13 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/outer/composite
+ * Test serialization of object with outer number type
+ *
+ * @param body Input composite as post body (optional)
+ * @return Output composite (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) })
@@ -93,6 +114,13 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/outer/number
+ * Test serialization of outer number types
+ *
+ * @param body Input number as post body (optional)
+ * @return Output number (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
@@ -105,6 +133,13 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/outer/string
+ * Test serialization of outer string types
+ *
+ * @param body Input string as post body (optional)
+ * @return Output string (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output string", response = String.class) })
@@ -117,6 +152,13 @@ public interface FakeApi {
}
+ /**
+ * PUT /fake/body-with-file-schema
+ * For this test, the body for this request much reference a schema named `File`.
+ *
+ * @param body (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -129,6 +171,13 @@ public interface FakeApi {
}
+ /**
+ * PUT /fake/body-with-query-params
+ *
+ * @param query (required)
+ * @param body (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -141,6 +190,13 @@ public interface FakeApi {
}
+ /**
+ * PATCH /fake : To test \"client\" model
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
@@ -165,6 +221,27 @@ public interface FakeApi {
}
+ /**
+ * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = {
@Authorization(value = "http_basic_test")
}, tags={ "fake", })
@@ -180,6 +257,21 @@ public interface FakeApi {
}
+ /**
+ * GET /fake : To test enum parameters
+ * To test enum parameters
+ *
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @return Invalid request (status code 400)
+ * or Not found (status code 404)
+ */
@ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid request"),
@@ -193,6 +285,18 @@ public interface FakeApi {
}
+ /**
+ * DELETE /fake : Fake endpoint to test group parameters (optional)
+ * Fake endpoint to test group parameters (optional)
+ *
+ * @param requiredStringGroup Required String in group parameters (required)
+ * @param requiredBooleanGroup Required Boolean in group parameters (required)
+ * @param requiredInt64Group Required Integer in group parameters (required)
+ * @param stringGroup String in group parameters (optional)
+ * @param booleanGroup Boolean in group parameters (optional)
+ * @param int64Group Integer in group parameters (optional)
+ * @return Someting wrong (status code 400)
+ */
@ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Someting wrong") })
@@ -204,6 +308,12 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/inline-additionalProperties : test inline additionalProperties
+ *
+ * @param param request body (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -216,6 +326,13 @@ public interface FakeApi {
}
+ /**
+ * GET /fake/jsonFormData : test json serialization of form data
+ *
+ * @param param field1 (required)
+ * @param param2 field2 (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -228,6 +345,17 @@ public interface FakeApi {
}
+ /**
+ * PUT /fake/test-query-paramters
+ * To test the collection format in query parameters
+ *
+ * @param pipe (required)
+ * @param ioutil (required)
+ * @param http (required)
+ * @param url (required)
+ * @param context (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -239,6 +367,14 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required)
+ *
+ * @param petId ID of pet to update (required)
+ * @param requiredFile file to upload (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index b09990e9f1e..82bca7bcf29 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -36,6 +36,13 @@ public interface FakeClassnameTestApi {
return Optional.empty();
}
+ /**
+ * PATCH /fake_classname_test : To test class name in snake case
+ * To test class name in snake case
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@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#$%^", })
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
index 241112df11f..8714900c1e0 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
@@ -38,6 +38,13 @@ public interface PetApi {
return Optional.empty();
}
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid input (status code 405)
+ */
@ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -56,6 +63,14 @@ public interface PetApi {
}
+ /**
+ * DELETE /pet/{petId} : Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return successful operation (status code 200)
+ * or Invalid pet value (status code 400)
+ */
@ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -73,6 +88,14 @@ public interface PetApi {
}
+ /**
+ * GET /pet/findByStatus : Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @param status Status values that need to be considered for filter (required)
+ * @return successful operation (status code 200)
+ * or Invalid status value (status code 400)
+ */
@ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -107,6 +130,15 @@ public interface PetApi {
}
+ /**
+ * GET /pet/findByTags : Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param tags Tags to filter by (required)
+ * @return successful operation (status code 200)
+ * or Invalid tag value (status code 400)
+ * @deprecated
+ */
@ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -141,6 +173,15 @@ public interface PetApi {
}
+ /**
+ * GET /pet/{petId} : Find pet by ID
+ * Returns a single pet
+ *
+ * @param petId ID of pet to return (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ */
@ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = {
@Authorization(value = "api_key")
}, tags={ "pet", })
@@ -173,6 +214,15 @@ public interface PetApi {
}
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * or Validation exception (status code 405)
+ */
@ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -193,6 +243,14 @@ public interface PetApi {
}
+ /**
+ * POST /pet/{petId} : Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -210,6 +268,14 @@ public interface PetApi {
}
+ /**
+ * POST /pet/{petId}/uploadImage : uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java
index 52e234892fc..ff391a05d84 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java
@@ -37,6 +37,14 @@ public interface StoreApi {
return Optional.empty();
}
+ /**
+ * DELETE /store/order/{order_id} : Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@@ -49,6 +57,12 @@ public interface StoreApi {
}
+ /**
+ * GET /store/inventory : Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@Authorization(value = "api_key")
}, tags={ "store", })
@@ -63,6 +77,15 @@ public interface StoreApi {
}
+ /**
+ * GET /store/order/{order_id} : Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
+ * @param orderId ID of pet that needs to be fetched (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@@ -93,6 +116,13 @@ public interface StoreApi {
}
+ /**
+ * POST /store/order : Place an order for a pet
+ *
+ * @param body order placed for purchasing the pet (required)
+ * @return successful operation (status code 200)
+ * or Invalid Order (status code 400)
+ */
@ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java
index 506002b3d3e..43e85ed4a20 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java
@@ -37,6 +37,13 @@ public interface UserApi {
return Optional.empty();
}
+ /**
+ * POST /user : Create user
+ * This can only be done by the logged in user.
+ *
+ * @param body Created user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -48,6 +55,12 @@ public interface UserApi {
}
+ /**
+ * POST /user/createWithArray : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -59,6 +72,12 @@ public interface UserApi {
}
+ /**
+ * POST /user/createWithList : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -70,6 +89,14 @@ public interface UserApi {
}
+ /**
+ * DELETE /user/{username} : Delete user
+ * This can only be done by the logged in user.
+ *
+ * @param username The name that needs to be deleted (required)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@@ -82,6 +109,14 @@ public interface UserApi {
}
+ /**
+ * GET /user/{username} : Get user by user name
+ *
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @return successful operation (status code 200)
+ * or Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@@ -112,6 +147,14 @@ public interface UserApi {
}
+ /**
+ * GET /user/login : Logs user into the system
+ *
+ * @param username The user name for login (required)
+ * @param password The password for login in clear text (required)
+ * @return successful operation (status code 200)
+ * or Invalid username/password supplied (status code 400)
+ */
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@@ -125,6 +168,11 @@ public interface UserApi {
}
+ /**
+ * GET /user/logout : Logs out current logged in user session
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -136,6 +184,15 @@ public interface UserApi {
}
+ /**
+ * PUT /user/{username} : Updated user
+ * This can only be done by the logged in user.
+ *
+ * @param username name that need to be deleted (required)
+ * @param body Updated user object (required)
+ * @return Invalid user supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 985497e4312..688b8e51a9e 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -35,6 +35,13 @@ public interface AnotherFakeApi {
return Optional.empty();
}
+ /**
+ * PATCH /another-fake/dummy : To test special tags
+ * To test special tags and operation ID starting with number
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
index 155b8035260..1d8b2f18050 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
@@ -45,6 +45,13 @@ public interface FakeApi {
return Optional.empty();
}
+ /**
+ * POST /fake/create_xml_item : creates an XmlItem
+ * this route creates an XmlItem
+ *
+ * @param xmlItem XmlItem Body (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -57,6 +64,13 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/outer/boolean
+ * Test serialization of outer boolean types
+ *
+ * @param body Input boolean as post body (optional)
+ * @return Output boolean (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
@@ -69,6 +83,13 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/outer/composite
+ * Test serialization of object with outer number type
+ *
+ * @param body Input composite as post body (optional)
+ * @return Output composite (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) })
@@ -90,6 +111,13 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/outer/number
+ * Test serialization of outer number types
+ *
+ * @param body Input number as post body (optional)
+ * @return Output number (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
@@ -102,6 +130,13 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/outer/string
+ * Test serialization of outer string types
+ *
+ * @param body Input string as post body (optional)
+ * @return Output string (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output string", response = String.class) })
@@ -114,6 +149,13 @@ public interface FakeApi {
}
+ /**
+ * PUT /fake/body-with-file-schema
+ * For this test, the body for this request much reference a schema named `File`.
+ *
+ * @param body (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -126,6 +168,13 @@ public interface FakeApi {
}
+ /**
+ * PUT /fake/body-with-query-params
+ *
+ * @param query (required)
+ * @param body (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -138,6 +187,13 @@ public interface FakeApi {
}
+ /**
+ * PATCH /fake : To test \"client\" model
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
@@ -160,6 +216,27 @@ public interface FakeApi {
}
+ /**
+ * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = {
@Authorization(value = "http_basic_test")
}, tags={ "fake", })
@@ -175,6 +252,21 @@ public interface FakeApi {
}
+ /**
+ * GET /fake : To test enum parameters
+ * To test enum parameters
+ *
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<>())
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<>())
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @return Invalid request (status code 400)
+ * or Not found (status code 404)
+ */
@ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid request"),
@@ -188,6 +280,18 @@ public interface FakeApi {
}
+ /**
+ * DELETE /fake : Fake endpoint to test group parameters (optional)
+ * Fake endpoint to test group parameters (optional)
+ *
+ * @param requiredStringGroup Required String in group parameters (required)
+ * @param requiredBooleanGroup Required Boolean in group parameters (required)
+ * @param requiredInt64Group Required Integer in group parameters (required)
+ * @param stringGroup String in group parameters (optional)
+ * @param booleanGroup Boolean in group parameters (optional)
+ * @param int64Group Integer in group parameters (optional)
+ * @return Someting wrong (status code 400)
+ */
@ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Someting wrong") })
@@ -199,6 +303,12 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/inline-additionalProperties : test inline additionalProperties
+ *
+ * @param param request body (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -211,6 +321,13 @@ public interface FakeApi {
}
+ /**
+ * GET /fake/jsonFormData : test json serialization of form data
+ *
+ * @param param field1 (required)
+ * @param param2 field2 (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -223,6 +340,17 @@ public interface FakeApi {
}
+ /**
+ * PUT /fake/test-query-paramters
+ * To test the collection format in query parameters
+ *
+ * @param pipe (required)
+ * @param ioutil (required)
+ * @param http (required)
+ * @param url (required)
+ * @param context (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -234,6 +362,14 @@ public interface FakeApi {
}
+ /**
+ * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required)
+ *
+ * @param petId ID of pet to update (required)
+ * @param requiredFile file to upload (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index dcc95822624..9a812e59198 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -35,6 +35,13 @@ public interface FakeClassnameTestApi {
return Optional.empty();
}
+ /**
+ * PATCH /fake_classname_test : To test class name in snake case
+ * To test class name in snake case
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@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#$%^", })
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
index 4844b536961..84d7ef0625e 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
@@ -37,6 +37,13 @@ public interface PetApi {
return Optional.empty();
}
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid input (status code 405)
+ */
@ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -55,6 +62,14 @@ public interface PetApi {
}
+ /**
+ * DELETE /pet/{petId} : Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return successful operation (status code 200)
+ * or Invalid pet value (status code 400)
+ */
@ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -72,6 +87,14 @@ public interface PetApi {
}
+ /**
+ * GET /pet/findByStatus : Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @param status Status values that need to be considered for filter (required)
+ * @return successful operation (status code 200)
+ * or Invalid status value (status code 400)
+ */
@ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -104,6 +127,15 @@ public interface PetApi {
}
+ /**
+ * GET /pet/findByTags : Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param tags Tags to filter by (required)
+ * @return successful operation (status code 200)
+ * or Invalid tag value (status code 400)
+ * @deprecated
+ */
@ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -136,6 +168,15 @@ public interface PetApi {
}
+ /**
+ * GET /pet/{petId} : Find pet by ID
+ * Returns a single pet
+ *
+ * @param petId ID of pet to return (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ */
@ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = {
@Authorization(value = "api_key")
}, tags={ "pet", })
@@ -166,6 +207,15 @@ public interface PetApi {
}
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * or Validation exception (status code 405)
+ */
@ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -186,6 +236,14 @@ public interface PetApi {
}
+ /**
+ * POST /pet/{petId} : Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -203,6 +261,14 @@ public interface PetApi {
}
+ /**
+ * POST /pet/{petId}/uploadImage : uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java
index 1e431779b38..ed0551b3044 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java
@@ -36,6 +36,14 @@ public interface StoreApi {
return Optional.empty();
}
+ /**
+ * DELETE /store/order/{order_id} : Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@@ -48,6 +56,12 @@ public interface StoreApi {
}
+ /**
+ * GET /store/inventory : Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@Authorization(value = "api_key")
}, tags={ "store", })
@@ -62,6 +76,15 @@ public interface StoreApi {
}
+ /**
+ * GET /store/order/{order_id} : Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
+ * @param orderId ID of pet that needs to be fetched (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@@ -90,6 +113,13 @@ public interface StoreApi {
}
+ /**
+ * POST /store/order : Place an order for a pet
+ *
+ * @param body order placed for purchasing the pet (required)
+ * @return successful operation (status code 200)
+ * or Invalid Order (status code 400)
+ */
@ApiOperation(value = "Place an order for a pet", nickname = "placeOrder", notes = "", response = Order.class, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java
index 75c42b125a3..fc9ca11b96c 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java
@@ -36,6 +36,13 @@ public interface UserApi {
return Optional.empty();
}
+ /**
+ * POST /user : Create user
+ * This can only be done by the logged in user.
+ *
+ * @param body Created user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Create user", nickname = "createUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -47,6 +54,12 @@ public interface UserApi {
}
+ /**
+ * POST /user/createWithArray : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithArrayInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -58,6 +71,12 @@ public interface UserApi {
}
+ /**
+ * POST /user/createWithList : Creates list of users with given input array
+ *
+ * @param body List of user object (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Creates list of users with given input array", nickname = "createUsersWithListInput", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -69,6 +88,14 @@ public interface UserApi {
}
+ /**
+ * DELETE /user/{username} : Delete user
+ * This can only be done by the logged in user.
+ *
+ * @param username The name that needs to be deleted (required)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Delete user", nickname = "deleteUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied"),
@@ -81,6 +108,14 @@ public interface UserApi {
}
+ /**
+ * GET /user/{username} : Get user by user name
+ *
+ * @param username The name that needs to be fetched. Use user1 for testing. (required)
+ * @return successful operation (status code 200)
+ * or Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Get user by user name", nickname = "getUserByName", notes = "", response = User.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@@ -109,6 +144,14 @@ public interface UserApi {
}
+ /**
+ * GET /user/login : Logs user into the system
+ *
+ * @param username The user name for login (required)
+ * @param password The password for login in clear text (required)
+ * @return successful operation (status code 200)
+ * or Invalid username/password supplied (status code 400)
+ */
@ApiOperation(value = "Logs user into the system", nickname = "loginUser", notes = "", response = String.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@@ -122,6 +165,11 @@ public interface UserApi {
}
+ /**
+ * GET /user/logout : Logs out current logged in user session
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Logs out current logged in user session", nickname = "logoutUser", notes = "", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -133,6 +181,15 @@ public interface UserApi {
}
+ /**
+ * PUT /user/{username} : Updated user
+ * This can only be done by the logged in user.
+ *
+ * @param username name that need to be deleted (required)
+ * @param body Updated user object (required)
+ * @return Invalid user supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Updated user", nickname = "updateUser", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied"),
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 3164635c246..9596d158a88 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -27,6 +27,13 @@ import java.util.Map;
@Api(value = "another-fake", description = "the another-fake API")
public interface AnotherFakeApi {
+ /**
+ * PATCH /another-fake/dummy : To test special tags
+ * To test special tags and operation ID starting with number
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java
index fb922708cb0..d6132e093cf 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApiController.java
@@ -31,6 +31,14 @@ public class AnotherFakeApiController implements AnotherFakeApi {
this.request = request;
}
+ /**
+ * PATCH /another-fake/dummy : To test special tags
+ * To test special tags and operation ID starting with number
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ * @see AnotherFakeApi#call123testSpecialTags
+ */
public ResponseEntity call123testSpecialTags(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
index 97f8197cf58..b31b167dad4 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
@@ -37,6 +37,13 @@ import java.util.Map;
@Api(value = "fake", description = "the fake API")
public interface FakeApi {
+ /**
+ * POST /fake/create_xml_item : creates an XmlItem
+ * this route creates an XmlItem
+ *
+ * @param xmlItem XmlItem Body (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "creates an XmlItem", nickname = "createXmlItem", notes = "this route creates an XmlItem", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -46,6 +53,13 @@ public interface FakeApi {
ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true ) @Valid @RequestBody XmlItem xmlItem);
+ /**
+ * POST /fake/outer/boolean
+ * Test serialization of outer boolean types
+ *
+ * @param body Input boolean as post body (optional)
+ * @return Output boolean (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterBooleanSerialize", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
@@ -55,6 +69,13 @@ public interface FakeApi {
ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody Boolean body);
+ /**
+ * POST /fake/outer/composite
+ * Test serialization of object with outer number type
+ *
+ * @param body Input composite as post body (optional)
+ * @return Output composite (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterCompositeSerialize", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) })
@@ -64,6 +85,13 @@ public interface FakeApi {
ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite body);
+ /**
+ * POST /fake/outer/number
+ * Test serialization of outer number types
+ *
+ * @param body Input number as post body (optional)
+ * @return Output number (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterNumberSerialize", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
@@ -73,6 +101,13 @@ public interface FakeApi {
ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid @RequestBody BigDecimal body);
+ /**
+ * POST /fake/outer/string
+ * Test serialization of outer string types
+ *
+ * @param body Input string as post body (optional)
+ * @return Output string (status code 200)
+ */
@ApiOperation(value = "", nickname = "fakeOuterStringSerialize", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Output string", response = String.class) })
@@ -82,6 +117,13 @@ public interface FakeApi {
ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid @RequestBody String body);
+ /**
+ * PUT /fake/body-with-file-schema
+ * For this test, the body for this request much reference a schema named `File`.
+ *
+ * @param body (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testBodyWithFileSchema", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -91,6 +133,13 @@ public interface FakeApi {
ResponseEntity testBodyWithFileSchema(@ApiParam(value = "" ,required=true ) @Valid @RequestBody FileSchemaTestClass body);
+ /**
+ * PUT /fake/body-with-query-params
+ *
+ * @param query (required)
+ * @param body (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testBodyWithQueryParams", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -100,6 +149,13 @@ public interface FakeApi {
ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "" ,required=true ) @Valid @RequestBody User body);
+ /**
+ * PATCH /fake : To test \"client\" model
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "To test \"client\" model", nickname = "testClientModel", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
@@ -110,6 +166,27 @@ public interface FakeApi {
ResponseEntity testClientModel(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body);
+ /**
+ * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ */
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = {
@Authorization(value = "http_basic_test")
}, tags={ "fake", })
@@ -122,6 +199,21 @@ public interface FakeApi {
ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback);
+ /**
+ * GET /fake : To test enum parameters
+ * To test enum parameters
+ *
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>())
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>())
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @return Invalid request (status code 400)
+ * or Not found (status code 404)
+ */
@ApiOperation(value = "To test enum parameters", nickname = "testEnumParameters", notes = "To test enum parameters", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid request"),
@@ -132,6 +224,18 @@ public interface FakeApi {
ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString);
+ /**
+ * DELETE /fake : Fake endpoint to test group parameters (optional)
+ * Fake endpoint to test group parameters (optional)
+ *
+ * @param requiredStringGroup Required String in group parameters (required)
+ * @param requiredBooleanGroup Required Boolean in group parameters (required)
+ * @param requiredInt64Group Required Integer in group parameters (required)
+ * @param stringGroup String in group parameters (optional)
+ * @param booleanGroup Boolean in group parameters (optional)
+ * @param int64Group Integer in group parameters (optional)
+ * @return Someting wrong (status code 400)
+ */
@ApiOperation(value = "Fake endpoint to test group parameters (optional)", nickname = "testGroupParameters", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Someting wrong") })
@@ -140,6 +244,12 @@ public interface FakeApi {
ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters" ,required=true) @RequestHeader(value="required_boolean_group", required=true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group);
+ /**
+ * POST /fake/inline-additionalProperties : test inline additionalProperties
+ *
+ * @param param request body (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "test inline additionalProperties", nickname = "testInlineAdditionalProperties", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -149,6 +259,13 @@ public interface FakeApi {
ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true ) @Valid @RequestBody Map param);
+ /**
+ * GET /fake/jsonFormData : test json serialization of form data
+ *
+ * @param param field1 (required)
+ * @param param2 field2 (required)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "test json serialization of form data", nickname = "testJsonFormData", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation") })
@@ -158,6 +275,17 @@ public interface FakeApi {
ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2);
+ /**
+ * PUT /fake/test-query-paramters
+ * To test the collection format in query parameters
+ *
+ * @param pipe (required)
+ * @param ioutil (required)
+ * @param http (required)
+ * @param url (required)
+ * @param context (required)
+ * @return Success (status code 200)
+ */
@ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success") })
@@ -166,6 +294,14 @@ public interface FakeApi {
ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context);
+ /**
+ * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required)
+ *
+ * @param petId ID of pet to update (required)
+ * @param requiredFile file to upload (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java
index 1778cc30e75..df558c63df8 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java
@@ -41,16 +41,40 @@ public class FakeApiController implements FakeApi {
this.request = request;
}
+ /**
+ * POST /fake/create_xml_item : creates an XmlItem
+ * this route creates an XmlItem
+ *
+ * @param xmlItem XmlItem Body (required)
+ * @return successful operation (status code 200)
+ * @see FakeApi#createXmlItem
+ */
public ResponseEntity createXmlItem(@ApiParam(value = "XmlItem Body" ,required=true ) @Valid @RequestBody XmlItem xmlItem) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * POST /fake/outer/boolean
+ * Test serialization of outer boolean types
+ *
+ * @param body Input boolean as post body (optional)
+ * @return Output boolean (status code 200)
+ * @see FakeApi#fakeOuterBooleanSerialize
+ */
public ResponseEntity fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody Boolean body) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * POST /fake/outer/composite
+ * Test serialization of object with outer number type
+ *
+ * @param body Input composite as post body (optional)
+ * @return Output composite (status code 200)
+ * @see FakeApi#fakeOuterCompositeSerialize
+ */
public ResponseEntity fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite body) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) {
@@ -63,26 +87,66 @@ public class FakeApiController implements FakeApi {
}
+ /**
+ * POST /fake/outer/number
+ * Test serialization of outer number types
+ *
+ * @param body Input number as post body (optional)
+ * @return Output number (status code 200)
+ * @see FakeApi#fakeOuterNumberSerialize
+ */
public ResponseEntity fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid @RequestBody BigDecimal body) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * POST /fake/outer/string
+ * Test serialization of outer string types
+ *
+ * @param body Input string as post body (optional)
+ * @return Output string (status code 200)
+ * @see FakeApi#fakeOuterStringSerialize
+ */
public ResponseEntity fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid @RequestBody String body) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * PUT /fake/body-with-file-schema
+ * For this test, the body for this request much reference a schema named `File`.
+ *
+ * @param body (required)
+ * @return Success (status code 200)
+ * @see FakeApi#testBodyWithFileSchema
+ */
public ResponseEntity testBodyWithFileSchema(@ApiParam(value = "" ,required=true ) @Valid @RequestBody FileSchemaTestClass body) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * PUT /fake/body-with-query-params
+ *
+ * @param query (required)
+ * @param body (required)
+ * @return Success (status code 200)
+ * @see FakeApi#testBodyWithQueryParams
+ */
public ResponseEntity testBodyWithQueryParams(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,@ApiParam(value = "" ,required=true ) @Valid @RequestBody User body) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * PATCH /fake : To test \"client\" model
+ * To test \"client\" model
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ * @see FakeApi#testClientModel
+ */
public ResponseEntity testClientModel(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
@@ -95,36 +159,123 @@ public class FakeApiController implements FakeApi {
}
+ /**
+ * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @return Invalid username supplied (status code 400)
+ * or User not found (status code 404)
+ * @see FakeApi#testEndpointParameters
+ */
public ResponseEntity testEndpointParameters(@ApiParam(value = "None", required=true) @RequestParam(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestParam(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestParam(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestParam(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestParam(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestParam(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestParam(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestParam(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestParam(value="string", required=false) String string,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile binary,@ApiParam(value = "None") @RequestParam(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestParam(value="dateTime", required=false) OffsetDateTime dateTime,@ApiParam(value = "None") @RequestParam(value="password", required=false) String password,@ApiParam(value = "None") @RequestParam(value="callback", required=false) String paramCallback) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * GET /fake : To test enum parameters
+ * To test enum parameters
+ *
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>())
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>())
+ * @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryInteger Query parameter enum test (double) (optional)
+ * @param enumQueryDouble Query parameter enum test (double) (optional)
+ * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @return Invalid request (status code 400)
+ * or Not found (status code 404)
+ * @see FakeApi#testEnumParameters
+ */
public ResponseEntity testEnumParameters(@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestParam(value="enum_form_string_array", required=false) List enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestParam(value="enum_form_string", required=false) String enumFormString) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * DELETE /fake : Fake endpoint to test group parameters (optional)
+ * Fake endpoint to test group parameters (optional)
+ *
+ * @param requiredStringGroup Required String in group parameters (required)
+ * @param requiredBooleanGroup Required Boolean in group parameters (required)
+ * @param requiredInt64Group Required Integer in group parameters (required)
+ * @param stringGroup String in group parameters (optional)
+ * @param booleanGroup Boolean in group parameters (optional)
+ * @param int64Group Integer in group parameters (optional)
+ * @return Someting wrong (status code 400)
+ * @see FakeApi#testGroupParameters
+ */
public ResponseEntity testGroupParameters(@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters" ,required=true) @RequestHeader(value="required_boolean_group", required=true) Boolean requiredBooleanGroup,@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,@ApiParam(value = "Boolean in group parameters" ) @RequestHeader(value="boolean_group", required=false) Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * POST /fake/inline-additionalProperties : test inline additionalProperties
+ *
+ * @param param request body (required)
+ * @return successful operation (status code 200)
+ * @see FakeApi#testInlineAdditionalProperties
+ */
public ResponseEntity testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true ) @Valid @RequestBody Map param) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * GET /fake/jsonFormData : test json serialization of form data
+ *
+ * @param param field1 (required)
+ * @param param2 field2 (required)
+ * @return successful operation (status code 200)
+ * @see FakeApi#testJsonFormData
+ */
public ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true) @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true) @RequestParam(value="param2", required=true) String param2) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * PUT /fake/test-query-paramters
+ * To test the collection format in query parameters
+ *
+ * @param pipe (required)
+ * @param ioutil (required)
+ * @param http (required)
+ * @param url (required)
+ * @param context (required)
+ * @return Success (status code 200)
+ * @see FakeApi#testQueryParameterCollectionFormat
+ */
public ResponseEntity testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List context) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required)
+ *
+ * @param petId ID of pet to update (required)
+ * @param requiredFile file to upload (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @return successful operation (status code 200)
+ * @see FakeApi#uploadFileWithRequiredFile
+ */
public ResponseEntity uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 04b45664b26..64f0517f509 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -27,6 +27,13 @@ import java.util.Map;
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
public interface FakeClassnameTestApi {
+ /**
+ * PATCH /fake_classname_test : To test class name in snake case
+ * To test class name in snake case
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ */
@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#$%^", })
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java
index d2642a4ceeb..95e67da6ac0 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApiController.java
@@ -31,6 +31,14 @@ public class FakeClassnameTestApiController implements FakeClassnameTestApi {
this.request = request;
}
+ /**
+ * PATCH /fake_classname_test : To test class name in snake case
+ * To test class name in snake case
+ *
+ * @param body client model (required)
+ * @return successful operation (status code 200)
+ * @see FakeClassnameTestApi#testClassname
+ */
public ResponseEntity testClassname(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
index 651756d71e3..05712720fd1 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
@@ -29,6 +29,13 @@ import java.util.Map;
@Api(value = "pet", description = "the pet API")
public interface PetApi {
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid input (status code 405)
+ */
@ApiOperation(value = "Add a new pet to the store", nickname = "addPet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -44,6 +51,14 @@ public interface PetApi {
ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
+ /**
+ * DELETE /pet/{petId} : Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return successful operation (status code 200)
+ * or Invalid pet value (status code 400)
+ */
@ApiOperation(value = "Deletes a pet", nickname = "deletePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -58,6 +73,14 @@ public interface PetApi {
ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
+ /**
+ * GET /pet/findByStatus : Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @param status Status values that need to be considered for filter (required)
+ * @return successful operation (status code 200)
+ * or Invalid status value (status code 400)
+ */
@ApiOperation(value = "Finds Pets by status", nickname = "findPetsByStatus", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -73,6 +96,15 @@ public interface PetApi {
ResponseEntity> 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 status);
+ /**
+ * GET /pet/findByTags : Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param tags Tags to filter by (required)
+ * @return successful operation (status code 200)
+ * or Invalid tag value (status code 400)
+ * @deprecated
+ */
@ApiOperation(value = "Finds Pets by tags", nickname = "findPetsByTags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -88,6 +120,15 @@ public interface PetApi {
ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags);
+ /**
+ * GET /pet/{petId} : Find pet by ID
+ * Returns a single pet
+ *
+ * @param petId ID of pet to return (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ */
@ApiOperation(value = "Find pet by ID", nickname = "getPetById", notes = "Returns a single pet", response = Pet.class, authorizations = {
@Authorization(value = "api_key")
}, tags={ "pet", })
@@ -101,6 +142,15 @@ public interface PetApi {
ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathVariable("petId") Long petId);
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * or Validation exception (status code 405)
+ */
@ApiOperation(value = "Update an existing pet", nickname = "updatePet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -118,6 +168,14 @@ public interface PetApi {
ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
+ /**
+ * POST /pet/{petId} : Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return Invalid input (status code 405)
+ */
@ApiOperation(value = "Updates a pet in the store with form data", nickname = "updatePetWithForm", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@@ -132,6 +190,14 @@ public interface PetApi {
ResponseEntity 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);
+ /**
+ * POST /pet/{petId}/uploadImage : uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "uploads an image", nickname = "uploadFile", notes = "", response = ModelApiResponse.class, authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java
index b1e82a3f737..84e03b71cdb 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java
@@ -33,16 +33,42 @@ public class PetApiController implements PetApi {
this.request = request;
}
+ /**
+ * POST /pet : Add a new pet to the store
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid input (status code 405)
+ * @see PetApi#addPet
+ */
public ResponseEntity addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * DELETE /pet/{petId} : Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return successful operation (status code 200)
+ * or Invalid pet value (status code 400)
+ * @see PetApi#deletePet
+ */
public ResponseEntity deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * GET /pet/findByStatus : Finds Pets by status
+ * Multiple status values can be provided with comma separated strings
+ *
+ * @param status Status values that need to be considered for filter (required)
+ * @return successful operation (status code 200)
+ * or Invalid status value (status code 400)
+ * @see PetApi#findPetsByStatus
+ */
public ResponseEntity> 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 status) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
@@ -60,6 +86,16 @@ public class PetApiController implements PetApi {
}
+ /**
+ * GET /pet/findByTags : Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param tags Tags to filter by (required)
+ * @return successful operation (status code 200)
+ * or Invalid tag value (status code 400)
+ * @deprecated
+ * @see PetApi#findPetsByTags
+ */
public ResponseEntity> findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
@@ -77,6 +113,16 @@ public class PetApiController implements PetApi {
}
+ /**
+ * GET /pet/{petId} : Find pet by ID
+ * Returns a single pet
+ *
+ * @param petId ID of pet to return (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * @see PetApi#getPetById
+ */
public ResponseEntity getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathVariable("petId") Long petId) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
@@ -94,16 +140,44 @@ public class PetApiController implements PetApi {
}
+ /**
+ * PUT /pet : Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return successful operation (status code 200)
+ * or Invalid ID supplied (status code 400)
+ * or Pet not found (status code 404)
+ * or Validation exception (status code 405)
+ * @see PetApi#updatePet
+ */
public ResponseEntity updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * POST /pet/{petId} : Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated (required)
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ * @return Invalid input (status code 405)
+ * @see PetApi#updatePetWithForm
+ */
public ResponseEntity 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) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
+ /**
+ * POST /pet/{petId}/uploadImage : uploads an image
+ *
+ * @param petId ID of pet to update (required)
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ * @return successful operation (status code 200)
+ * @see PetApi#uploadFile
+ */
public ResponseEntity 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) {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java
index 49ef013f393..f46e2f4e79f 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java
@@ -28,6 +28,14 @@ import java.util.Map;
@Api(value = "store", description = "the store API")
public interface StoreApi {
+ /**
+ * DELETE /store/order/{order_id} : Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @param orderId ID of the order that needs to be deleted (required)
+ * @return Invalid ID supplied (status code 400)
+ * or Order not found (status code 404)
+ */
@ApiOperation(value = "Delete purchase order by ID", nickname = "deleteOrder", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied"),
@@ -37,6 +45,12 @@ public interface StoreApi {
ResponseEntity deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathVariable("order_id") String orderId);
+ /**
+ * GET /store/inventory : Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ *
+ * @return successful operation (status code 200)
+ */
@ApiOperation(value = "Returns pet inventories by status", nickname = "getInventory", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@Authorization(value = "api_key")
}, tags={ "store", })
@@ -48,6 +62,15 @@ public interface StoreApi {
ResponseEntity