@@ -22,9 +22,17 @@ Add a new pet to the store
22
22
### Example
23
23
``` java
24
24
// Import classes:
25
+ // import io.swagger.client.ApiClient;
25
26
// import io.swagger.client.ApiException;
27
+ // import io.swagger.client.Configuration;
28
+ // import io.swagger.client.auth.*;
26
29
// import io.swagger.client.api.PetApi;
27
30
31
+ ApiClient defaultClient = Configuration . getDefaultApiClient();
32
+
33
+ // Configure OAuth2 access token for authorization: petstore_auth
34
+ OAuth petstore_auth = (OAuth ) defaultClient. getAuthentication(" petstore_auth" );
35
+ petstore_auth. setAccessToken(" YOUR ACCESS TOKEN" );
28
36
29
37
PetApi apiInstance = new PetApi ();
30
38
Pet body = new Pet (); // Pet | Pet object that needs to be added to the store
@@ -64,9 +72,17 @@ Deletes a pet
64
72
### Example
65
73
``` java
66
74
// Import classes:
75
+ // import io.swagger.client.ApiClient;
67
76
// import io.swagger.client.ApiException;
77
+ // import io.swagger.client.Configuration;
78
+ // import io.swagger.client.auth.*;
68
79
// import io.swagger.client.api.PetApi;
69
80
81
+ ApiClient defaultClient = Configuration . getDefaultApiClient();
82
+
83
+ // Configure OAuth2 access token for authorization: petstore_auth
84
+ OAuth petstore_auth = (OAuth ) defaultClient. getAuthentication(" petstore_auth" );
85
+ petstore_auth. setAccessToken(" YOUR ACCESS TOKEN" );
70
86
71
87
PetApi apiInstance = new PetApi ();
72
88
Integer petId = 56 ; // Integer | Pet id to delete
@@ -110,9 +126,17 @@ Multiple status values can be provided with comma separated strings
110
126
### Example
111
127
``` java
112
128
// Import classes:
129
+ // import io.swagger.client.ApiClient;
113
130
// import io.swagger.client.ApiException;
131
+ // import io.swagger.client.Configuration;
132
+ // import io.swagger.client.auth.*;
114
133
// import io.swagger.client.api.PetApi;
115
134
135
+ ApiClient defaultClient = Configuration . getDefaultApiClient();
136
+
137
+ // Configure OAuth2 access token for authorization: petstore_auth
138
+ OAuth petstore_auth = (OAuth ) defaultClient. getAuthentication(" petstore_auth" );
139
+ petstore_auth. setAccessToken(" YOUR ACCESS TOKEN" );
116
140
117
141
PetApi apiInstance = new PetApi ();
118
142
List<String > status = Arrays . asList(" status_example" ); // List<String> | Status values that need to be considered for filter
@@ -155,9 +179,17 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
155
179
### Example
156
180
``` java
157
181
// Import classes:
182
+ // import io.swagger.client.ApiClient;
158
183
// import io.swagger.client.ApiException;
184
+ // import io.swagger.client.Configuration;
185
+ // import io.swagger.client.auth.*;
159
186
// import io.swagger.client.api.PetApi;
160
187
188
+ ApiClient defaultClient = Configuration . getDefaultApiClient();
189
+
190
+ // Configure OAuth2 access token for authorization: petstore_auth
191
+ OAuth petstore_auth = (OAuth ) defaultClient. getAuthentication(" petstore_auth" );
192
+ petstore_auth. setAccessToken(" YOUR ACCESS TOKEN" );
161
193
162
194
PetApi apiInstance = new PetApi ();
163
195
List<String > tags = Arrays . asList(" tags_example" ); // List<String> | Tags to filter by
@@ -200,9 +232,19 @@ Returns a single pet
200
232
### Example
201
233
``` java
202
234
// Import classes:
235
+ // import io.swagger.client.ApiClient;
203
236
// import io.swagger.client.ApiException;
237
+ // import io.swagger.client.Configuration;
238
+ // import io.swagger.client.auth.*;
204
239
// import io.swagger.client.api.PetApi;
205
240
241
+ ApiClient defaultClient = Configuration . getDefaultApiClient();
242
+
243
+ // Configure API key authorization: api_key
244
+ ApiKeyAuth api_key = (ApiKeyAuth ) defaultClient. getAuthentication(" api_key" );
245
+ api_key. setApiKey(" YOUR API KEY" );
246
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
247
+ // api_key.setApiKeyPrefix("Token");
206
248
207
249
PetApi apiInstance = new PetApi ();
208
250
Integer petId = 56 ; // Integer | ID of pet to return
@@ -243,9 +285,17 @@ Update an existing pet
243
285
### Example
244
286
``` java
245
287
// Import classes:
288
+ // import io.swagger.client.ApiClient;
246
289
// import io.swagger.client.ApiException;
290
+ // import io.swagger.client.Configuration;
291
+ // import io.swagger.client.auth.*;
247
292
// import io.swagger.client.api.PetApi;
248
293
294
+ ApiClient defaultClient = Configuration . getDefaultApiClient();
295
+
296
+ // Configure OAuth2 access token for authorization: petstore_auth
297
+ OAuth petstore_auth = (OAuth ) defaultClient. getAuthentication(" petstore_auth" );
298
+ petstore_auth. setAccessToken(" YOUR ACCESS TOKEN" );
249
299
250
300
PetApi apiInstance = new PetApi ();
251
301
Pet body = new Pet (); // Pet | Pet object that needs to be added to the store
@@ -285,9 +335,17 @@ Updates a pet in the store with form data
285
335
### Example
286
336
``` java
287
337
// Import classes:
338
+ // import io.swagger.client.ApiClient;
288
339
// import io.swagger.client.ApiException;
340
+ // import io.swagger.client.Configuration;
341
+ // import io.swagger.client.auth.*;
289
342
// import io.swagger.client.api.PetApi;
290
343
344
+ ApiClient defaultClient = Configuration . getDefaultApiClient();
345
+
346
+ // Configure OAuth2 access token for authorization: petstore_auth
347
+ OAuth petstore_auth = (OAuth ) defaultClient. getAuthentication(" petstore_auth" );
348
+ petstore_auth. setAccessToken(" YOUR ACCESS TOKEN" );
291
349
292
350
PetApi apiInstance = new PetApi ();
293
351
Integer petId = 56 ; // Integer | ID of pet that needs to be updated
@@ -331,9 +389,17 @@ uploads an image
331
389
### Example
332
390
``` java
333
391
// Import classes:
392
+ // import io.swagger.client.ApiClient;
334
393
// import io.swagger.client.ApiException;
394
+ // import io.swagger.client.Configuration;
395
+ // import io.swagger.client.auth.*;
335
396
// import io.swagger.client.api.PetApi;
336
397
398
+ ApiClient defaultClient = Configuration . getDefaultApiClient();
399
+
400
+ // Configure OAuth2 access token for authorization: petstore_auth
401
+ OAuth petstore_auth = (OAuth ) defaultClient. getAuthentication(" petstore_auth" );
402
+ petstore_auth. setAccessToken(" YOUR ACCESS TOKEN" );
337
403
338
404
PetApi apiInstance = new PetApi ();
339
405
Integer petId = 56 ; // Integer | ID of pet to update
0 commit comments