swagger2md 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ccc6026a350f4d923a83c07e4b5bd5dea2a0dd8
4
- data.tar.gz: 6ce0aef4005bb9ca6fa66cfa26b8ab466451c374
3
+ metadata.gz: c86dce6a9ea3d08814e067e8c4831b4748b28135
4
+ data.tar.gz: 934a08f57134616184867bc6e09f542c19320aeb
5
5
  SHA512:
6
- metadata.gz: 5cd2639e3913a9684425067fb28b0c29be83ab593f13f9025001ada2eeab233d16479fd1f35b70692a6a984ab6ed3a0c111d035c8bff7c8147f6b654096f4330
7
- data.tar.gz: 9519434787d7033c9bba1417051874c958419ae25fcde68167cfdb4703ce7699c8430611d4415a3b18882cc72f0e0b00c1427db7b2aa5b811cf5e6b0f676b435
6
+ metadata.gz: ad6f888ec1a8c8cc6885ad7a0b37271d80597b3ef41a6a95805fcc37335826202b334ab3e1c44cf4c483bee354cb9ff850f9372c1cbb3519318cf2b2112c42fd
7
+ data.tar.gz: 4b1df4fb91c5977a321d7eb154b5e27f84163669a00af1c1782722da995814495321728980feb3eb1b9d6df34eac32f3746472a0860d4391908723bb702a3c53
data/README.md CHANGED
@@ -22,7 +22,17 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ ```
26
+ $ swagger2md --help
27
+
28
+ Usage: swagger2md [options]
29
+ -i, --input INPUT Specific swagger file path
30
+ -o, --output [OUTPUT] Specific output file name [Option]
31
+ ```
32
+
33
+ ```
34
+ $ swagger2md -i swagger.json -o docs.md
35
+ ```
26
36
 
27
37
  ## Development
28
38
 
@@ -8,13 +8,13 @@ options = {}
8
8
 
9
9
  OptionParser.new do |parser|
10
10
  parser.on("-i", "--input INPUT", String, 'Specific swagger file path') do |input|
11
- options[:input] = input
11
+ options[:input] = input
12
12
  end
13
13
  parser.on("-o", "--output [OUTPUT]", String, 'Specific output file name') do |output|
14
- options[:output] = output
14
+ options[:output] = output
15
15
  end
16
16
  end.parse!
17
17
 
18
18
  if options[:input]
19
- Swagger2md::Converter.to_markdown(options[:input])
19
+ Swagger2md::Converter.to_markdown(options[:input], options[:output] || 'docs.md')
20
20
  end
