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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ import {{javaxPackage}}.validation.Valid;{{/useBeanValidation}}
/**
* Represents a collection of functions to interact with the API endpoints.
*/
{{^interfaceOnly}}
@Path("{{commonPath}}")
{{/interfaceOnly}}
{{#useSwaggerAnnotations}}
@Path("{{commonPath}}"){{#useSwaggerAnnotations}}
@Api(description = "the {{{baseName}}} API"){{/useSwaggerAnnotations}}{{#useSwaggerV3Annotations}}
@Tag(name = "{{{baseName}}}"){{/useSwaggerV3Annotations}}{{#hasConsumes}}
@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* @return {{{message}}}
{{/responses}}
*/
@{{httpMethod}}
@Path("{{commonPath}}{{{path}}}"){{#hasConsumes}}
@{{httpMethod}}{{#subresourceOperation}}
@Path("{{{path}}}"){{/subresourceOperation}}{{#hasConsumes}}
@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}}
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}{{#useSwaggerAnnotations}}
@ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}"{{#hasAuthMethods}}, authorizations = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/**
* Represents a collection of functions to interact with the API endpoints.
*/
@Path("/another-fake/dummy")
@Api(description = "the another-fake API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
public interface AnotherFakeApi {
Expand All @@ -29,7 +30,6 @@ public interface AnotherFakeApi {
* @return successful operation
*/
@PATCH
@Path("/another-fake/dummy")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/**
* Represents a collection of functions to interact with the API endpoints.
*/
@Path("/fake")
@Api(description = "the fake API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
public interface FakeApi {
Expand All @@ -37,7 +38,7 @@ public interface FakeApi {
* @return successful operation
*/
@POST
@Path("/fake/create_xml_item")
@Path("/create_xml_item")
@Consumes({ "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" })
@ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -52,7 +53,7 @@ public interface FakeApi {
* @return Output boolean
*/
@POST
@Path("/fake/outer/boolean")
@Path("/outer/boolean")
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -67,7 +68,7 @@ public interface FakeApi {
* @return Output composite
*/
@POST
@Path("/fake/outer/composite")
@Path("/outer/composite")
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -82,7 +83,7 @@ public interface FakeApi {
* @return Output number
*/
@POST
@Path("/fake/outer/number")
@Path("/outer/number")
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -97,7 +98,7 @@ public interface FakeApi {
* @return Output string
*/
@POST
@Path("/fake/outer/string")
@Path("/outer/string")
@Produces({ "*/*" })
@ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -112,7 +113,7 @@ public interface FakeApi {
* @return Success
*/
@PUT
@Path("/fake/body-with-file-schema")
@Path("/body-with-file-schema")
@Consumes({ "application/json" })
@ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -128,7 +129,7 @@ public interface FakeApi {
* @return Success
*/
@PUT
@Path("/fake/body-with-query-params")
@Path("/body-with-query-params")
@Consumes({ "application/json" })
@ApiOperation(value = "", notes = "", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -143,7 +144,6 @@ public interface FakeApi {
* @return successful operation
*/
@PATCH
@Path("/fake")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" })
Expand Down Expand Up @@ -173,7 +173,6 @@ public interface FakeApi {
* @return User not found
*/
@POST
@Path("/fake")
@Consumes({ "application/x-www-form-urlencoded" })
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = {

Expand All @@ -200,7 +199,6 @@ public interface FakeApi {
* @return Not found
*/
@GET
@Path("/fake")
@Consumes({ "application/x-www-form-urlencoded" })
@ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -221,7 +219,6 @@ public interface FakeApi {
* @return Something wrong
*/
@DELETE
@Path("/fake")
@ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Something wrong", response = Void.class) })
Expand All @@ -235,7 +232,7 @@ public interface FakeApi {
* @return successful operation
*/
@POST
@Path("/fake/inline-additionalProperties")
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })
@ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -251,7 +248,7 @@ public interface FakeApi {
* @return successful operation
*/
@GET
@Path("/fake/jsonFormData")
@Path("/jsonFormData")
@Consumes({ "application/x-www-form-urlencoded" })
@ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" })
@ApiResponses(value = {
Expand All @@ -270,7 +267,7 @@ public interface FakeApi {
* @return Success
*/
@PUT
@Path("/fake/test-query-parameters")
@Path("/test-query-parameters")
@ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = Void.class) })
Expand All @@ -286,7 +283,7 @@ public interface FakeApi {
* @return successful operation
*/
@POST
@Path("/fake/{petId}/uploadImageWithRequiredFile")
@Path("/{petId}/uploadImageWithRequiredFile")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
@ApiOperation(value = "uploads an image (required)", notes = "", authorizations = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/**
* Represents a collection of functions to interact with the API endpoints.
*/
@Path("/fake_classname_test")
@Api(description = "the fake_classname_test API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
public interface FakeClassnameTestApi {
Expand All @@ -27,7 +28,6 @@ public interface FakeClassnameTestApi {
* @return successful operation
*/
@PATCH
@Path("/fake_classname_test")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/**
* Represents a collection of functions to interact with the API endpoints.
*/
@Path("/pet")
@Api(description = "the pet API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
public interface PetApi {
Expand All @@ -31,7 +32,6 @@ public interface PetApi {
* @return Invalid input
*/
@POST
@Path("/pet")
@Consumes({ "application/json", "application/xml" })
@ApiOperation(value = "Add a new pet to the store", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
Expand All @@ -53,7 +53,7 @@ public interface PetApi {
* @return Invalid pet value
*/
@DELETE
@Path("/pet/{petId}")
@Path("/{petId}")
@ApiOperation(value = "Deletes a pet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
Expand All @@ -73,7 +73,7 @@ public interface PetApi {
* @return Invalid status value
*/
@GET
@Path("/pet/findByStatus")
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
Expand All @@ -94,7 +94,7 @@ public interface PetApi {
* @return Invalid tag value
*/
@GET
@Path("/pet/findByTags")
@Path("/findByTags")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
Expand All @@ -116,7 +116,7 @@ public interface PetApi {
* @return Pet not found
*/
@GET
@Path("/pet/{petId}")
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", authorizations = {

Expand All @@ -139,7 +139,6 @@ public interface PetApi {
* @return Validation exception
*/
@PUT
@Path("/pet")
@Consumes({ "application/json", "application/xml" })
@ApiOperation(value = "Update an existing pet", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
Expand All @@ -163,7 +162,7 @@ public interface PetApi {
* @return Invalid input
*/
@POST
@Path("/pet/{petId}")
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", authorizations = {
@Authorization(value = "petstore_auth", scopes = {
Expand All @@ -184,7 +183,7 @@ public interface PetApi {
* @return successful operation
*/
@POST
@Path("/pet/{petId}/uploadImage")
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
@ApiOperation(value = "uploads an image", notes = "", authorizations = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/**
* Represents a collection of functions to interact with the API endpoints.
*/
@Path("/store")
@Api(description = "the store API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
public interface StoreApi {
Expand All @@ -29,7 +30,7 @@ public interface StoreApi {
* @return Order not found
*/
@DELETE
@Path("/store/order/{order_id}")
@Path("/order/{order_id}")
@ApiOperation(value = "Delete purchase order by ID", 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", response = Void.class),
Expand All @@ -43,7 +44,7 @@ public interface StoreApi {
* @return successful operation
*/
@GET
@Path("/store/inventory")
@Path("/inventory")
@Produces({ "application/json" })
@ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", authorizations = {

Expand All @@ -63,7 +64,7 @@ public interface StoreApi {
* @return Order not found
*/
@GET
@Path("/store/order/{order_id}")
@Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags={ "store" })
@ApiResponses(value = {
Expand All @@ -81,7 +82,7 @@ public interface StoreApi {
* @return Invalid Order
*/
@POST
@Path("/store/order")
@Path("/order")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Place an order for a pet", notes = "", tags={ "store" })
@ApiResponses(value = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/**
* Represents a collection of functions to interact with the API endpoints.
*/
@Path("/user")
@Api(description = "the user API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.18.0-SNAPSHOT")
public interface UserApi {
Expand All @@ -28,7 +29,6 @@ public interface UserApi {
* @return successful operation
*/
@POST
@Path("/user")
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
Expand All @@ -42,7 +42,7 @@ public interface UserApi {
* @return successful operation
*/
@POST
@Path("/user/createWithArray")
@Path("/createWithArray")
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
Expand All @@ -56,7 +56,7 @@ public interface UserApi {
* @return successful operation
*/
@POST
@Path("/user/createWithList")
@Path("/createWithList")
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
Expand All @@ -71,7 +71,7 @@ public interface UserApi {
* @return User not found
*/
@DELETE
@Path("/user/{username}")
@Path("/{username}")
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
Expand All @@ -88,7 +88,7 @@ public interface UserApi {
* @return User not found
*/
@GET
@Path("/user/{username}")
@Path("/{username}")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Get user by user name", notes = "", tags={ "user" })
@ApiResponses(value = {
Expand All @@ -107,7 +107,7 @@ public interface UserApi {
* @return Invalid username/password supplied
*/
@GET
@Path("/user/login")
@Path("/login")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Logs user into the system", notes = "", tags={ "user" })
@ApiResponses(value = {
Expand All @@ -122,7 +122,7 @@ public interface UserApi {
* @return successful operation
*/
@GET
@Path("/user/logout")
@Path("/logout")
@ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
Expand All @@ -138,7 +138,7 @@ public interface UserApi {
* @return User not found
*/
@PUT
@Path("/user/{username}")
@Path("/{username}")
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
Expand Down
Loading
Loading