api-render-ui 1.1.1 β†’ 1.1.2

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.
@@ -12,353 +12,1236 @@
12
12
  <script type="module">
13
13
  import { ApiRenderer } from "../dist/index.js"
14
14
  const openapiSpec = {
15
- "openapi": "3.1.0",
16
- "info": {
17
- "title": "ChimichangApp",
18
- "summary": "Deadpool's favorite app. Nuff said.",
19
- "description": "\nChimichangApp API helps you do awesome stuff. πŸš€\n\n## Items\n\nYou can **read items**.\n\n## Users\n\nYou will be able to:\n\n* **Create users** (_not implemented_).\n* **Read users** (_not implemented_).\n",
20
- "termsOfService": "http://example.com/terms/",
21
- "contact": {
22
- "name": "Deadpoolio the Amazing",
23
- "url": "http://x-force.example.com/contact/",
24
- "email": "dp@x-force.example.com"
15
+ "openapi": "3.0.3",
16
+ "info": {
17
+ "title": "Swagger Petstore - OpenAPI 3.0",
18
+ "description": "This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\n_If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)",
19
+ "termsOfService": "http://swagger.io/terms/",
20
+ "contact": {
21
+ "email": "apiteam@swagger.io"
22
+ },
23
+ "license": {
24
+ "name": "Apache 2.0",
25
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
26
+ },
27
+ "version": "1.0.11"
25
28
  },
26
- "license": {
27
- "name": "Apache 2.0",
28
- "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
29
+ "externalDocs": {
30
+ "description": "Find out more about Swagger",
31
+ "url": "http://swagger.io"
29
32
  },
30
- "version": "0.0.1"
31
- },
32
- "paths": {
33
- "/items/": {
34
- "get": {
35
- "summary": "Read Items",
36
- "operationId": "read_items_items__get",
37
- "responses": {
38
- "200": {
39
- "description": "Successful Response",
33
+ "servers": [
34
+ {
35
+ "url": "https://petstore3.swagger.io/api/v3"
36
+ }
37
+ ],
38
+ "tags": [
39
+ {
40
+ "name": "pet",
41
+ "description": "Everything about your Pets",
42
+ "externalDocs": {
43
+ "description": "Find out more",
44
+ "url": "http://swagger.io"
45
+ }
46
+ },
47
+ {
48
+ "name": "store",
49
+ "description": "Access to Petstore orders",
50
+ "externalDocs": {
51
+ "description": "Find out more about our store",
52
+ "url": "http://swagger.io"
53
+ }
54
+ },
55
+ {
56
+ "name": "user",
57
+ "description": "Operations about user"
58
+ }
59
+ ],
60
+ "paths": {
61
+ "/pet": {
62
+ "put": {
63
+ "tags": [
64
+ "pet"
65
+ ],
66
+ "summary": "Update an existing pet",
67
+ "description": "Update an existing pet by Id",
68
+ "operationId": "updatePet",
69
+ "requestBody": {
70
+ "description": "Update an existent pet in the store",
40
71
  "content": {
41
72
  "application/json": {
42
- "schema": {}
73
+ "schema": {
74
+ "$ref": "#/components/schemas/Pet"
75
+ }
76
+ },
77
+ "application/xml": {
78
+ "schema": {
79
+ "$ref": "#/components/schemas/Pet"
80
+ }
81
+ },
82
+ "application/x-www-form-urlencoded": {
83
+ "schema": {
84
+ "$ref": "#/components/schemas/Pet"
85
+ }
43
86
  }
44
- }
45
- }
46
- }
47
- },
48
- "post": {
49
- "summary": "Create Item",
50
- "operationId": "create_item_items__post",
51
- "requestBody": {
52
- "content": {
53
- "application/json": {
54
- "schema": {
55
- "$ref": "#/components/schemas/Item"
87
+ },
88
+ "required": true
89
+ },
90
+ "responses": {
91
+ "200": {
92
+ "description": "Successful operation",
93
+ "content": {
94
+ "application/json": {
95
+ "schema": {
96
+ "$ref": "#/components/schemas/Pet"
97
+ }
98
+ },
99
+ "application/xml": {
100
+ "schema": {
101
+ "$ref": "#/components/schemas/Pet"
102
+ }
103
+ }
56
104
  }
105
+ },
106
+ "400": {
107
+ "description": "Invalid ID supplied"
108
+ },
109
+ "404": {
110
+ "description": "Pet not found"
111
+ },
112
+ "422": {
113
+ "description": "Validation exception"
57
114
  }
58
115
  },
59
- "required": true
116
+ "security": [
117
+ {
118
+ "petstore_auth": [
119
+ "write:pets",
120
+ "read:pets"
121
+ ]
122
+ }
123
+ ]
60
124
  },
61
- "responses": {
62
- "200": {
63
- "description": "Successful Response",
125
+ "post": {
126
+ "tags": [
127
+ "pet"
128
+ ],
129
+ "summary": "Add a new pet to the store",
130
+ "description": "Add a new pet to the store",
131
+ "operationId": "addPet",
132
+ "requestBody": {
133
+ "description": "Create a new pet in the store",
64
134
  "content": {
65
135
  "application/json": {
66
- "schema": {}
136
+ "schema": {
137
+ "$ref": "#/components/schemas/Pet"
138
+ }
139
+ },
140
+ "application/xml": {
141
+ "schema": {
142
+ "$ref": "#/components/schemas/Pet"
143
+ }
144
+ },
145
+ "application/x-www-form-urlencoded": {
146
+ "schema": {
147
+ "$ref": "#/components/schemas/Pet"
148
+ }
149
+ }
150
+ },
151
+ "required": true
152
+ },
153
+ "responses": {
154
+ "200": {
155
+ "description": "Successful operation",
156
+ "content": {
157
+ "application/json": {
158
+ "schema": {
159
+ "$ref": "#/components/schemas/Pet"
160
+ }
161
+ },
162
+ "application/xml": {
163
+ "schema": {
164
+ "$ref": "#/components/schemas/Pet"
165
+ }
166
+ }
167
+ }
168
+ },
169
+ "400": {
170
+ "description": "Invalid input"
171
+ },
172
+ "422": {
173
+ "description": "Validation exception"
174
+ }
175
+ },
176
+ "security": [
177
+ {
178
+ "petstore_auth": [
179
+ "write:pets",
180
+ "read:pets"
181
+ ]
182
+ }
183
+ ]
184
+ }
185
+ },
186
+ "/pet/findByStatus": {
187
+ "get": {
188
+ "tags": [
189
+ "pet"
190
+ ],
191
+ "summary": "Finds Pets by status",
192
+ "description": "Multiple status values can be provided with comma separated strings",
193
+ "operationId": "findPetsByStatus",
194
+ "parameters": [
195
+ {
196
+ "name": "status",
197
+ "in": "query",
198
+ "description": "Status values that need to be considered for filter",
199
+ "required": false,
200
+ "explode": true,
201
+ "schema": {
202
+ "type": "string",
203
+ "default": "available",
204
+ "enum": [
205
+ "available",
206
+ "pending",
207
+ "sold"
208
+ ]
67
209
  }
68
210
  }
211
+ ],
212
+ "responses": {
213
+ "200": {
214
+ "description": "successful operation",
215
+ "content": {
216
+ "application/json": {
217
+ "schema": {
218
+ "type": "array",
219
+ "items": {
220
+ "$ref": "#/components/schemas/Pet"
221
+ }
222
+ }
223
+ },
224
+ "application/xml": {
225
+ "schema": {
226
+ "type": "array",
227
+ "items": {
228
+ "$ref": "#/components/schemas/Pet"
229
+ }
230
+ }
231
+ }
232
+ }
233
+ },
234
+ "400": {
235
+ "description": "Invalid status value"
236
+ }
69
237
  },
70
- "422": {
71
- "description": "Validation Error",
72
- "content": {
73
- "application/json": {
74
- "schema": {
75
- "$ref": "#/components/schemas/HTTPValidationError"
238
+ "security": [
239
+ {
240
+ "petstore_auth": [
241
+ "write:pets",
242
+ "read:pets"
243
+ ]
244
+ }
245
+ ]
246
+ }
247
+ },
248
+ "/pet/findByTags": {
249
+ "get": {
250
+ "tags": [
251
+ "pet"
252
+ ],
253
+ "summary": "Finds Pets by tags",
254
+ "description": "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
255
+ "operationId": "findPetsByTags",
256
+ "parameters": [
257
+ {
258
+ "name": "tags",
259
+ "in": "query",
260
+ "description": "Tags to filter by",
261
+ "required": false,
262
+ "explode": true,
263
+ "schema": {
264
+ "type": "array",
265
+ "items": {
266
+ "type": "string"
76
267
  }
77
268
  }
78
269
  }
79
- }
270
+ ],
271
+ "responses": {
272
+ "200": {
273
+ "description": "successful operation",
274
+ "content": {
275
+ "application/json": {
276
+ "schema": {
277
+ "type": "array",
278
+ "items": {
279
+ "$ref": "#/components/schemas/Pet"
280
+ }
281
+ }
282
+ },
283
+ "application/xml": {
284
+ "schema": {
285
+ "type": "array",
286
+ "items": {
287
+ "$ref": "#/components/schemas/Pet"
288
+ }
289
+ }
290
+ }
291
+ }
292
+ },
293
+ "400": {
294
+ "description": "Invalid tag value"
295
+ }
296
+ },
297
+ "security": [
298
+ {
299
+ "petstore_auth": [
300
+ "write:pets",
301
+ "read:pets"
302
+ ]
303
+ }
304
+ ]
80
305
  }
81
- }
82
- },
83
- "/items/{item_id}": {
84
- "get": {
85
- "summary": "Read Root",
86
- "operationId": "read_root_items__item_id__get",
87
- "parameters": [
88
- {
89
- "name": "item_id",
90
- "in": "path",
91
- "required": true,
92
- "schema": {
93
- "type": "string",
94
- "title": "Item Id"
306
+ },
307
+ "/pet/{petId}": {
308
+ "get": {
309
+ "tags": [
310
+ "pet"
311
+ ],
312
+ "summary": "Find pet by ID",
313
+ "description": "Returns a single pet",
314
+ "operationId": "getPetById",
315
+ "parameters": [
316
+ {
317
+ "name": "petId",
318
+ "in": "path",
319
+ "description": "ID of pet to return",
320
+ "required": true,
321
+ "schema": {
322
+ "type": "integer",
323
+ "format": "int64"
324
+ }
95
325
  }
96
- }
97
- ],
98
- "responses": {
99
- "200": {
100
- "description": "Successful Response",
101
- "content": {
102
- "application/json": {
103
- "schema": {}
326
+ ],
327
+ "responses": {
328
+ "200": {
329
+ "description": "successful operation",
330
+ "content": {
331
+ "application/json": {
332
+ "schema": {
333
+ "$ref": "#/components/schemas/Pet"
334
+ }
335
+ },
336
+ "application/xml": {
337
+ "schema": {
338
+ "$ref": "#/components/schemas/Pet"
339
+ }
340
+ }
104
341
  }
342
+ },
343
+ "400": {
344
+ "description": "Invalid ID supplied"
345
+ },
346
+ "404": {
347
+ "description": "Pet not found"
105
348
  }
106
349
  },
107
- "422": {
108
- "description": "Validation Error",
350
+ "security": [
351
+ {
352
+ "api_key": []
353
+ },
354
+ {
355
+ "petstore_auth": [
356
+ "write:pets",
357
+ "read:pets"
358
+ ]
359
+ }
360
+ ]
361
+ },
362
+ "post": {
363
+ "tags": [
364
+ "pet"
365
+ ],
366
+ "summary": "Updates a pet in the store with form data",
367
+ "description": "",
368
+ "operationId": "updatePetWithForm",
369
+ "parameters": [
370
+ {
371
+ "name": "petId",
372
+ "in": "path",
373
+ "description": "ID of pet that needs to be updated",
374
+ "required": true,
375
+ "schema": {
376
+ "type": "integer",
377
+ "format": "int64"
378
+ }
379
+ },
380
+ {
381
+ "name": "name",
382
+ "in": "query",
383
+ "description": "Name of pet that needs to be updated",
384
+ "schema": {
385
+ "type": "string"
386
+ }
387
+ },
388
+ {
389
+ "name": "status",
390
+ "in": "query",
391
+ "description": "Status of pet that needs to be updated",
392
+ "schema": {
393
+ "type": "string"
394
+ }
395
+ }
396
+ ],
397
+ "responses": {
398
+ "400": {
399
+ "description": "Invalid input"
400
+ }
401
+ },
402
+ "security": [
403
+ {
404
+ "petstore_auth": [
405
+ "write:pets",
406
+ "read:pets"
407
+ ]
408
+ }
409
+ ]
410
+ },
411
+ "delete": {
412
+ "tags": [
413
+ "pet"
414
+ ],
415
+ "summary": "Deletes a pet",
416
+ "description": "delete a pet",
417
+ "operationId": "deletePet",
418
+ "parameters": [
419
+ {
420
+ "name": "api_key",
421
+ "in": "header",
422
+ "description": "",
423
+ "required": false,
424
+ "schema": {
425
+ "type": "string"
426
+ }
427
+ },
428
+ {
429
+ "name": "petId",
430
+ "in": "path",
431
+ "description": "Pet id to delete",
432
+ "required": true,
433
+ "schema": {
434
+ "type": "integer",
435
+ "format": "int64"
436
+ }
437
+ }
438
+ ],
439
+ "responses": {
440
+ "400": {
441
+ "description": "Invalid pet value"
442
+ }
443
+ },
444
+ "security": [
445
+ {
446
+ "petstore_auth": [
447
+ "write:pets",
448
+ "read:pets"
449
+ ]
450
+ }
451
+ ]
452
+ }
453
+ },
454
+ "/pet/{petId}/uploadImage": {
455
+ "post": {
456
+ "tags": [
457
+ "pet"
458
+ ],
459
+ "summary": "uploads an image",
460
+ "description": "",
461
+ "operationId": "uploadFile",
462
+ "parameters": [
463
+ {
464
+ "name": "petId",
465
+ "in": "path",
466
+ "description": "ID of pet to update",
467
+ "required": true,
468
+ "schema": {
469
+ "type": "integer",
470
+ "format": "int64"
471
+ }
472
+ },
473
+ {
474
+ "name": "additionalMetadata",
475
+ "in": "query",
476
+ "description": "Additional Metadata",
477
+ "required": false,
478
+ "schema": {
479
+ "type": "string"
480
+ }
481
+ }
482
+ ],
483
+ "requestBody": {
109
484
  "content": {
110
- "application/json": {
485
+ "application/octet-stream": {
111
486
  "schema": {
112
- "$ref": "#/components/schemas/HTTPValidationError"
487
+ "type": "string",
488
+ "format": "binary"
113
489
  }
114
490
  }
115
491
  }
116
- }
492
+ },
493
+ "responses": {
494
+ "200": {
495
+ "description": "successful operation",
496
+ "content": {
497
+ "application/json": {
498
+ "schema": {
499
+ "$ref": "#/components/schemas/ApiResponse"
500
+ }
501
+ }
502
+ }
503
+ }
504
+ },
505
+ "security": [
506
+ {
507
+ "petstore_auth": [
508
+ "write:pets",
509
+ "read:pets"
510
+ ]
511
+ }
512
+ ]
117
513
  }
118
- }
119
- },
120
- "/": {
121
- "get": {
122
- "summary": "Root",
123
- "operationId": "root__get",
124
- "responses": {
125
- "200": {
126
- "description": "Successful Response",
127
- "content": {
128
- "application/json": {
129
- "schema": {}
514
+ },
515
+ "/store/inventory": {
516
+ "get": {
517
+ "tags": [
518
+ "store"
519
+ ],
520
+ "summary": "Returns pet inventories by status",
521
+ "description": "Returns a map of status codes to quantities",
522
+ "operationId": "getInventory",
523
+ "responses": {
524
+ "200": {
525
+ "description": "successful operation",
526
+ "content": {
527
+ "application/json": {
528
+ "schema": {
529
+ "type": "object",
530
+ "additionalProperties": {
531
+ "type": "integer",
532
+ "format": "int32"
533
+ }
534
+ }
535
+ }
130
536
  }
131
537
  }
132
- }
538
+ },
539
+ "security": [
540
+ {
541
+ "api_key": []
542
+ }
543
+ ]
133
544
  }
134
- }
135
- },
136
- "/legacy/": {
137
- "get": {
138
- "summary": "Get Legacy Data",
139
- "operationId": "get_legacy_data_legacy__get",
140
- "responses": {
141
- "200": {
142
- "description": "Successful Response",
545
+ },
546
+ "/store/order": {
547
+ "post": {
548
+ "tags": [
549
+ "store"
550
+ ],
551
+ "summary": "Place an order for a pet",
552
+ "description": "Place a new order in the store",
553
+ "operationId": "placeOrder",
554
+ "requestBody": {
143
555
  "content": {
144
556
  "application/json": {
145
- "schema": {}
557
+ "schema": {
558
+ "$ref": "#/components/schemas/Order"
559
+ }
560
+ },
561
+ "application/xml": {
562
+ "schema": {
563
+ "$ref": "#/components/schemas/Order"
564
+ }
565
+ },
566
+ "application/x-www-form-urlencoded": {
567
+ "schema": {
568
+ "$ref": "#/components/schemas/Order"
569
+ }
146
570
  }
147
571
  }
572
+ },
573
+ "responses": {
574
+ "200": {
575
+ "description": "successful operation",
576
+ "content": {
577
+ "application/json": {
578
+ "schema": {
579
+ "$ref": "#/components/schemas/Order"
580
+ }
581
+ }
582
+ }
583
+ },
584
+ "400": {
585
+ "description": "Invalid input"
586
+ },
587
+ "422": {
588
+ "description": "Validation exception"
589
+ }
148
590
  }
149
591
  }
150
- }
151
- },
152
- "/login/": {
153
- "post": {
154
- "summary": "Login",
155
- "description": "倄理 application/x-www-form-urlencoded ηš„ POST 请求",
156
- "operationId": "login_login__post",
157
- "requestBody": {
158
- "content": {
159
- "application/x-www-form-urlencoded": {
592
+ },
593
+ "/store/order/{orderId}": {
594
+ "get": {
595
+ "tags": [
596
+ "store"
597
+ ],
598
+ "summary": "Find purchase order by ID",
599
+ "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.",
600
+ "operationId": "getOrderById",
601
+ "parameters": [
602
+ {
603
+ "name": "orderId",
604
+ "in": "path",
605
+ "description": "ID of order that needs to be fetched",
606
+ "required": true,
160
607
  "schema": {
161
- "$ref": "#/components/schemas/Body_login_login__post"
608
+ "type": "integer",
609
+ "format": "int64"
162
610
  }
163
611
  }
164
- },
165
- "required": true
612
+ ],
613
+ "responses": {
614
+ "200": {
615
+ "description": "successful operation",
616
+ "content": {
617
+ "application/json": {
618
+ "schema": {
619
+ "$ref": "#/components/schemas/Order"
620
+ }
621
+ },
622
+ "application/xml": {
623
+ "schema": {
624
+ "$ref": "#/components/schemas/Order"
625
+ }
626
+ }
627
+ }
628
+ },
629
+ "400": {
630
+ "description": "Invalid ID supplied"
631
+ },
632
+ "404": {
633
+ "description": "Order not found"
634
+ }
635
+ }
166
636
  },
167
- "responses": {
168
- "200": {
169
- "description": "Successful Response",
637
+ "delete": {
638
+ "tags": [
639
+ "store"
640
+ ],
641
+ "summary": "Delete purchase order by ID",
642
+ "description": "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
643
+ "operationId": "deleteOrder",
644
+ "parameters": [
645
+ {
646
+ "name": "orderId",
647
+ "in": "path",
648
+ "description": "ID of the order that needs to be deleted",
649
+ "required": true,
650
+ "schema": {
651
+ "type": "integer",
652
+ "format": "int64"
653
+ }
654
+ }
655
+ ],
656
+ "responses": {
657
+ "400": {
658
+ "description": "Invalid ID supplied"
659
+ },
660
+ "404": {
661
+ "description": "Order not found"
662
+ }
663
+ }
664
+ }
665
+ },
666
+ "/user": {
667
+ "post": {
668
+ "tags": [
669
+ "user"
670
+ ],
671
+ "summary": "Create user",
672
+ "description": "This can only be done by the logged in user.",
673
+ "operationId": "createUser",
674
+ "requestBody": {
675
+ "description": "Created user object",
170
676
  "content": {
171
677
  "application/json": {
172
- "schema": {}
678
+ "schema": {
679
+ "$ref": "#/components/schemas/User"
680
+ }
681
+ },
682
+ "application/xml": {
683
+ "schema": {
684
+ "$ref": "#/components/schemas/User"
685
+ }
686
+ },
687
+ "application/x-www-form-urlencoded": {
688
+ "schema": {
689
+ "$ref": "#/components/schemas/User"
690
+ }
173
691
  }
174
692
  }
175
693
  },
176
- "422": {
177
- "description": "Validation Error",
694
+ "responses": {
695
+ "default": {
696
+ "description": "successful operation",
697
+ "content": {
698
+ "application/json": {
699
+ "schema": {
700
+ "$ref": "#/components/schemas/User"
701
+ }
702
+ },
703
+ "application/xml": {
704
+ "schema": {
705
+ "$ref": "#/components/schemas/User"
706
+ }
707
+ }
708
+ }
709
+ }
710
+ }
711
+ }
712
+ },
713
+ "/user/createWithList": {
714
+ "post": {
715
+ "tags": [
716
+ "user"
717
+ ],
718
+ "summary": "Creates list of users with given input array",
719
+ "description": "Creates list of users with given input array",
720
+ "operationId": "createUsersWithListInput",
721
+ "requestBody": {
178
722
  "content": {
179
723
  "application/json": {
180
724
  "schema": {
181
- "$ref": "#/components/schemas/HTTPValidationError"
725
+ "type": "array",
726
+ "items": {
727
+ "$ref": "#/components/schemas/User"
728
+ }
729
+ }
730
+ }
731
+ }
732
+ },
733
+ "responses": {
734
+ "200": {
735
+ "description": "Successful operation",
736
+ "content": {
737
+ "application/json": {
738
+ "schema": {
739
+ "$ref": "#/components/schemas/User"
740
+ }
741
+ },
742
+ "application/xml": {
743
+ "schema": {
744
+ "$ref": "#/components/schemas/User"
745
+ }
182
746
  }
183
747
  }
748
+ },
749
+ "default": {
750
+ "description": "successful operation"
184
751
  }
185
752
  }
186
753
  }
187
- }
188
- },
189
- "/submit/": {
190
- "post": {
191
- "summary": "Submit Form",
192
- "operationId": "submit_form_submit__post",
193
- "requestBody": {
194
- "content": {
195
- "application/x-www-form-urlencoded": {
754
+ },
755
+ "/user/login": {
756
+ "get": {
757
+ "tags": [
758
+ "user"
759
+ ],
760
+ "summary": "Logs user into the system",
761
+ "description": "",
762
+ "operationId": "loginUser",
763
+ "parameters": [
764
+ {
765
+ "name": "username",
766
+ "in": "query",
767
+ "description": "The user name for login",
768
+ "required": false,
769
+ "schema": {
770
+ "type": "string"
771
+ }
772
+ },
773
+ {
774
+ "name": "password",
775
+ "in": "query",
776
+ "description": "The password for login in clear text",
777
+ "required": false,
196
778
  "schema": {
197
- "$ref": "#/components/schemas/Body_submit_form_submit__post"
779
+ "type": "string"
198
780
  }
199
781
  }
200
- },
201
- "required": true
782
+ ],
783
+ "responses": {
784
+ "200": {
785
+ "description": "successful operation",
786
+ "headers": {
787
+ "X-Rate-Limit": {
788
+ "description": "calls per hour allowed by the user",
789
+ "schema": {
790
+ "type": "integer",
791
+ "format": "int32"
792
+ }
793
+ },
794
+ "X-Expires-After": {
795
+ "description": "date in UTC when token expires",
796
+ "schema": {
797
+ "type": "string",
798
+ "format": "date-time"
799
+ }
800
+ }
801
+ },
802
+ "content": {
803
+ "application/xml": {
804
+ "schema": {
805
+ "type": "string"
806
+ }
807
+ },
808
+ "application/json": {
809
+ "schema": {
810
+ "type": "string"
811
+ }
812
+ }
813
+ }
814
+ },
815
+ "400": {
816
+ "description": "Invalid username/password supplied"
817
+ }
818
+ }
819
+ }
820
+ },
821
+ "/user/logout": {
822
+ "get": {
823
+ "tags": [
824
+ "user"
825
+ ],
826
+ "summary": "Logs out current logged in user session",
827
+ "description": "",
828
+ "operationId": "logoutUser",
829
+ "parameters": [],
830
+ "responses": {
831
+ "default": {
832
+ "description": "successful operation"
833
+ }
834
+ }
835
+ }
836
+ },
837
+ "/user/{username}": {
838
+ "get": {
839
+ "tags": [
840
+ "user"
841
+ ],
842
+ "summary": "Get user by user name",
843
+ "description": "",
844
+ "operationId": "getUserByName",
845
+ "parameters": [
846
+ {
847
+ "name": "username",
848
+ "in": "path",
849
+ "description": "The name that needs to be fetched. Use user1 for testing. ",
850
+ "required": true,
851
+ "schema": {
852
+ "type": "string"
853
+ }
854
+ }
855
+ ],
856
+ "responses": {
857
+ "200": {
858
+ "description": "successful operation",
859
+ "content": {
860
+ "application/json": {
861
+ "schema": {
862
+ "$ref": "#/components/schemas/User"
863
+ }
864
+ },
865
+ "application/xml": {
866
+ "schema": {
867
+ "$ref": "#/components/schemas/User"
868
+ }
869
+ }
870
+ }
871
+ },
872
+ "400": {
873
+ "description": "Invalid username supplied"
874
+ },
875
+ "404": {
876
+ "description": "User not found"
877
+ }
878
+ }
202
879
  },
203
- "responses": {
204
- "200": {
205
- "description": "Successful Response",
206
- "content": {
207
- "application/json": {
208
- "schema": {}
880
+ "put": {
881
+ "tags": [
882
+ "user"
883
+ ],
884
+ "summary": "Update user",
885
+ "description": "This can only be done by the logged in user.",
886
+ "operationId": "updateUser",
887
+ "parameters": [
888
+ {
889
+ "name": "username",
890
+ "in": "path",
891
+ "description": "name that need to be deleted",
892
+ "required": true,
893
+ "schema": {
894
+ "type": "string"
209
895
  }
210
896
  }
211
- },
212
- "422": {
213
- "description": "Validation Error",
897
+ ],
898
+ "requestBody": {
899
+ "description": "Update an existent user in the store",
214
900
  "content": {
215
901
  "application/json": {
216
902
  "schema": {
217
- "$ref": "#/components/schemas/HTTPValidationError"
903
+ "$ref": "#/components/schemas/User"
904
+ }
905
+ },
906
+ "application/xml": {
907
+ "schema": {
908
+ "$ref": "#/components/schemas/User"
909
+ }
910
+ },
911
+ "application/x-www-form-urlencoded": {
912
+ "schema": {
913
+ "$ref": "#/components/schemas/User"
218
914
  }
219
915
  }
220
916
  }
917
+ },
918
+ "responses": {
919
+ "default": {
920
+ "description": "successful operation"
921
+ }
922
+ }
923
+ },
924
+ "delete": {
925
+ "tags": [
926
+ "user"
927
+ ],
928
+ "summary": "Delete user",
929
+ "description": "This can only be done by the logged in user.",
930
+ "operationId": "deleteUser",
931
+ "parameters": [
932
+ {
933
+ "name": "username",
934
+ "in": "path",
935
+ "description": "The name that needs to be deleted",
936
+ "required": true,
937
+ "schema": {
938
+ "type": "string"
939
+ }
940
+ }
941
+ ],
942
+ "responses": {
943
+ "400": {
944
+ "description": "Invalid username supplied"
945
+ },
946
+ "404": {
947
+ "description": "User not found"
948
+ }
221
949
  }
222
950
  }
223
951
  }
224
- }
225
- },
226
- "components": {
227
- "schemas": {
228
- "Body_login_login__post": {
229
- "properties": {
230
- "username": {
231
- "type": "string",
232
- "title": "Username"
952
+ },
953
+ "components": {
954
+ "schemas": {
955
+ "Order": {
956
+ "type": "object",
957
+ "properties": {
958
+ "id": {
959
+ "type": "integer",
960
+ "format": "int64",
961
+ "example": 10
962
+ },
963
+ "petId": {
964
+ "type": "integer",
965
+ "format": "int64",
966
+ "example": 198772
967
+ },
968
+ "quantity": {
969
+ "type": "integer",
970
+ "format": "int32",
971
+ "example": 7
972
+ },
973
+ "shipDate": {
974
+ "type": "string",
975
+ "format": "date-time"
976
+ },
977
+ "status": {
978
+ "type": "string",
979
+ "description": "Order Status",
980
+ "example": "approved",
981
+ "enum": [
982
+ "placed",
983
+ "approved",
984
+ "delivered"
985
+ ]
986
+ },
987
+ "complete": {
988
+ "type": "boolean"
989
+ }
233
990
  },
234
- "password": {
235
- "type": "string",
236
- "title": "Password"
991
+ "xml": {
992
+ "name": "order"
237
993
  }
238
994
  },
239
- "type": "object",
240
- "required": [
241
- "username",
242
- "password"
243
- ],
244
- "title": "Body_login_login__post"
245
- },
246
- "Body_submit_form_submit__post": {
247
- "properties": {
248
- "name": {
249
- "type": "string",
250
- "title": "Name"
251
- },
252
- "email": {
253
- "type": "string",
254
- "title": "Email"
995
+ "Customer": {
996
+ "type": "object",
997
+ "properties": {
998
+ "id": {
999
+ "type": "integer",
1000
+ "format": "int64",
1001
+ "example": 100000
1002
+ },
1003
+ "username": {
1004
+ "type": "string",
1005
+ "example": "fehguy"
1006
+ },
1007
+ "address": {
1008
+ "type": "array",
1009
+ "xml": {
1010
+ "name": "addresses",
1011
+ "wrapped": true
1012
+ },
1013
+ "items": {
1014
+ "$ref": "#/components/schemas/Address"
1015
+ }
1016
+ }
255
1017
  },
256
- "age": {
257
- "type": "integer",
258
- "title": "Age"
1018
+ "xml": {
1019
+ "name": "customer"
1020
+ }
1021
+ },
1022
+ "Address": {
1023
+ "type": "object",
1024
+ "properties": {
1025
+ "street": {
1026
+ "type": "string",
1027
+ "example": "437 Lytton"
1028
+ },
1029
+ "city": {
1030
+ "type": "string",
1031
+ "example": "Palo Alto"
1032
+ },
1033
+ "state": {
1034
+ "type": "string",
1035
+ "example": "CA"
1036
+ },
1037
+ "zip": {
1038
+ "type": "string",
1039
+ "example": "94301"
1040
+ }
259
1041
  },
260
- "is_active": {
261
- "type": "boolean",
262
- "title": "Is Active",
263
- "default": true
1042
+ "xml": {
1043
+ "name": "address"
264
1044
  }
265
1045
  },
266
- "type": "object",
267
- "required": [
268
- "name",
269
- "email"
270
- ],
271
- "title": "Body_submit_form_submit__post"
272
- },
273
- "HTTPValidationError": {
274
- "properties": {
275
- "detail": {
276
- "items": {
277
- "$ref": "#/components/schemas/ValidationError"
278
- },
279
- "type": "array",
280
- "title": "Detail"
1046
+ "Category": {
1047
+ "type": "object",
1048
+ "properties": {
1049
+ "id": {
1050
+ "type": "integer",
1051
+ "format": "int64",
1052
+ "example": 1
1053
+ },
1054
+ "name": {
1055
+ "type": "string",
1056
+ "example": "Dogs"
1057
+ }
1058
+ },
1059
+ "xml": {
1060
+ "name": "category"
281
1061
  }
282
1062
  },
283
- "type": "object",
284
- "title": "HTTPValidationError"
285
- },
286
- "Item": {
287
- "properties": {
288
- "name": {
289
- "type": "string",
290
- "title": "Name"
1063
+ "User": {
1064
+ "type": "object",
1065
+ "properties": {
1066
+ "id": {
1067
+ "type": "integer",
1068
+ "format": "int64",
1069
+ "example": 10
1070
+ },
1071
+ "username": {
1072
+ "type": "string",
1073
+ "example": "theUser"
1074
+ },
1075
+ "firstName": {
1076
+ "type": "string",
1077
+ "example": "John"
1078
+ },
1079
+ "lastName": {
1080
+ "type": "string",
1081
+ "example": "James"
1082
+ },
1083
+ "email": {
1084
+ "type": "string",
1085
+ "example": "john@email.com"
1086
+ },
1087
+ "password": {
1088
+ "type": "string",
1089
+ "example": "12345"
1090
+ },
1091
+ "phone": {
1092
+ "type": "string",
1093
+ "example": "12345"
1094
+ },
1095
+ "userStatus": {
1096
+ "type": "integer",
1097
+ "description": "User Status",
1098
+ "format": "int32",
1099
+ "example": 1
1100
+ }
291
1101
  },
292
- "price": {
293
- "type": "number",
294
- "title": "Price"
1102
+ "xml": {
1103
+ "name": "user"
1104
+ }
1105
+ },
1106
+ "Tag": {
1107
+ "type": "object",
1108
+ "properties": {
1109
+ "id": {
1110
+ "type": "integer",
1111
+ "format": "int64"
1112
+ },
1113
+ "name": {
1114
+ "type": "string"
1115
+ }
295
1116
  },
296
- "description": {
297
- "anyOf": [
298
- {
299
- "type": "string"
1117
+ "xml": {
1118
+ "name": "tag"
1119
+ }
1120
+ },
1121
+ "Pet": {
1122
+ "required": [
1123
+ "name",
1124
+ "photoUrls"
1125
+ ],
1126
+ "type": "object",
1127
+ "properties": {
1128
+ "id": {
1129
+ "type": "integer",
1130
+ "format": "int64",
1131
+ "example": 10
1132
+ },
1133
+ "name": {
1134
+ "type": "string",
1135
+ "example": "doggie"
1136
+ },
1137
+ "category": {
1138
+ "$ref": "#/components/schemas/Category"
1139
+ },
1140
+ "photoUrls": {
1141
+ "type": "array",
1142
+ "xml": {
1143
+ "wrapped": true
300
1144
  },
301
- {
302
- "type": "null"
1145
+ "items": {
1146
+ "type": "string",
1147
+ "xml": {
1148
+ "name": "photoUrl"
1149
+ }
303
1150
  }
304
- ],
305
- "title": "Description"
306
- },
307
- "tax": {
308
- "anyOf": [
309
- {
310
- "type": "number"
1151
+ },
1152
+ "tags": {
1153
+ "type": "array",
1154
+ "xml": {
1155
+ "wrapped": true
311
1156
  },
312
- {
313
- "type": "null"
1157
+ "items": {
1158
+ "$ref": "#/components/schemas/Tag"
314
1159
  }
315
- ],
316
- "title": "Tax"
1160
+ },
1161
+ "status": {
1162
+ "type": "string",
1163
+ "description": "pet status in the store",
1164
+ "enum": [
1165
+ "available",
1166
+ "pending",
1167
+ "sold"
1168
+ ]
1169
+ }
1170
+ },
1171
+ "xml": {
1172
+ "name": "pet"
317
1173
  }
318
1174
  },
319
- "type": "object",
320
- "required": [
321
- "name",
322
- "price"
323
- ],
324
- "title": "Item"
325
- },
326
- "ValidationError": {
327
- "properties": {
328
- "loc": {
329
- "items": {
330
- "anyOf": [
331
- {
332
- "type": "string"
333
- },
334
- {
335
- "type": "integer"
336
- }
337
- ]
1175
+ "ApiResponse": {
1176
+ "type": "object",
1177
+ "properties": {
1178
+ "code": {
1179
+ "type": "integer",
1180
+ "format": "int32"
338
1181
  },
339
- "type": "array",
340
- "title": "Location"
341
- },
342
- "msg": {
343
- "type": "string",
344
- "title": "Message"
1182
+ "type": {
1183
+ "type": "string"
1184
+ },
1185
+ "message": {
1186
+ "type": "string"
1187
+ }
345
1188
  },
346
- "type": {
347
- "type": "string",
348
- "title": "Error Type"
1189
+ "xml": {
1190
+ "name": "##default"
1191
+ }
1192
+ }
1193
+ },
1194
+ "requestBodies": {
1195
+ "Pet": {
1196
+ "description": "Pet object that needs to be added to the store",
1197
+ "content": {
1198
+ "application/json": {
1199
+ "schema": {
1200
+ "$ref": "#/components/schemas/Pet"
1201
+ }
1202
+ },
1203
+ "application/xml": {
1204
+ "schema": {
1205
+ "$ref": "#/components/schemas/Pet"
1206
+ }
1207
+ }
1208
+ }
1209
+ },
1210
+ "UserArray": {
1211
+ "description": "List of user object",
1212
+ "content": {
1213
+ "application/json": {
1214
+ "schema": {
1215
+ "type": "array",
1216
+ "items": {
1217
+ "$ref": "#/components/schemas/User"
1218
+ }
1219
+ }
1220
+ }
1221
+ }
1222
+ }
1223
+ },
1224
+ "securitySchemes": {
1225
+ "petstore_auth": {
1226
+ "type": "oauth2",
1227
+ "flows": {
1228
+ "implicit": {
1229
+ "authorizationUrl": "https://petstore3.swagger.io/oauth/authorize",
1230
+ "scopes": {
1231
+ "write:pets": "modify pets in your account",
1232
+ "read:pets": "read your pets"
1233
+ }
1234
+ }
349
1235
  }
350
1236
  },
351
- "type": "object",
352
- "required": [
353
- "loc",
354
- "msg",
355
- "type"
356
- ],
357
- "title": "ValidationError"
1237
+ "api_key": {
1238
+ "type": "apiKey",
1239
+ "name": "api_key",
1240
+ "in": "header"
1241
+ }
358
1242
  }
359
1243
  }
360
1244
  }
361
- }
362
1245
  const apiRenderer = new ApiRenderer({
363
1246
  mountPoint: '#notebook', // 可δ»₯ζ˜―ι€‰ζ‹©ε™¨ε­—η¬¦δΈ²
364
1247
  });