@redhat-ecosystem-engineering/petstore-client-test 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +29 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +156 -0
- package/dist/apis/PetApi.d.ts +354 -0
- package/dist/apis/PetApi.js +423 -0
- package/dist/apis/StoreApi.d.ts +181 -0
- package/dist/apis/StoreApi.js +193 -0
- package/dist/apis/UserApi.d.ts +293 -0
- package/dist/apis/UserApi.js +318 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +21 -0
- package/dist/esm/apis/PetApi.d.ts +354 -0
- package/dist/esm/apis/PetApi.js +419 -0
- package/dist/esm/apis/StoreApi.d.ts +181 -0
- package/dist/esm/apis/StoreApi.js +189 -0
- package/dist/esm/apis/UserApi.d.ts +293 -0
- package/dist/esm/apis/UserApi.js +314 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +5 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/Category.d.ts +38 -0
- package/dist/esm/models/Category.js +43 -0
- package/dist/esm/models/ModelApiResponse.d.ts +44 -0
- package/dist/esm/models/ModelApiResponse.js +45 -0
- package/dist/esm/models/Order.d.ts +71 -0
- package/dist/esm/models/Order.js +59 -0
- package/dist/esm/models/Pet.d.ts +73 -0
- package/dist/esm/models/Pet.js +65 -0
- package/dist/esm/models/Tag.d.ts +38 -0
- package/dist/esm/models/Tag.js +43 -0
- package/dist/esm/models/User.d.ts +74 -0
- package/dist/esm/models/User.js +55 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +334 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/Category.d.ts +38 -0
- package/dist/models/Category.js +50 -0
- package/dist/models/ModelApiResponse.d.ts +44 -0
- package/dist/models/ModelApiResponse.js +52 -0
- package/dist/models/Order.d.ts +71 -0
- package/dist/models/Order.js +67 -0
- package/dist/models/Pet.d.ts +73 -0
- package/dist/models/Pet.js +73 -0
- package/dist/models/Tag.d.ts +38 -0
- package/dist/models/Tag.js +50 -0
- package/dist/models/User.d.ts +74 -0
- package/dist/models/User.js +62 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +24 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +350 -0
- package/docs/Category.md +36 -0
- package/docs/ModelApiResponse.md +38 -0
- package/docs/Order.md +44 -0
- package/docs/Pet.md +44 -0
- package/docs/PetApi.md +622 -0
- package/docs/StoreApi.md +286 -0
- package/docs/Tag.md +36 -0
- package/docs/User.md +48 -0
- package/docs/UserApi.md +496 -0
- package/package.json +21 -0
- package/src/apis/PetApi.ts +739 -0
- package/src/apis/StoreApi.ts +323 -0
- package/src/apis/UserApi.ts +550 -0
- package/src/apis/index.ts +5 -0
- package/src/index.ts +5 -0
- package/src/models/Category.ts +73 -0
- package/src/models/ModelApiResponse.ts +81 -0
- package/src/models/Order.ts +117 -0
- package/src/models/Pet.ts +134 -0
- package/src/models/Tag.ts +73 -0
- package/src/models/User.ts +121 -0
- package/src/models/index.ts +8 -0
- package/src/runtime.ts +432 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
package/docs/UserApi.md
ADDED
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
# UserApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://petstore3.swagger.io/api/v3*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createUser**](UserApi.md#createuser) | **POST** /user | Create user. |
|
|
8
|
+
| [**createUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array. |
|
|
9
|
+
| [**deleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user resource. |
|
|
10
|
+
| [**getUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name. |
|
|
11
|
+
| [**loginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system. |
|
|
12
|
+
| [**logoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session. |
|
|
13
|
+
| [**updateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Update user resource. |
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## createUser
|
|
18
|
+
|
|
19
|
+
> User createUser(user)
|
|
20
|
+
|
|
21
|
+
Create user.
|
|
22
|
+
|
|
23
|
+
This can only be done by the logged in user.
|
|
24
|
+
|
|
25
|
+
### Example
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import {
|
|
29
|
+
Configuration,
|
|
30
|
+
UserApi,
|
|
31
|
+
} from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
32
|
+
import type { CreateUserRequest } from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
33
|
+
|
|
34
|
+
async function example() {
|
|
35
|
+
console.log("🚀 Testing @redhat-ecosystem-engineering/petstore-client-test SDK...");
|
|
36
|
+
const api = new UserApi();
|
|
37
|
+
|
|
38
|
+
const body = {
|
|
39
|
+
// User | Created user object (optional)
|
|
40
|
+
user: ...,
|
|
41
|
+
} satisfies CreateUserRequest;
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
const data = await api.createUser(body);
|
|
45
|
+
console.log(data);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error(error);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Run the test
|
|
52
|
+
example().catch(console.error);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Parameters
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
| Name | Type | Description | Notes |
|
|
59
|
+
|------------- | ------------- | ------------- | -------------|
|
|
60
|
+
| **user** | [User](User.md) | Created user object | [Optional] |
|
|
61
|
+
|
|
62
|
+
### Return type
|
|
63
|
+
|
|
64
|
+
[**User**](User.md)
|
|
65
|
+
|
|
66
|
+
### Authorization
|
|
67
|
+
|
|
68
|
+
No authorization required
|
|
69
|
+
|
|
70
|
+
### HTTP request headers
|
|
71
|
+
|
|
72
|
+
- **Content-Type**: `application/json`, `application/xml`, `application/x-www-form-urlencoded`
|
|
73
|
+
- **Accept**: `application/json`, `application/xml`
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### HTTP response details
|
|
77
|
+
| Status code | Description | Response headers |
|
|
78
|
+
|-------------|-------------|------------------|
|
|
79
|
+
| **200** | successful operation | - |
|
|
80
|
+
| **0** | Unexpected error | - |
|
|
81
|
+
|
|
82
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## createUsersWithListInput
|
|
86
|
+
|
|
87
|
+
> User createUsersWithListInput(user)
|
|
88
|
+
|
|
89
|
+
Creates list of users with given input array.
|
|
90
|
+
|
|
91
|
+
Creates list of users with given input array.
|
|
92
|
+
|
|
93
|
+
### Example
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import {
|
|
97
|
+
Configuration,
|
|
98
|
+
UserApi,
|
|
99
|
+
} from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
100
|
+
import type { CreateUsersWithListInputRequest } from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
101
|
+
|
|
102
|
+
async function example() {
|
|
103
|
+
console.log("🚀 Testing @redhat-ecosystem-engineering/petstore-client-test SDK...");
|
|
104
|
+
const api = new UserApi();
|
|
105
|
+
|
|
106
|
+
const body = {
|
|
107
|
+
// Array<User> (optional)
|
|
108
|
+
user: ...,
|
|
109
|
+
} satisfies CreateUsersWithListInputRequest;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
const data = await api.createUsersWithListInput(body);
|
|
113
|
+
console.log(data);
|
|
114
|
+
} catch (error) {
|
|
115
|
+
console.error(error);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Run the test
|
|
120
|
+
example().catch(console.error);
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Parameters
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
| Name | Type | Description | Notes |
|
|
127
|
+
|------------- | ------------- | ------------- | -------------|
|
|
128
|
+
| **user** | `Array<User>` | | [Optional] |
|
|
129
|
+
|
|
130
|
+
### Return type
|
|
131
|
+
|
|
132
|
+
[**User**](User.md)
|
|
133
|
+
|
|
134
|
+
### Authorization
|
|
135
|
+
|
|
136
|
+
No authorization required
|
|
137
|
+
|
|
138
|
+
### HTTP request headers
|
|
139
|
+
|
|
140
|
+
- **Content-Type**: `application/json`
|
|
141
|
+
- **Accept**: `application/json`, `application/xml`
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### HTTP response details
|
|
145
|
+
| Status code | Description | Response headers |
|
|
146
|
+
|-------------|-------------|------------------|
|
|
147
|
+
| **200** | Successful operation | - |
|
|
148
|
+
| **0** | Unexpected error | - |
|
|
149
|
+
|
|
150
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## deleteUser
|
|
154
|
+
|
|
155
|
+
> deleteUser(username)
|
|
156
|
+
|
|
157
|
+
Delete user resource.
|
|
158
|
+
|
|
159
|
+
This can only be done by the logged in user.
|
|
160
|
+
|
|
161
|
+
### Example
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
import {
|
|
165
|
+
Configuration,
|
|
166
|
+
UserApi,
|
|
167
|
+
} from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
168
|
+
import type { DeleteUserRequest } from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
169
|
+
|
|
170
|
+
async function example() {
|
|
171
|
+
console.log("🚀 Testing @redhat-ecosystem-engineering/petstore-client-test SDK...");
|
|
172
|
+
const api = new UserApi();
|
|
173
|
+
|
|
174
|
+
const body = {
|
|
175
|
+
// string | The name that needs to be deleted
|
|
176
|
+
username: username_example,
|
|
177
|
+
} satisfies DeleteUserRequest;
|
|
178
|
+
|
|
179
|
+
try {
|
|
180
|
+
const data = await api.deleteUser(body);
|
|
181
|
+
console.log(data);
|
|
182
|
+
} catch (error) {
|
|
183
|
+
console.error(error);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Run the test
|
|
188
|
+
example().catch(console.error);
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Parameters
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
| Name | Type | Description | Notes |
|
|
195
|
+
|------------- | ------------- | ------------- | -------------|
|
|
196
|
+
| **username** | `string` | The name that needs to be deleted | [Defaults to `undefined`] |
|
|
197
|
+
|
|
198
|
+
### Return type
|
|
199
|
+
|
|
200
|
+
`void` (Empty response body)
|
|
201
|
+
|
|
202
|
+
### Authorization
|
|
203
|
+
|
|
204
|
+
No authorization required
|
|
205
|
+
|
|
206
|
+
### HTTP request headers
|
|
207
|
+
|
|
208
|
+
- **Content-Type**: Not defined
|
|
209
|
+
- **Accept**: Not defined
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
### HTTP response details
|
|
213
|
+
| Status code | Description | Response headers |
|
|
214
|
+
|-------------|-------------|------------------|
|
|
215
|
+
| **200** | User deleted | - |
|
|
216
|
+
| **400** | Invalid username supplied | - |
|
|
217
|
+
| **404** | User not found | - |
|
|
218
|
+
| **0** | Unexpected error | - |
|
|
219
|
+
|
|
220
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
## getUserByName
|
|
224
|
+
|
|
225
|
+
> User getUserByName(username)
|
|
226
|
+
|
|
227
|
+
Get user by user name.
|
|
228
|
+
|
|
229
|
+
Get user detail based on username.
|
|
230
|
+
|
|
231
|
+
### Example
|
|
232
|
+
|
|
233
|
+
```ts
|
|
234
|
+
import {
|
|
235
|
+
Configuration,
|
|
236
|
+
UserApi,
|
|
237
|
+
} from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
238
|
+
import type { GetUserByNameRequest } from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
239
|
+
|
|
240
|
+
async function example() {
|
|
241
|
+
console.log("🚀 Testing @redhat-ecosystem-engineering/petstore-client-test SDK...");
|
|
242
|
+
const api = new UserApi();
|
|
243
|
+
|
|
244
|
+
const body = {
|
|
245
|
+
// string | The name that needs to be fetched. Use user1 for testing
|
|
246
|
+
username: username_example,
|
|
247
|
+
} satisfies GetUserByNameRequest;
|
|
248
|
+
|
|
249
|
+
try {
|
|
250
|
+
const data = await api.getUserByName(body);
|
|
251
|
+
console.log(data);
|
|
252
|
+
} catch (error) {
|
|
253
|
+
console.error(error);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Run the test
|
|
258
|
+
example().catch(console.error);
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Parameters
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
| Name | Type | Description | Notes |
|
|
265
|
+
|------------- | ------------- | ------------- | -------------|
|
|
266
|
+
| **username** | `string` | The name that needs to be fetched. Use user1 for testing | [Defaults to `undefined`] |
|
|
267
|
+
|
|
268
|
+
### Return type
|
|
269
|
+
|
|
270
|
+
[**User**](User.md)
|
|
271
|
+
|
|
272
|
+
### Authorization
|
|
273
|
+
|
|
274
|
+
No authorization required
|
|
275
|
+
|
|
276
|
+
### HTTP request headers
|
|
277
|
+
|
|
278
|
+
- **Content-Type**: Not defined
|
|
279
|
+
- **Accept**: `application/json`, `application/xml`
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
### HTTP response details
|
|
283
|
+
| Status code | Description | Response headers |
|
|
284
|
+
|-------------|-------------|------------------|
|
|
285
|
+
| **200** | successful operation | - |
|
|
286
|
+
| **400** | Invalid username supplied | - |
|
|
287
|
+
| **404** | User not found | - |
|
|
288
|
+
| **0** | Unexpected error | - |
|
|
289
|
+
|
|
290
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
## loginUser
|
|
294
|
+
|
|
295
|
+
> string loginUser(username, password)
|
|
296
|
+
|
|
297
|
+
Logs user into the system.
|
|
298
|
+
|
|
299
|
+
Log into the system.
|
|
300
|
+
|
|
301
|
+
### Example
|
|
302
|
+
|
|
303
|
+
```ts
|
|
304
|
+
import {
|
|
305
|
+
Configuration,
|
|
306
|
+
UserApi,
|
|
307
|
+
} from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
308
|
+
import type { LoginUserRequest } from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
309
|
+
|
|
310
|
+
async function example() {
|
|
311
|
+
console.log("🚀 Testing @redhat-ecosystem-engineering/petstore-client-test SDK...");
|
|
312
|
+
const api = new UserApi();
|
|
313
|
+
|
|
314
|
+
const body = {
|
|
315
|
+
// string | The user name for login (optional)
|
|
316
|
+
username: username_example,
|
|
317
|
+
// string | The password for login in clear text (optional)
|
|
318
|
+
password: password_example,
|
|
319
|
+
} satisfies LoginUserRequest;
|
|
320
|
+
|
|
321
|
+
try {
|
|
322
|
+
const data = await api.loginUser(body);
|
|
323
|
+
console.log(data);
|
|
324
|
+
} catch (error) {
|
|
325
|
+
console.error(error);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// Run the test
|
|
330
|
+
example().catch(console.error);
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Parameters
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
| Name | Type | Description | Notes |
|
|
337
|
+
|------------- | ------------- | ------------- | -------------|
|
|
338
|
+
| **username** | `string` | The user name for login | [Optional] [Defaults to `undefined`] |
|
|
339
|
+
| **password** | `string` | The password for login in clear text | [Optional] [Defaults to `undefined`] |
|
|
340
|
+
|
|
341
|
+
### Return type
|
|
342
|
+
|
|
343
|
+
**string**
|
|
344
|
+
|
|
345
|
+
### Authorization
|
|
346
|
+
|
|
347
|
+
No authorization required
|
|
348
|
+
|
|
349
|
+
### HTTP request headers
|
|
350
|
+
|
|
351
|
+
- **Content-Type**: Not defined
|
|
352
|
+
- **Accept**: `application/xml`, `application/json`
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
### HTTP response details
|
|
356
|
+
| Status code | Description | Response headers |
|
|
357
|
+
|-------------|-------------|------------------|
|
|
358
|
+
| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
|
|
359
|
+
| **400** | Invalid username/password supplied | - |
|
|
360
|
+
| **0** | Unexpected error | - |
|
|
361
|
+
|
|
362
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
## logoutUser
|
|
366
|
+
|
|
367
|
+
> logoutUser()
|
|
368
|
+
|
|
369
|
+
Logs out current logged in user session.
|
|
370
|
+
|
|
371
|
+
Log user out of the system.
|
|
372
|
+
|
|
373
|
+
### Example
|
|
374
|
+
|
|
375
|
+
```ts
|
|
376
|
+
import {
|
|
377
|
+
Configuration,
|
|
378
|
+
UserApi,
|
|
379
|
+
} from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
380
|
+
import type { LogoutUserRequest } from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
381
|
+
|
|
382
|
+
async function example() {
|
|
383
|
+
console.log("🚀 Testing @redhat-ecosystem-engineering/petstore-client-test SDK...");
|
|
384
|
+
const api = new UserApi();
|
|
385
|
+
|
|
386
|
+
try {
|
|
387
|
+
const data = await api.logoutUser();
|
|
388
|
+
console.log(data);
|
|
389
|
+
} catch (error) {
|
|
390
|
+
console.error(error);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// Run the test
|
|
395
|
+
example().catch(console.error);
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Parameters
|
|
399
|
+
|
|
400
|
+
This endpoint does not need any parameter.
|
|
401
|
+
|
|
402
|
+
### Return type
|
|
403
|
+
|
|
404
|
+
`void` (Empty response body)
|
|
405
|
+
|
|
406
|
+
### Authorization
|
|
407
|
+
|
|
408
|
+
No authorization required
|
|
409
|
+
|
|
410
|
+
### HTTP request headers
|
|
411
|
+
|
|
412
|
+
- **Content-Type**: Not defined
|
|
413
|
+
- **Accept**: Not defined
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
### HTTP response details
|
|
417
|
+
| Status code | Description | Response headers |
|
|
418
|
+
|-------------|-------------|------------------|
|
|
419
|
+
| **200** | successful operation | - |
|
|
420
|
+
| **0** | Unexpected error | - |
|
|
421
|
+
|
|
422
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
## updateUser
|
|
426
|
+
|
|
427
|
+
> updateUser(username, user)
|
|
428
|
+
|
|
429
|
+
Update user resource.
|
|
430
|
+
|
|
431
|
+
This can only be done by the logged in user.
|
|
432
|
+
|
|
433
|
+
### Example
|
|
434
|
+
|
|
435
|
+
```ts
|
|
436
|
+
import {
|
|
437
|
+
Configuration,
|
|
438
|
+
UserApi,
|
|
439
|
+
} from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
440
|
+
import type { UpdateUserRequest } from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
441
|
+
|
|
442
|
+
async function example() {
|
|
443
|
+
console.log("🚀 Testing @redhat-ecosystem-engineering/petstore-client-test SDK...");
|
|
444
|
+
const api = new UserApi();
|
|
445
|
+
|
|
446
|
+
const body = {
|
|
447
|
+
// string | name that need to be deleted
|
|
448
|
+
username: username_example,
|
|
449
|
+
// User | Update an existent user in the store (optional)
|
|
450
|
+
user: ...,
|
|
451
|
+
} satisfies UpdateUserRequest;
|
|
452
|
+
|
|
453
|
+
try {
|
|
454
|
+
const data = await api.updateUser(body);
|
|
455
|
+
console.log(data);
|
|
456
|
+
} catch (error) {
|
|
457
|
+
console.error(error);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Run the test
|
|
462
|
+
example().catch(console.error);
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
### Parameters
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
| Name | Type | Description | Notes |
|
|
469
|
+
|------------- | ------------- | ------------- | -------------|
|
|
470
|
+
| **username** | `string` | name that need to be deleted | [Defaults to `undefined`] |
|
|
471
|
+
| **user** | [User](User.md) | Update an existent user in the store | [Optional] |
|
|
472
|
+
|
|
473
|
+
### Return type
|
|
474
|
+
|
|
475
|
+
`void` (Empty response body)
|
|
476
|
+
|
|
477
|
+
### Authorization
|
|
478
|
+
|
|
479
|
+
No authorization required
|
|
480
|
+
|
|
481
|
+
### HTTP request headers
|
|
482
|
+
|
|
483
|
+
- **Content-Type**: `application/json`, `application/xml`, `application/x-www-form-urlencoded`
|
|
484
|
+
- **Accept**: Not defined
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
### HTTP response details
|
|
488
|
+
| Status code | Description | Response headers |
|
|
489
|
+
|-------------|-------------|------------------|
|
|
490
|
+
| **200** | successful operation | - |
|
|
491
|
+
| **400** | bad request | - |
|
|
492
|
+
| **404** | user not found | - |
|
|
493
|
+
| **0** | Unexpected error | - |
|
|
494
|
+
|
|
495
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
496
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@redhat-ecosystem-engineering/petstore-client-test",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "OpenAPI client for @redhat-ecosystem-engineering/petstore-client-test",
|
|
5
|
+
"author": "OpenAPI-Generator",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"module": "./dist/esm/index.js",
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc && tsc -p tsconfig.esm.json",
|
|
16
|
+
"prepare": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^4.0 || ^5.0"
|
|
20
|
+
}
|
|
21
|
+
}
|