File tree 2 files changed +100
-0
lines changed
samples/v2.0/json/resources 2 files changed +100
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "swagger" : 2.0 ,
3
+ "info" : {
4
+ "version" : " 1.0.9-abcd" ,
5
+ "title" : " Swagger Sample API" ,
6
+ "description" : " A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification" ,
7
+ "termsOfService" : " http://helloreverb.com/terms/" ,
8
+ "contact" : {
9
+ "name" : " wordnik api team" ,
10
+ "url" : " http://developer.wordnik.com"
11
+ },
12
+ "license" : {
13
+ "name" : " Creative Commons 4.0 International" ,
14
+ "url" : " http://creativecommons.org/licenses/by/4.0/"
15
+ }
16
+ },
17
+ "host" : " my.api.com" ,
18
+ "basePath" : " /v1" ,
19
+ "schemes" : [
20
+ " http" ,
21
+ " https"
22
+ ],
23
+ "consumes" : [
24
+ " application/json"
25
+ ],
26
+ "produces" : [
27
+ " application/json" ,
28
+ " application/xml"
29
+ ],
30
+ "paths" : {
31
+ "/pets/{petId}" : {
32
+ "$ref" : " https://github.com/raw/reverb/swagger-spec/master/samples/2.0/json/resources/resourceWithLinkedDefinitions_part1.json"
33
+ }
34
+ },
35
+ "definitions" : {
36
+ "Pet" : {
37
+ "required" : [
38
+ " name"
39
+ ],
40
+ "properties" : {
41
+ "name" : {
42
+ "type" : " string"
43
+ },
44
+ "tag" : {
45
+ "type" : " string"
46
+ }
47
+ }
48
+ },
49
+ "ErrorModel" : {
50
+ "required" : [ " code" , " message" ],
51
+ "properties" : {
52
+ "code" : {
53
+ "type" : " integer" ,
54
+ "format" : " int32"
55
+ },
56
+ "message" : {
57
+ "type" : " string"
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "get" : {
3
+ "description" : " Returns a pet based on ID" ,
4
+ "summary" : " Find pet by ID" ,
5
+ "operationId" : " getPetsById" ,
6
+ "produces" : [
7
+ " application/json" ,
8
+ " text/html"
9
+ ],
10
+ "parameters" : [
11
+ {
12
+ "name" : " petId" ,
13
+ "in" : " path" ,
14
+ "description" : " ID of pet that needs to be fetched" ,
15
+ "required" : true ,
16
+ "type" : " array" ,
17
+ "items" : {
18
+ "type" : " string"
19
+ },
20
+ "collectionFormat" : " csv"
21
+ }
22
+ ],
23
+ "responses" : {
24
+ "200" : {
25
+ "description" : " pet response" ,
26
+ "schema" : {
27
+ "$ref" : " Pet"
28
+ }
29
+ },
30
+ "default" : {
31
+ "description" : " error payload" ,
32
+ "schema" : {
33
+ "$ref" : " ErrorModel"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
You can’t perform that action at this time.
0 commit comments