26
26
27
27
28
28
@ io .swagger .annotations .Api (value = "/pet" , description = "the pet API" )
29
- @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JaxRSServerCodegen" , date = "2015-08-23T23:29:16.812-07 :00" )
29
+ @ javax .annotation .Generated (value = "class io.swagger.codegen.languages.JaxRSServerCodegen" , date = "2015-10-16T21:16:23.957-04 :00" )
30
30
public class PetApi {
31
31
32
32
private final PetApiService delegate = PetApiServiceFactory .getPetApi ();
@@ -35,106 +35,147 @@ public class PetApi {
35
35
36
36
@ Consumes ({ "application/json" , "application/xml" })
37
37
@ Produces ({ "application/json" , "application/xml" })
38
- @ io .swagger .annotations .ApiOperation (value = "Update an existing pet" , notes = "" , response = Void .class )
38
+ @ io .swagger .annotations .ApiOperation (value = "Update an existing pet" , notes = "" , response = Void .class , authorizations = {
39
+ @ io .swagger .annotations .Authorization (value = "petstore_auth" , scopes = {
40
+ @ io .swagger .annotations .AuthorizationScope (scope = "write:pets" , description = "modify pets in your account" ),
41
+ @ io .swagger .annotations .AuthorizationScope (scope = "read:pets" , description = "read your pets" )
42
+ })
43
+ })
39
44
@ io .swagger .annotations .ApiResponses (value = {
40
- @ io .swagger .annotations .ApiResponse (code = 405 , message = "Validation exception " , response = Void .class ),
45
+ @ io .swagger .annotations .ApiResponse (code = 400 , message = "Invalid ID supplied " , response = Void .class ),
41
46
42
47
@ io .swagger .annotations .ApiResponse (code = 404 , message = "Pet not found" , response = Void .class ),
43
48
44
- @ io .swagger .annotations .ApiResponse (code = 400 , message = "Invalid ID supplied " , response = Void .class ) })
49
+ @ io .swagger .annotations .ApiResponse (code = 405 , message = "Validation exception " , response = Void .class ) })
45
50
46
51
public Response updatePet (@ ApiParam (value = "Pet object that needs to be added to the store" ) Pet body )
47
52
throws NotFoundException {
48
- return delegate .updatePet (body );
53
+ return delegate .updatePet (body );
49
54
}
50
55
@ POST
51
56
52
57
@ Consumes ({ "application/json" , "application/xml" })
53
58
@ Produces ({ "application/json" , "application/xml" })
54
- @ io .swagger .annotations .ApiOperation (value = "Add a new pet to the store" , notes = "" , response = Void .class )
59
+ @ io .swagger .annotations .ApiOperation (value = "Add a new pet to the store" , notes = "" , response = Void .class , authorizations = {
60
+ @ io .swagger .annotations .Authorization (value = "petstore_auth" , scopes = {
61
+ @ io .swagger .annotations .AuthorizationScope (scope = "write:pets" , description = "modify pets in your account" ),
62
+ @ io .swagger .annotations .AuthorizationScope (scope = "read:pets" , description = "read your pets" )
63
+ })
64
+ })
55
65
@ io .swagger .annotations .ApiResponses (value = {
56
66
@ io .swagger .annotations .ApiResponse (code = 405 , message = "Invalid input" , response = Void .class ) })
57
67
58
68
public Response addPet (@ ApiParam (value = "Pet object that needs to be added to the store" ) Pet body )
59
69
throws NotFoundException {
60
- return delegate .addPet (body );
70
+ return delegate .addPet (body );
61
71
}
62
72
@ GET
63
73
@ Path ("/findByStatus" )
64
74
65
75
@ Produces ({ "application/json" , "application/xml" })
66
- @ io .swagger .annotations .ApiOperation (value = "Finds Pets by status" , notes = "Multiple status values can be provided with comma seperated strings" , response = Pet .class , responseContainer = "List" )
76
+ @ io .swagger .annotations .ApiOperation (value = "Finds Pets by status" , notes = "Multiple status values can be provided with comma seperated strings" , response = Pet .class , responseContainer = "List" , authorizations = {
77
+ @ io .swagger .annotations .Authorization (value = "petstore_auth" , scopes = {
78
+ @ io .swagger .annotations .AuthorizationScope (scope = "write:pets" , description = "modify pets in your account" ),
79
+ @ io .swagger .annotations .AuthorizationScope (scope = "read:pets" , description = "read your pets" )
80
+ })
81
+ })
67
82
@ io .swagger .annotations .ApiResponses (value = {
68
83
@ io .swagger .annotations .ApiResponse (code = 200 , message = "successful operation" , response = Pet .class , responseContainer = "List" ),
69
84
70
85
@ io .swagger .annotations .ApiResponse (code = 400 , message = "Invalid status value" , response = Pet .class , responseContainer = "List" ) })
71
86
72
87
public Response findPetsByStatus (@ ApiParam (value = "Status values that need to be considered for filter" , defaultValue ="available" ) @ QueryParam ("status" ) List <String > status )
73
88
throws NotFoundException {
74
- return delegate .findPetsByStatus (status );
89
+ return delegate .findPetsByStatus (status );
75
90
}
76
91
@ GET
77
92
@ Path ("/findByTags" )
78
93
79
94
@ Produces ({ "application/json" , "application/xml" })
80
- @ io .swagger .annotations .ApiOperation (value = "Finds Pets by tags" , notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing." , response = Pet .class , responseContainer = "List" )
95
+ @ io .swagger .annotations .ApiOperation (value = "Finds Pets by tags" , notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing." , response = Pet .class , responseContainer = "List" , authorizations = {
96
+ @ io .swagger .annotations .Authorization (value = "petstore_auth" , scopes = {
97
+ @ io .swagger .annotations .AuthorizationScope (scope = "write:pets" , description = "modify pets in your account" ),
98
+ @ io .swagger .annotations .AuthorizationScope (scope = "read:pets" , description = "read your pets" )
99
+ })
100
+ })
81
101
@ io .swagger .annotations .ApiResponses (value = {
82
102
@ io .swagger .annotations .ApiResponse (code = 200 , message = "successful operation" , response = Pet .class , responseContainer = "List" ),
83
103
84
104
@ io .swagger .annotations .ApiResponse (code = 400 , message = "Invalid tag value" , response = Pet .class , responseContainer = "List" ) })
85
105
86
106
public Response findPetsByTags (@ ApiParam (value = "Tags to filter by" ) @ QueryParam ("tags" ) List <String > tags )
87
107
throws NotFoundException {
88
- return delegate .findPetsByTags (tags );
108
+ return delegate .findPetsByTags (tags );
89
109
}
90
110
@ GET
91
111
@ Path ("/{petId}" )
92
112
93
113
@ Produces ({ "application/json" , "application/xml" })
94
- @ io .swagger .annotations .ApiOperation (value = "Find pet by ID" , notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions" , response = Pet .class )
114
+ @ io .swagger .annotations .ApiOperation (value = "Find pet by ID" , notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions" , response = Pet .class , authorizations = {
115
+ @ io .swagger .annotations .Authorization (value = "api_key" ),
116
+ @ io .swagger .annotations .Authorization (value = "petstore_auth" , scopes = {
117
+ @ io .swagger .annotations .AuthorizationScope (scope = "write:pets" , description = "modify pets in your account" ),
118
+ @ io .swagger .annotations .AuthorizationScope (scope = "read:pets" , description = "read your pets" )
119
+ })
120
+ })
95
121
@ io .swagger .annotations .ApiResponses (value = {
96
- @ io .swagger .annotations .ApiResponse (code = 404 , message = "Pet not found" , response = Pet .class ),
97
-
98
122
@ io .swagger .annotations .ApiResponse (code = 200 , message = "successful operation" , response = Pet .class ),
99
123
100
- @ io .swagger .annotations .ApiResponse (code = 400 , message = "Invalid ID supplied" , response = Pet .class ) })
124
+ @ io .swagger .annotations .ApiResponse (code = 400 , message = "Invalid ID supplied" , response = Pet .class ),
125
+
126
+ @ io .swagger .annotations .ApiResponse (code = 404 , message = "Pet not found" , response = Pet .class ) })
101
127
102
128
public Response getPetById (@ ApiParam (value = "ID of pet that needs to be fetched" ,required =true ) @ PathParam ("petId" ) Long petId )
103
129
throws NotFoundException {
104
- return delegate .getPetById (petId );
130
+ return delegate .getPetById (petId );
105
131
}
106
132
@ POST
107
133
@ Path ("/{petId}" )
108
134
@ Consumes ({ "application/x-www-form-urlencoded" })
109
135
@ Produces ({ "application/json" , "application/xml" })
110
- @ io .swagger .annotations .ApiOperation (value = "Updates a pet in the store with form data" , notes = "" , response = Void .class )
136
+ @ io .swagger .annotations .ApiOperation (value = "Updates a pet in the store with form data" , notes = "" , response = Void .class , authorizations = {
137
+ @ io .swagger .annotations .Authorization (value = "petstore_auth" , scopes = {
138
+ @ io .swagger .annotations .AuthorizationScope (scope = "write:pets" , description = "modify pets in your account" ),
139
+ @ io .swagger .annotations .AuthorizationScope (scope = "read:pets" , description = "read your pets" )
140
+ })
141
+ })
111
142
@ io .swagger .annotations .ApiResponses (value = {
112
143
@ io .swagger .annotations .ApiResponse (code = 405 , message = "Invalid input" , response = Void .class ) })
113
144
114
145
public Response updatePetWithForm (@ ApiParam (value = "ID of pet that needs to be updated" ,required =true ) @ PathParam ("petId" ) String petId ,
115
146
@ ApiParam (value = "Updated name of the pet" )@ FormParam ("name" ) String name ,
116
147
@ ApiParam (value = "Updated status of the pet" )@ FormParam ("status" ) String status )
117
148
throws NotFoundException {
118
- return delegate .updatePetWithForm (petId ,name ,status );
149
+ return delegate .updatePetWithForm (petId ,name ,status );
119
150
}
120
151
@ DELETE
121
152
@ Path ("/{petId}" )
122
153
123
154
@ Produces ({ "application/json" , "application/xml" })
124
- @ io .swagger .annotations .ApiOperation (value = "Deletes a pet" , notes = "" , response = Void .class )
155
+ @ io .swagger .annotations .ApiOperation (value = "Deletes a pet" , notes = "" , response = Void .class , authorizations = {
156
+ @ io .swagger .annotations .Authorization (value = "petstore_auth" , scopes = {
157
+ @ io .swagger .annotations .AuthorizationScope (scope = "write:pets" , description = "modify pets in your account" ),
158
+ @ io .swagger .annotations .AuthorizationScope (scope = "read:pets" , description = "read your pets" )
159
+ })
160
+ })
125
161
@ io .swagger .annotations .ApiResponses (value = {
126
162
@ io .swagger .annotations .ApiResponse (code = 400 , message = "Invalid pet value" , response = Void .class ) })
127
163
128
164
public Response deletePet (@ ApiParam (value = "Pet id to delete" ,required =true ) @ PathParam ("petId" ) Long petId ,
129
165
@ ApiParam (value = "" )@ HeaderParam ("api_key" ) String apiKey )
130
166
throws NotFoundException {
131
- return delegate .deletePet (petId ,apiKey );
167
+ return delegate .deletePet (petId ,apiKey );
132
168
}
133
169
@ POST
134
170
@ Path ("/{petId}/uploadImage" )
135
171
@ Consumes ({ "multipart/form-data" })
136
172
@ Produces ({ "application/json" , "application/xml" })
137
- @ io .swagger .annotations .ApiOperation (value = "uploads an image" , notes = "" , response = Void .class )
173
+ @ io .swagger .annotations .ApiOperation (value = "uploads an image" , notes = "" , response = Void .class , authorizations = {
174
+ @ io .swagger .annotations .Authorization (value = "petstore_auth" , scopes = {
175
+ @ io .swagger .annotations .AuthorizationScope (scope = "write:pets" , description = "modify pets in your account" ),
176
+ @ io .swagger .annotations .AuthorizationScope (scope = "read:pets" , description = "read your pets" )
177
+ })
178
+ })
138
179
@ io .swagger .annotations .ApiResponses (value = {
139
180
@ io .swagger .annotations .ApiResponse (code = 200 , message = "successful operation" , response = Void .class ) })
140
181
@@ -143,7 +184,7 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true
143
184
@ FormDataParam ("file" ) InputStream inputStream ,
144
185
@ FormDataParam ("file" ) FormDataContentDisposition fileDetail )
145
186
throws NotFoundException {
146
- return delegate .uploadFile (petId ,additionalMetadata ,fileDetail );
187
+ return delegate .uploadFile (petId ,additionalMetadata ,fileDetail );
147
188
}
148
189
}
149
190
0 commit comments