Add tags on operation for template kotlin-spring (#17410)

* Add tags on kotlin-spring

* Fix review
This commit is contained in:
Kernevez 2024-01-10 04:20:14 +01:00 committed by GitHub
parent 7ddcb9a8cb
commit e69c5269d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 0 deletions

View File

@ -76,6 +76,7 @@ interface {{classname}} {
{{#swagger2AnnotationLibrary}}
@Operation(
tags = [{{#tags}}"{{{name}}}",{{/tags}}],
summary = "{{{summary}}}",
operationId = "{{{operationId}}}",
description = """{{{unescapedNotes}}}""",

View File

@ -41,6 +41,7 @@ interface PetApi {
fun getDelegate(): PetApiDelegate = object: PetApiDelegate {}
@Operation(
tags = ["pet",],
summary = "Add a new pet to the store",
operationId = "addPet",
description = """""",
@ -61,6 +62,7 @@ interface PetApi {
}
@Operation(
tags = ["pet",],
summary = "Deletes a pet",
operationId = "deletePet",
description = """""",
@ -78,6 +80,7 @@ interface PetApi {
}
@Operation(
tags = ["pet",],
summary = "Finds Pets by status",
operationId = "findPetsByStatus",
description = """Multiple status values can be provided with comma separated strings""",
@ -97,6 +100,7 @@ interface PetApi {
}
@Operation(
tags = ["pet",],
summary = "Finds Pets by tags",
operationId = "findPetsByTags",
description = """Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.""",
@ -116,6 +120,7 @@ interface PetApi {
}
@Operation(
tags = ["pet",],
summary = "Find pet by ID",
operationId = "getPetById",
description = """Returns a single pet""",
@ -136,6 +141,7 @@ interface PetApi {
}
@Operation(
tags = ["pet",],
summary = "Update an existing pet",
operationId = "updatePet",
description = """""",
@ -158,6 +164,7 @@ interface PetApi {
}
@Operation(
tags = ["pet",],
summary = "Updates a pet in the store with form data",
operationId = "updatePetWithForm",
description = """""",
@ -176,6 +183,7 @@ interface PetApi {
}
@Operation(
tags = ["pet",],
summary = "uploads an image",
operationId = "uploadFile",
description = """""",

View File

@ -40,6 +40,7 @@ interface StoreApi {
fun getDelegate(): StoreApiDelegate = object: StoreApiDelegate {}
@Operation(
tags = ["store",],
summary = "Delete purchase order by ID",
operationId = "deleteOrder",
description = """For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors""",
@ -57,6 +58,7 @@ interface StoreApi {
}
@Operation(
tags = ["store",],
summary = "Returns pet inventories by status",
operationId = "getInventory",
description = """Returns a map of status codes to quantities""",
@ -75,6 +77,7 @@ interface StoreApi {
}
@Operation(
tags = ["store",],
summary = "Find purchase order by ID",
operationId = "getOrderById",
description = """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""",
@ -94,6 +97,7 @@ interface StoreApi {
}
@Operation(
tags = ["store",],
summary = "Place an order for a pet",
operationId = "placeOrder",
description = """""",

View File

@ -40,6 +40,7 @@ interface UserApi {
fun getDelegate(): UserApiDelegate = object: UserApiDelegate {}
@Operation(
tags = ["user",],
summary = "Create user",
operationId = "createUser",
description = """This can only be done by the logged in user.""",
@ -58,6 +59,7 @@ interface UserApi {
}
@Operation(
tags = ["user",],
summary = "Creates list of users with given input array",
operationId = "createUsersWithArrayInput",
description = """""",
@ -76,6 +78,7 @@ interface UserApi {
}
@Operation(
tags = ["user",],
summary = "Creates list of users with given input array",
operationId = "createUsersWithListInput",
description = """""",
@ -94,6 +97,7 @@ interface UserApi {
}
@Operation(
tags = ["user",],
summary = "Delete user",
operationId = "deleteUser",
description = """This can only be done by the logged in user.""",
@ -112,6 +116,7 @@ interface UserApi {
}
@Operation(
tags = ["user",],
summary = "Get user by user name",
operationId = "getUserByName",
description = """""",
@ -131,6 +136,7 @@ interface UserApi {
}
@Operation(
tags = ["user",],
summary = "Logs user into the system",
operationId = "loginUser",
description = """""",
@ -149,6 +155,7 @@ interface UserApi {
}
@Operation(
tags = ["user",],
summary = "Logs out current logged in user session",
operationId = "logoutUser",
description = """""",
@ -166,6 +173,7 @@ interface UserApi {
}
@Operation(
tags = ["user",],
summary = "Updated user",
operationId = "updateUser",
description = """This can only be done by the logged in user.""",