Debian Codegraph @

fixtures/json/petstore.json

raw
1 {
2 "swagger": "2.0",
3 "info": {
4 "version": "1.0.0",
5 "title": "Swagger Petstore",
6 "contact": {
7 "name": "Wordnik API Team",
8 "url": "http://developer.wordnik.com"
9 },
10 "license": {
11 "name": "Creative Commons 4.0 International",
12 "url": "http://creativecommons.org/licenses/by/4.0/"
13 }
14 },
15 "host": "petstore.swagger.wordnik.com",
16 "basePath": "/api",
17 "schemes": [
18 "http"
19 ],
20 "paths": {
21 "/pets": {
22 "get": {
23 "security": [
24 {
25 "oauth2": ["read"]
26 }
27 ],
28 "tags": [ "Pet Operations" ],
29 "operationId": "getAllPets",
30 "parameters": [
31 {
32 "name": "status",
33 "in": "query",
34 "description": "The status to filter by",
35 "type": "string"
36 }
37 ],
38 "summary": "Finds all pets in the system",
39 "responses": {
40 "200": {
41 "description": "Pet response",
42 "schema": {
43 "type": "array",
44 "items": {
45 "$ref": "#/definitions/Pet"
46 }
47 }
48 },
49 "default": {
50 "description": "Unexpected error",
51 "schema": {
52 "$ref": "#/definitions/Error"
53 }
54 }
55 }
56 },
57 "post": {
58 "security": [
59 {
60 "oauth2": ["write"]
61 }
62 ],
63 "tags": [ "Pet Operations" ],
64 "operationId": "createPet",
65 "summary": "Creates a new pet",
66 "parameters": [
67 {
68 "name": "pet",
69 "in": "body",
70 "description": "The Pet to create",
71 "required": true,
72 "schema": {
73 "$ref": "#/definitions/newPet"
74 }
75 }
76 ],
77 "responses": {
78 "200": {
79 "description": "Created Pet response",
80 "schema": {
81 "$ref": "#/definitions/Pet"
82 }
83 },
84 "default": {
85 "description": "Unexpected error",
86 "schema": {
87 "$ref": "#/definitions/Error"
88 }
89 }
90 }
91 }
92 },
93 "/pets/{id}": {
94 "delete": {
95 "security": [
96 {
97 "oauth2": ["write"]
98 }
99 ],
100 "description": "Deletes the Pet by id",
101 "operationId": "deletePet",
102 "parameters": [
103 {
104 "name": "id",
105 "in": "path",
106 "description": "ID of pet to delete",
107 "required": true,
108 "type": "integer",
109 "format": "int64"
110 }
111 ],
112 "responses": {
113 "204": {
114 "description": "pet deleted"
115 },
116 "default": {
117 "description": "unexpected error",
118 "schema": {
119 "$ref": "#/definitions/Error"
120 }
121 }
122 }
123 },
124 "get": {
125 "security": [
126 {
127 "oauth2": ["read"]
128 }
129 ],
130 "tags": [ "Pet Operations" ],
131 "operationId": "getPetById",
132 "summary": "Finds the pet by id",
133 "responses": {
134 "200": {
135 "description": "Pet response",
136 "schema": {
137 "$ref": "#/definitions/Pet"
138 }
139 },
140 "default": {
141 "description": "Unexpected error",
142 "schema": {
143 "$ref": "#/definitions/Error"
144 }
145 }
146 }
147 },
148 "parameters": [
149 {
150 "name": "id",
151 "in": "path",
152 "description": "ID of pet",
153 "required": true,
154 "type": "integer",
155 "format": "int64"
156 }
157 ]
158 }
159 },
160 "definitions": {
161 "Category": {
162 "id": "Category",
163 "properties": {
164 "id": {
165 "format": "int64",
166 "type": "integer"
167 },
168 "name": {
169 "type": "string"
170 }
171 }
172 },
173 "Pet": {
174 "id": "Pet",
175 "properties": {
176 "category": {
177 "$ref": "#/definitions/Category"
178 },
179 "id": {
180 "description": "unique identifier for the pet",
181 "format": "int64",
182 "maximum": 100.0,
183 "minimum": 0.0,
184 "type": "integer"
185 },
186 "name": {
187 "type": "string"
188 },
189 "photoUrls": {
190 "items": {
191 "type": "string"
192 },
193 "type": "array"
194 },
195 "status": {
196 "description": "pet status in the store",
197 "enum": [
198 "available",
199 "pending",
200 "sold"
201 ],
202 "type": "string"
203 },
204 "tags": {
205 "items": {
206 "$ref": "#/definitions/Tag"
207 },
208 "type": "array"
209 }
210 },
211 "required": [
212 "id",
213 "name"
214 ]
215 },
216 "newPet": {
217 "allOf": [
218 {
219 "$ref": "#/definitions/Pet"
220 }
221 ],
222 "required": [
223 "name"
224 ]
225 },
226 "Tag": {
227 "id": "Tag",
228 "properties": {
229 "id": {
230 "format": "int64",
231 "type": "integer"
232 },
233 "name": {
234 "type": "string"
235 }
236 }
237 },
238 "Error": {
239 "required": [
240 "code",
241 "message"
242 ],
243 "properties": {
244 "code": {
245 "type": "integer",
246 "format": "int32"
247 },
248 "message": {
249 "type": "string"
250 }
251 }
252 }
253 },
254 "produces": [
255 "application/json",
256 "application/xml",
257 "text/plain",
258 "text/html"
259 ],
260 "securityDefinitions": {
261 "oauth2": {
262 "type": "oauth2",
263 "scopes": {
264 "read": "Read access.",
265 "write": "Write access"
266 },
267 "flow": "accessCode",
268 "authorizationUrl": "http://petstore.swagger.wordnik.com/oauth/authorize",
269 "tokenUrl": "http://petstore.swagger.wordnik.com/oauth/token"
270 }
271 }
272 }