@@ -46,7 +46,9 @@ public class PetApi {
46
46
47
47
@ Consumes ({ "application/json" , "application/xml" })
48
48
49
- @ Operation (summary = "Add a new pet to the store" , description = "" , tags ={ "pet" })
49
+ @ Operation (summary = "Add a new pet to the store" , description = "" , security = {
50
+ @ SecurityRequirement (name = "petstore_auth" , scopes = {
51
+ "" }) }, tags ={ "pet" })
50
52
@ ApiResponses (value = {
51
53
@ ApiResponse (responseCode = "405" , description = "Invalid input" ) })
52
54
public Response addPet (
@@ -59,7 +61,9 @@ public Response addPet(
59
61
@ Path ("/{petId}" )
60
62
61
63
62
- @ Operation (summary = "Deletes a pet" , description = "" , tags ={ "pet" })
64
+ @ Operation (summary = "Deletes a pet" , description = "" , security = {
65
+ @ SecurityRequirement (name = "petstore_auth" , scopes = {
66
+ "" }) }, tags ={ "pet" })
63
67
@ ApiResponses (value = {
64
68
@ ApiResponse (responseCode = "400" , description = "Invalid pet value" ) })
65
69
public Response deletePet (
@@ -74,7 +78,9 @@ public Response deletePet(
74
78
@ Path ("/findByStatus" )
75
79
76
80
@ Produces ({ "application/xml" , "application/json" })
77
- @ Operation (summary = "Finds Pets by status" , description = "Multiple status values can be provided with comma separated strings" , tags ={ "pet" })
81
+ @ Operation (summary = "Finds Pets by status" , description = "Multiple status values can be provided with comma separated strings" , security = {
82
+ @ SecurityRequirement (name = "petstore_auth" , scopes = {
83
+ "" }) }, tags ={ "pet" })
78
84
@ ApiResponses (value = {
79
85
@ ApiResponse (responseCode = "200" , description = "successful operation" , content = @ Content (array = @ ArraySchema (schema = @ Schema (implementation = Pet .class )))),
80
86
@ ApiResponse (responseCode = "400" , description = "Invalid status value" ) })
@@ -89,7 +95,9 @@ public Response findPetsByStatus( @NotNull
89
95
@ Path ("/findByTags" )
90
96
91
97
@ Produces ({ "application/xml" , "application/json" })
92
- @ Operation (summary = "Finds Pets by tags" , description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." , tags ={ "pet" })
98
+ @ Operation (summary = "Finds Pets by tags" , description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." , security = {
99
+ @ SecurityRequirement (name = "petstore_auth" , scopes = {
100
+ "" }) }, tags ={ "pet" })
93
101
@ ApiResponses (value = {
94
102
@ ApiResponse (responseCode = "200" , description = "successful operation" , content = @ Content (array = @ ArraySchema (schema = @ Schema (implementation = Pet .class )))),
95
103
@ ApiResponse (responseCode = "400" , description = "Invalid tag value" ) })
@@ -103,7 +111,8 @@ public Response findPetsByTags( @NotNull
103
111
@ Path ("/{petId}" )
104
112
105
113
@ Produces ({ "application/xml" , "application/json" })
106
- @ Operation (summary = "Find pet by ID" , description = "Returns a single pet" , tags ={ "pet" })
114
+ @ Operation (summary = "Find pet by ID" , description = "Returns a single pet" , security = {
115
+ @ SecurityRequirement (name = "api_key" ) }, tags ={ "pet" })
107
116
@ ApiResponses (value = {
108
117
@ ApiResponse (responseCode = "200" , description = "successful operation" , content = @ Content (schema = @ Schema (implementation = Pet .class ))),
109
118
@ ApiResponse (responseCode = "400" , description = "Invalid ID supplied" ),
@@ -118,7 +127,9 @@ public Response getPetById(
118
127
119
128
@ Consumes ({ "application/json" , "application/xml" })
120
129
121
- @ Operation (summary = "Update an existing pet" , description = "" , tags ={ "pet" })
130
+ @ Operation (summary = "Update an existing pet" , description = "" , security = {
131
+ @ SecurityRequirement (name = "petstore_auth" , scopes = {
132
+ "" }) }, tags ={ "pet" })
122
133
@ ApiResponses (value = {
123
134
@ ApiResponse (responseCode = "400" , description = "Invalid ID supplied" ),
124
135
@ ApiResponse (responseCode = "404" , description = "Pet not found" ),
@@ -133,7 +144,9 @@ public Response updatePet(
133
144
@ Path ("/{petId}" )
134
145
@ Consumes ({ "application/x-www-form-urlencoded" })
135
146
136
- @ Operation (summary = "Updates a pet in the store with form data" , description = "" , tags ={ "pet" })
147
+ @ Operation (summary = "Updates a pet in the store with form data" , description = "" , security = {
148
+ @ SecurityRequirement (name = "petstore_auth" , scopes = {
149
+ "" }) }, tags ={ "pet" })
137
150
@ ApiResponses (value = {
138
151
@ ApiResponse (responseCode = "405" , description = "Invalid input" ) })
139
152
public Response updatePetWithForm (
@@ -146,7 +159,9 @@ public Response updatePetWithForm(
146
159
@ Path ("/{petId}/uploadImage" )
147
160
@ Consumes ({ "multipart/form-data" })
148
161
@ Produces ({ "application/json" })
149
- @ Operation (summary = "uploads an image" , description = "" , tags ={ "pet" })
162
+ @ Operation (summary = "uploads an image" , description = "" , security = {
163
+ @ SecurityRequirement (name = "petstore_auth" , scopes = {
164
+ "" }) }, tags ={ "pet" })
150
165
@ ApiResponses (value = {
151
166
@ ApiResponse (responseCode = "200" , description = "successful operation" , content = @ Content (schema = @ Schema (implementation = ModelApiResponse .class ))) })
152
167
public Response uploadFile (
0 commit comments