@@ -0,0 +1,1044 @@
1
+ {
2
+ "swagger":"2.0",
3
+ "info":{
4
+ "description":"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
5
+ "version":"1.0.0",
6
+ "title":"Swagger Petstore",
7
+ "termsOfService":"http://swagger.io/terms/",
8
+ "contact":{
9
+ "email":"apiteam@swagger.io"
10
+ },
11
+ "license":{
12
+ "name":"Apache 2.0",
13
+ "url":"http://www.apache.org/licenses/LICENSE-2.0.html"
14
+ }
15
+ },
16
+ "host":"petstore.swagger.io",
17
+ "basePath":"/v2",
18
+ "tags":[
19
+ {
20
+ "name":"pet",
21
+ "description":"Everything about your Pets",
22
+ "externalDocs":{
23
+ "description":"Find out more",
24
+ "url":"http://swagger.io"
25
+ }
26
+ },
27
+ {
28
+ "name":"store",
29
+ "description":"Access to Petstore orders"
30
+ },
31
+ {
32
+ "name":"user",
33
+ "description":"Operations about user",
34
+ "externalDocs":{
35
+ "description":"Find out more about our store",
36
+ "url":"http://swagger.io"
37
+ }
38
+ }
39
+ ],
40
+ "schemes":[
41
+ "https",
42
+ "http"
43
+ ],
44
+ "paths":{
45
+ "/pet":{
46
+ "post":{
47
+ "tags":[
48
+ "pet"
49
+ ],
50
+ "summary":"Add a new pet to the store",
51
+ "description":"",
52
+ "operationId":"addPet",
53
+ "consumes":[
54
+ "application/json",
55
+ "application/xml"
56
+ ],
57
+ "produces":[
58
+ "application/xml",
59
+ "application/json"
60
+ ],
61
+ "parameters":[
62
+ {
63
+ "in":"body",
64
+ "name":"body",
65
+ "description":"Pet object that needs to be added to the store",
66
+ "required":true,
67
+ "schema":{
68
+ "$ref":"#/definitions/Pet"
69
+ }
70
+ }
71
+ ],
72
+ "responses":{
73
+ "405":{
74
+ "description":"Invalid input"
75
+ }
76
+ },
77
+ "security":[
78
+ {
79
+ "petstore_auth":[
80
+ "write:pets",
81
+ "read:pets"
82
+ ]
83
+ }
84
+ ]
85
+ },
86
+ "put":{
87
+ "tags":[
88
+ "pet"
89
+ ],
90
+ "summary":"Update an existing pet",
91
+ "description":"",
92
+ "operationId":"updatePet",
93
+ "consumes":[
94
+ "application/json",
95
+ "application/xml"
96
+ ],
97
+ "produces":[
98
+ "application/xml",
99
+ "application/json"
100
+ ],
101
+ "parameters":[
102
+ {
103
+ "in":"body",
104
+ "name":"body",
105
+ "description":"Pet object that needs to be added to the store",
106
+ "required":true,
107
+ "schema":{
108
+ "$ref":"#/definitions/Pet"
109
+ }
110
+ }
111
+ ],
112
+ "responses":{
113
+ "400":{
114
+ "description":"Invalid ID supplied"
115
+ },
116
+ "404":{
117
+ "description":"Pet not found"
118
+ },
119
+ "405":{
120
+ "description":"Validation exception"
121
+ }
122
+ },
123
+ "security":[
124
+ {
125
+ "petstore_auth":[
126
+ "write:pets",
127
+ "read:pets"
128
+ ]
129
+ }
130
+ ]
131
+ }
132
+ },
133
+ "/pet/findByStatus":{
134
+ "get":{
135
+ "tags":[
136
+ "pet"
137
+ ],
138
+ "summary":"Finds Pets by status",
139
+ "description":"Multiple status values can be provided with comma separated strings",
140
+ "operationId":"findPetsByStatus",
141
+ "produces":[
142
+ "application/xml",
143
+ "application/json"
144
+ ],
145
+ "parameters":[
146
+ {
147
+ "name":"status",
148
+ "in":"query",
149
+ "description":"Status values that need to be considered for filter",
150
+ "required":true,
151
+ "type":"array",
152
+ "items":{
153
+ "type":"string",
154
+ "enum":[
155
+ "available",
156
+ "pending",
157
+ "sold"
158
+ ],
159
+ "default":"available"
160
+ },
161
+ "collectionFormat":"multi"
162
+ }
163
+ ],
164
+ "responses":{
165
+ "200":{
166
+ "description":"successful operation",
167
+ "schema":{
168
+ "type":"array",
169
+ "items":{
170
+ "$ref":"#/definitions/Pet"
171
+ }
172
+ }
173
+ },
174
+ "400":{
175
+ "description":"Invalid status value"
176
+ }
177
+ },
178
+ "security":[
179
+ {
180
+ "petstore_auth":[
181
+ "write:pets",
182
+ "read:pets"
183
+ ]
184
+ }
185
+ ]
186
+ }
187
+ },
188
+ "/pet/findByTags":{
189
+ "get":{
190
+ "tags":[
191
+ "pet"
192
+ ],
193
+ "summary":"Finds Pets by tags",
194
+ "description":"Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
195
+ "operationId":"findPetsByTags",
196
+ "produces":[
197
+ "application/xml",
198
+ "application/json"
199
+ ],
200
+ "parameters":[
201
+ {
202
+ "name":"tags",
203
+ "in":"query",
204
+ "description":"Tags to filter by",
205
+ "required":true,
206
+ "type":"array",
207
+ "items":{
208
+ "type":"string"
209
+ },
210
+ "collectionFormat":"multi"
211
+ }
212
+ ],
213
+ "responses":{
214
+ "200":{
215
+ "description":"successful operation",
216
+ "schema":{
217
+ "type":"array",
218
+ "items":{
219
+ "$ref":"#/definitions/Pet"
220
+ }
221
+ }
222
+ },
223
+ "400":{
224
+ "description":"Invalid tag value"
225
+ }
226
+ },
227
+ "security":[
228
+ {
229
+ "petstore_auth":[
230
+ "write:pets",
231
+ "read:pets"
232
+ ]
233
+ }
234
+ ],
235
+ "deprecated":true
236
+ }
237
+ },
238
+ "/pet/{petId}":{
239
+ "get":{
240
+ "tags":[
241
+ "pet"
242
+ ],
243
+ "summary":"Find pet by ID",
244
+ "description":"Returns a single pet",
245
+ "operationId":"getPetById",
246
+ "produces":[
247
+ "application/xml",
248
+ "application/json"
249
+ ],
250
+ "parameters":[
251
+ {
252
+ "name":"petId",
253
+ "in":"path",
254
+ "description":"ID of pet to return",
255
+ "required":true,
256
+ "type":"integer",
257
+ "format":"int64"
258
+ }
259
+ ],
260
+ "responses":{
261
+ "200":{
262
+ "description":"successful operation",
263
+ "schema":{
264
+ "$ref":"#/definitions/Pet"
265
+ }
266
+ },
267
+ "400":{
268
+ "description":"Invalid ID supplied"
269
+ },
270
+ "404":{
271
+ "description":"Pet not found"
272
+ }
273
+ },
274
+ "security":[
275
+ {
276
+ "api_key":[
277
+
278
+ ]
279
+ }
280
+ ]
281
+ },
282
+ "post":{
283
+ "tags":[
284
+ "pet"
285
+ ],
286
+ "summary":"Updates a pet in the store with form data",
287
+ "description":"",
288
+ "operationId":"updatePetWithForm",
289
+ "consumes":[
290
+ "application/x-www-form-urlencoded"
291
+ ],
292
+ "produces":[
293
+ "application/xml",
294
+ "application/json"
295
+ ],
296
+ "parameters":[
297
+ {
298
+ "name":"petId",
299
+ "in":"path",
300
+ "description":"ID of pet that needs to be updated",
301
+ "required":true,
302
+ "type":"integer",
303
+ "format":"int64"
304
+ },
305
+ {
306
+ "name":"name",
307
+ "in":"formData",
308
+ "description":"Updated name of the pet",
309
+ "required":false,
310
+ "type":"string"
311
+ },
312
+ {
313
+ "name":"status",
314
+ "in":"formData",
315
+ "description":"Updated status of the pet",
316
+ "required":false,
317
+ "type":"string"
318
+ }
319
+ ],
320
+ "responses":{
321
+ "405":{
322
+ "description":"Invalid input"
323
+ }
324
+ },
325
+ "security":[
326
+ {
327
+ "petstore_auth":[
328
+ "write:pets",
329
+ "read:pets"
330
+ ]
331
+ }
332
+ ]
333
+ },
334
+ "delete":{
335
+ "tags":[
336
+ "pet"
337
+ ],
338
+ "summary":"Deletes a pet",
339
+ "description":"",
340
+ "operationId":"deletePet",
341
+ "produces":[
342
+ "application/xml",
343
+ "application/json"
344
+ ],
345
+ "parameters":[
346
+ {
347
+ "name":"api_key",
348
+ "in":"header",
349
+ "required":false,
350
+ "type":"string"
351
+ },
352
+ {
353
+ "name":"petId",
354
+ "in":"path",
355
+ "description":"Pet id to delete",
356
+ "required":true,
357
+ "type":"integer",
358
+ "format":"int64"
359
+ }
360
+ ],
361
+ "responses":{
362
+ "400":{
363
+ "description":"Invalid ID supplied"
364
+ },
365
+ "404":{
366
+ "description":"Pet not found"
367
+ }
368
+ },
369
+ "security":[
370
+ {
371
+ "petstore_auth":[
372
+ "write:pets",
373
+ "read:pets"
374
+ ]
375
+ }
376
+ ]
377
+ }
378
+ },
379
+ "/pet/{petId}/uploadImage":{
380
+ "post":{
381
+ "tags":[
382
+ "pet"
383
+ ],
384
+ "summary":"uploads an image",
385
+ "description":"",
386
+ "operationId":"uploadFile",
387
+ "consumes":[
388
+ "multipart/form-data"
389
+ ],
390
+ "produces":[
391
+ "application/json"
392
+ ],
393
+ "parameters":[
394
+ {
395
+ "name":"petId",
396
+ "in":"path",
397
+ "description":"ID of pet to update",
398
+ "required":true,
399
+ "type":"integer",
400
+ "format":"int64"
401
+ },
402
+ {
403
+ "name":"additionalMetadata",
404
+ "in":"formData",
405
+ "description":"Additional data to pass to server",
406
+ "required":false,
407
+ "type":"string"
408
+ },
409
+ {
410
+ "name":"file",
411
+ "in":"formData",
412
+ "description":"file to upload",
413
+ "required":false,
414
+ "type":"file"
415
+ }
416
+ ],
417
+ "responses":{
418
+ "200":{
419
+ "description":"successful operation",
420
+ "schema":{
421
+ "$ref":"#/definitions/ApiResponse"
422
+ }
423
+ }
424
+ },
425
+ "security":[
426
+ {
427
+ "petstore_auth":[
428
+ "write:pets",
429
+ "read:pets"
430
+ ]
431
+ }
432
+ ]
433
+ }
434
+ },
435
+ "/store/inventory":{
436
+ "get":{
437
+ "tags":[
438
+ "store"
439
+ ],
440
+ "summary":"Returns pet inventories by status",
441
+ "description":"Returns a map of status codes to quantities",
442
+ "operationId":"getInventory",
443
+ "produces":[
444
+ "application/json"
445
+ ],
446
+ "parameters":[
447
+
448
+ ],
449
+ "responses":{
450
+ "200":{
451
+ "description":"successful operation",
452
+ "schema":{
453
+ "type":"object",
454
+ "additionalProperties":{
455
+ "type":"integer",
456
+ "format":"int32"
457
+ }
458
+ }
459
+ }
460
+ },
461
+ "security":[
462
+ {
463
+ "api_key":[
464
+
465
+ ]
466
+ }
467
+ ]
468
+ }
469
+ },
470
+ "/store/order":{
471
+ "post":{
472
+ "tags":[
473
+ "store"
474
+ ],
475
+ "summary":"Place an order for a pet",
476
+ "description":"",
477
+ "operationId":"placeOrder",
478
+ "produces":[
479
+ "application/xml",
480
+ "application/json"
481
+ ],
482
+ "parameters":[
483
+ {
484
+ "in":"body",
485
+ "name":"body",
486
+ "description":"order placed for purchasing the pet",
487
+ "required":true,
488
+ "schema":{
489
+ "$ref":"#/definitions/Order"
490
+ }
491
+ }
492
+ ],
493
+ "responses":{
494
+ "200":{
495
+ "description":"successful operation",
496
+ "schema":{
497
+ "$ref":"#/definitions/Order"
498
+ }
499
+ },
500
+ "400":{
501
+ "description":"Invalid Order"
502
+ }
503
+ }
504
+ }
505
+ },
506
+ "/store/order/{orderId}":{
507
+ "get":{
508
+ "tags":[
509
+ "store"
510
+ ],
511
+ "summary":"Find purchase order by ID",
512
+ "description":"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions",
513
+ "operationId":"getOrderById",
514
+ "produces":[
515
+ "application/xml",
516
+ "application/json"
517
+ ],
518
+ "parameters":[
519
+ {
520
+ "name":"orderId",
521
+ "in":"path",
522
+ "description":"ID of pet that needs to be fetched",
523
+ "required":true,
524
+ "type":"integer",
525
+ "maximum":10.0,
526
+ "minimum":1.0,
527
+ "format":"int64"
528
+ }
529
+ ],
530
+ "responses":{
531
+ "200":{
532
+ "description":"successful operation",
533
+ "schema":{
534
+ "$ref":"#/definitions/Order"
535
+ }
536
+ },
537
+ "400":{
538
+ "description":"Invalid ID supplied"
539
+ },
540
+ "404":{
541
+ "description":"Order not found"
542
+ }
543
+ }
544
+ },
545
+ "delete":{
546
+ "tags":[
547
+ "store"
548
+ ],
549
+ "summary":"Delete purchase order by ID",
550
+ "description":"For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors",
551
+ "operationId":"deleteOrder",
552
+ "produces":[
553
+ "application/xml",
554
+ "application/json"
555
+ ],
556
+ "parameters":[
557
+ {
558
+ "name":"orderId",
559
+ "in":"path",
560
+ "description":"ID of the order that needs to be deleted",
561
+ "required":true,
562
+ "type":"integer",
563
+ "minimum":1.0,
564
+ "format":"int64"
565
+ }
566
+ ],
567
+ "responses":{
568
+ "400":{
569
+ "description":"Invalid ID supplied"
570
+ },
571
+ "404":{
572
+ "description":"Order not found"
573
+ }
574
+ }
575
+ }
576
+ },
577
+ "/user":{
578
+ "post":{
579
+ "tags":[
580
+ "user"
581
+ ],
582
+ "summary":"Create user",
583
+ "description":"This can only be done by the logged in user.",
584
+ "operationId":"createUser",
585
+ "produces":[
586
+ "application/xml",
587
+ "application/json"
588
+ ],
589
+ "parameters":[
590
+ {
591
+ "in":"body",
592
+ "name":"body",
593
+ "description":"Created user object",
594
+ "required":true,
595
+ "schema":{
596
+ "$ref":"#/definitions/User"
597
+ }
598
+ }
599
+ ],
600
+ "responses":{
601
+ "default":{
602
+ "description":"successful operation"
603
+ }
604
+ }
605
+ }
606
+ },
607
+ "/user/createWithArray":{
608
+ "post":{
609
+ "tags":[
610
+ "user"
611
+ ],
612
+ "summary":"Creates list of users with given input array",
613
+ "description":"",
614
+ "operationId":"createUsersWithArrayInput",
615
+ "produces":[
616
+ "application/xml",
617
+ "application/json"
618
+ ],
619
+ "parameters":[
620
+ {
621
+ "in":"body",
622
+ "name":"body",
623
+ "description":"List of user object",
624
+ "required":true,
625
+ "schema":{
626
+ "type":"array",
627
+ "items":{
628
+ "$ref":"#/definitions/User"
629
+ }
630
+ }
631
+ }
632
+ ],
633
+ "responses":{
634
+ "default":{
635
+ "description":"successful operation"
636
+ }
637
+ }
638
+ }
639
+ },
640
+ "/user/createWithList":{
641
+ "post":{
642
+ "tags":[
643
+ "user"
644
+ ],
645
+ "summary":"Creates list of users with given input array",
646
+ "description":"",
647
+ "operationId":"createUsersWithListInput",
648
+ "produces":[
649
+ "application/xml",
650
+ "application/json"
651
+ ],
652
+ "parameters":[
653
+ {
654
+ "in":"body",
655
+ "name":"body",
656
+ "description":"List of user object",
657
+ "required":true,
658
+ "schema":{
659
+ "type":"array",
660
+ "items":{
661
+ "$ref":"#/definitions/User"
662
+ }
663
+ }
664
+ }
665
+ ],
666
+ "responses":{
667
+ "default":{
668
+ "description":"successful operation"
669
+ }
670
+ }
671
+ }
672
+ },
673
+ "/user/login":{
674
+ "get":{
675
+ "tags":[
676
+ "user"
677
+ ],
678
+ "summary":"Logs user into the system",
679
+ "description":"",
680
+ "operationId":"loginUser",
681
+ "produces":[
682
+ "application/xml",
683
+ "application/json"
684
+ ],
685
+ "parameters":[
686
+ {
687
+ "name":"username",
688
+ "in":"query",
689
+ "description":"The user name for login",
690
+ "required":true,
691
+ "type":"string"
692
+ },
693
+ {
694
+ "name":"password",
695
+ "in":"query",
696
+ "description":"The password for login in clear text",
697
+ "required":true,
698
+ "type":"string"
699
+ }
700
+ ],
701
+ "responses":{
702
+ "200":{
703
+ "description":"successful operation",
704
+ "schema":{
705
+ "type":"string"
706
+ },
707
+ "headers":{
708
+ "X-Rate-Limit":{
709
+ "type":"integer",
710
+ "format":"int32",
711
+ "description":"calls per hour allowed by the user"
712
+ },
713
+ "X-Expires-After":{
714
+ "type":"string",
715
+ "format":"date-time",
716
+ "description":"date in UTC when token expires"
717
+ }
718
+ }
719
+ },
720
+ "400":{
721
+ "description":"Invalid username/password supplied"
722
+ }
723
+ }
724
+ }
725
+ },
726
+ "/user/logout":{
727
+ "get":{
728
+ "tags":[
729
+ "user"
730
+ ],
731
+ "summary":"Logs out current logged in user session",
732
+ "description":"",
733
+ "operationId":"logoutUser",
734
+ "produces":[
735
+ "application/xml",
736
+ "application/json"
737
+ ],
738
+ "parameters":[
739
+
740
+ ],
741
+ "responses":{
742
+ "default":{
743
+ "description":"successful operation"
744
+ }
745
+ }
746
+ }
747
+ },
748
+ "/user/{username}":{
749
+ "get":{
750
+ "tags":[
751
+ "user"
752
+ ],
753
+ "summary":"Get user by user name",
754
+ "description":"",
755
+ "operationId":"getUserByName",
756
+ "produces":[
757
+ "application/xml",
758
+ "application/json"
759
+ ],
760
+ "parameters":[
761
+ {
762
+ "name":"username",
763
+ "in":"path",
764
+ "description":"The name that needs to be fetched. Use user1 for testing. ",
765
+ "required":true,
766
+ "type":"string"
767
+ }
768
+ ],
769
+ "responses":{
770
+ "200":{
771
+ "description":"successful operation",
772
+ "schema":{
773
+ "$ref":"#/definitions/User"
774
+ }
775
+ },
776
+ "400":{
777
+ "description":"Invalid username supplied"
778
+ },
779
+ "404":{
780
+ "description":"User not found"
781
+ }
782
+ }
783
+ },
784
+ "put":{
785
+ "tags":[
786
+ "user"
787
+ ],
788
+ "summary":"Updated user",
789
+ "description":"This can only be done by the logged in user.",
790
+ "operationId":"updateUser",
791
+ "produces":[
792
+ "application/xml",
793
+ "application/json"
794
+ ],
795
+ "parameters":[
796
+ {
797
+ "name":"username",
798
+ "in":"path",
799
+ "description":"name that need to be updated",
800
+ "required":true,
801
+ "type":"string"
802
+ },
803
+ {
804
+ "in":"body",
805
+ "name":"body",
806
+ "description":"Updated user object",
807
+ "required":true,
808
+ "schema":{
809
+ "$ref":"#/definitions/User"
810
+ }
811
+ }
812
+ ],
813
+ "responses":{
814
+ "400":{
815
+ "description":"Invalid user supplied"
816
+ },
817
+ "404":{
818
+ "description":"User not found"
819
+ }
820
+ }
821
+ },
822
+ "delete":{
823
+ "tags":[
824
+ "user"
825
+ ],
826
+ "summary":"Delete user",
827
+ "description":"This can only be done by the logged in user.",
828
+ "operationId":"deleteUser",
829
+ "produces":[
830
+ "application/xml",
831
+ "application/json"
832
+ ],
833
+ "parameters":[
834
+ {
835
+ "name":"username",
836
+ "in":"path",
837
+ "description":"The name that needs to be deleted",
838
+ "required":true,
839
+ "type":"string"
840
+ }
841
+ ],
842
+ "responses":{
843
+ "400":{
844
+ "description":"Invalid username supplied"
845
+ },
846
+ "404":{
847
+ "description":"User not found"
848
+ }
849
+ }
850
+ }
851
+ }
852
+ },
853
+ "securityDefinitions":{
854
+ "petstore_auth":{
855
+ "type":"oauth2",
856
+ "authorizationUrl":"https://petstore.swagger.io/oauth/dialog",
857
+ "flow":"implicit",
858
+ "scopes":{
859
+ "write:pets":"modify pets in your account",
860
+ "read:pets":"read your pets"
861
+ }
862
+ },
863
+ "api_key":{
864
+ "type":"apiKey",
865
+ "name":"api_key",
866
+ "in":"header"
867
+ }
868
+ },
869
+ "definitions":{
870
+ "Order":{
871
+ "type":"object",
872
+ "properties":{
873
+ "id":{
874
+ "type":"integer",
875
+ "format":"int64"
876
+ },
877
+ "petId":{
878
+ "type":"integer",
879
+ "format":"int64"
880
+ },
881
+ "quantity":{
882
+ "type":"integer",
883
+ "format":"int32"
884
+ },
885
+ "shipDate":{
886
+ "type":"string",
887
+ "format":"date-time"
888
+ },
889
+ "status":{
890
+ "type":"string",
891
+ "description":"Order Status",
892
+ "enum":[
893
+ "placed",
894
+ "approved",
895
+ "delivered"
896
+ ]
897
+ },
898
+ "complete":{
899
+ "type":"boolean",
900
+ "default":false
901
+ }
902
+ },
903
+ "xml":{
904
+ "name":"Order"
905
+ }
906
+ },
907
+ "User":{
908
+ "type":"object",
909
+ "properties":{
910
+ "id":{
911
+ "type":"integer",
912
+ "format":"int64"
913
+ },
914
+ "username":{
915
+ "type":"string"
916
+ },
917
+ "firstName":{
918
+ "type":"string"
919
+ },
920
+ "lastName":{
921
+ "type":"string"
922
+ },
923
+ "email":{
924
+ "type":"string"
925
+ },
926
+ "password":{
927
+ "type":"string"
928
+ },
929
+ "phone":{
930
+ "type":"string"
931
+ },
932
+ "userStatus":{
933
+ "type":"integer",
934
+ "format":"int32",
935
+ "description":"User Status"
936
+ }
937
+ },
938
+ "xml":{
939
+ "name":"User"
940
+ }
941
+ },
942
+ "Category":{
943
+ "type":"object",
944
+ "properties":{
945
+ "id":{
946
+ "type":"integer",
947
+ "format":"int64"
948
+ },
949
+ "name":{
950
+ "type":"string"
951
+ }
952
+ },
953
+ "xml":{
954
+ "name":"Category"
955
+ }
956
+ },
957
+ "Tag":{
958
+ "type":"object",
959
+ "properties":{
960
+ "id":{
961
+ "type":"integer",
962
+ "format":"int64"
963
+ },
964
+ "name":{
965
+ "type":"string"
966
+ }
967
+ },
968
+ "xml":{
969
+ "name":"Tag"
970
+ }
971
+ },
972
+ "ApiResponse":{
973
+ "type":"object",
974
+ "properties":{
975
+ "code":{
976
+ "type":"integer",
977
+ "format":"int32"
978
+ },
979
+ "type":{
980
+ "type":"string"
981
+ },
982
+ "message":{
983
+ "type":"string"
984
+ }
985
+ }
986
+ },
987
+ "Pet":{
988
+ "type":"object",
989
+ "required":[
990
+ "name",
991
+ "photoUrls"
992
+ ],
993
+ "properties":{
994
+ "id":{
995
+ "type":"integer",
996
+ "format":"int64"
997
+ },
998
+ "category":{
999
+ "$ref":"#/definitions/Category"
1000
+ },
1001
+ "name":{
1002
+ "type":"string",
1003
+ "example":"doggie"
1004
+ },
1005
+ "photoUrls":{
1006
+ "type":"array",
1007
+ "xml":{
1008
+ "name":"photoUrl",
1009
+ "wrapped":true
1010
+ },
1011
+ "items":{
1012
+ "type":"string"
1013
+ }
1014
+ },
1015
+ "tags":{
1016
+ "type":"array",
1017
+ "xml":{
1018
+ "name":"tag",
1019
+ "wrapped":true
1020
+ },
1021
+ "items":{
1022
+ "$ref":"#/definitions/Tag"
1023
+ }
1024
+ },
1025
+ "status":{
1026
+ "type":"string",
1027
+ "description":"pet status in the store",
1028
+ "enum":[
1029
+ "available",
1030
+ "pending",
1031
+ "sold"
1032
+ ]
1033
+ }
1034
+ },
1035
+ "xml":{
1036
+ "name":"Pet"
1037
+ }
1038
+ }
1039
+ },
1040
+ "externalDocs":{
1041
+ "description":"Find out more about Swagger",
1042
+ "url":"http://swagger.io"
1043
+ }
1044
+ }