Skip to content

Commit 568030e

Browse files
authored
fix(petstore): remove unused tags (store/user) in OpenAPI 3.1 (#199)
1 parent 7969a20 commit 568030e

File tree

4 files changed

+3
-33
lines changed

4 files changed

+3
-33
lines changed

src/main/java/io/swagger/petstore/resource/DefinitionResource.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,7 @@
5353
description = "Find out more",
5454
url = "https://swagger.io"
5555
)
56-
),
57-
@Tag(
58-
name = "store",
59-
description = "Access to Petstore orders",
60-
externalDocs = @ExternalDocumentation(
61-
description = "Find out more about our store",
62-
url = "https://swagger.io"
63-
)
64-
),
65-
@Tag(
66-
name = "user",
67-
description = "Operations about user"
6856
)
69-
7057
}
7158
)
7259
@SecuritySchemes(

src/main/java/io/swagger/petstore/resource/PetResource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class PetResource {
2929
@GET
3030
@Path("/{petId}")
3131
@Operation(summary = "Find pet by it's identifier.",
32-
tags = {"pets"},
32+
tags = {"pet"},
3333
description = "Returns a pet when 0 < ID <= 10. ID > 10 or non-integers will simulate API error conditions.",
3434
security = {
3535
@SecurityRequirement(name = "petstore_auth", scopes = {"write:pets", "read:pets"}),
@@ -209,7 +209,7 @@ public Response updatePet(
209209
/* @GET
210210
@Path("/findByStatus")
211211
@Operation(summary = "Finds Pets by status",
212-
tags = {"pets"},
212+
tags = {"pet"},
213213
description = "Multiple status values can be provided with comma seperated strings",
214214
responses = {
215215
@ApiResponse(
@@ -237,7 +237,7 @@ public Response findPetsByStatus(
237237
@GET
238238
@Path("/findByTags")
239239
@Operation(summary = "Finds Pets by tags",
240-
tags = {"pets"},
240+
tags = {"pet"},
241241
description = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
242242
responses = {
243243
@ApiResponse(description = "Pets matching criteria",

src/main/webapp/code-first/openapi.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@
2929
"description" : "Find out more",
3030
"url" : "https://swagger.io"
3131
}
32-
}, {
33-
"name" : "store",
34-
"description" : "Access to Petstore orders",
35-
"externalDocs" : {
36-
"description" : "Find out more about our store",
37-
"url" : "https://swagger.io"
38-
}
39-
}, {
40-
"name" : "user",
41-
"description" : "Operations about user"
4232
} ],
4333
"paths" : {
4434
"/pet" : {

src/main/webapp/code-first/openapi.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ tags:
2525
externalDocs:
2626
description: Find out more
2727
url: https://swagger.io
28-
- name: store
29-
description: Access to Petstore orders
30-
externalDocs:
31-
description: Find out more about our store
32-
url: https://swagger.io
33-
- name: user
34-
description: Operations about user
3528
paths:
3629
/pet:
3730
put:

0 commit comments

Comments
 (0)