Debian Codegraph @

plugins/gnostic-swift-generator/examples/bookstore/bookstore.json

raw symbols SCIP
1 {
2 "swagger": "2.0",
3 "info": {
4 "description": "A simple Bookstore API example.",
5 "title": "Bookstore",
6 "version": "1.0.0"
7 },
8 "host": "generated-bookstore.appspot.com",
9 "basePath": "/",
10 "consumes": [
11 "application/json"
12 ],
13 "produces": [
14 "application/json"
15 ],
16 "schemes": [
17 "https"
18 ],
19 "paths": {
20 "/shelves": {
21 "get": {
22 "description": "Return all shelves in the bookstore.",
23 "operationId": "listShelves",
24 "produces": [
25 "application/json"
26 ],
27 "responses": {
28 "200": {
29 "description": "List of shelves in the bookstore.",
30 "schema": {
31 "$ref": "#/definitions/listShelvesResponse"
32 }
33 }
34 },
35 "security": [
36
37 ]
38 },
39 "post": {
40 "description": "Create a new shelf in the bookstore.",
41 "operationId": "createShelf",
42 "parameters": [
43 {
44 "description": "A shelf resource to create.",
45 "in": "body",
46 "name": "shelf",
47 "required": true,
48 "schema": {
49 "$ref": "#/definitions/shelf"
50 }
51 }
52 ],
53 "produces": [
54 "application/json"
55 ],
56 "responses": {
57 "200": {
58 "description": "A newly created shelf resource.",
59 "schema": {
60 "$ref": "#/definitions/shelf"
61 }
62 }
63 }
64 },
65 "delete": {
66 "description": "Delete all shelves.",
67 "operationId": "deleteShelves",
68 "responses": {
69 "default": {
70 "description": "An empty response body."
71 }
72 }
73 }
74 },
75 "/shelves/{shelf}": {
76 "get": {
77 "description": "Get a single shelf resource with the given ID.",
78 "operationId": "getShelf",
79 "parameters": [
80 {
81 "description": "ID of the shelf to get.",
82 "format": "int64",
83 "in": "path",
84 "name": "shelf",
85 "required": true,
86 "type": "integer"
87 }
88 ],
89 "produces": [
90 "application/json"
91 ],
92 "responses": {
93 "200": {
94 "description": "A shelf resource.",
95 "schema": {
96 "$ref": "#/definitions/shelf"
97 }
98 },
99 "default": {
100 "description": "unexpected error",
101 "schema": {
102 "$ref": "#/definitions/Error"
103 }
104 }
105 }
106 },
107 "delete": {
108 "description": "Delete a single shelf with the given ID.",
109 "operationId": "deleteShelf",
110 "parameters": [
111 {
112 "description": "ID of the shelf to delete.",
113 "format": "int64",
114 "in": "path",
115 "name": "shelf",
116 "required": true,
117 "type": "integer"
118 }
119 ],
120 "responses": {
121 "default": {
122 "description": "An empty response body."
123 }
124 }
125 }
126 },
127 "/shelves/{shelf}/books": {
128 "get": {
129 "description": "Return all books in a shelf with the given ID.",
130 "operationId": "listBooks",
131 "parameters": [
132 {
133 "description": "ID of the shelf whose books should be returned.",
134 "format": "int64",
135 "in": "path",
136 "name": "shelf",
137 "required": true,
138 "type": "integer"
139 }
140 ],
141 "produces": [
142 "application/json"
143 ],
144 "responses": {
145 "200": {
146 "description": "List of books on the specified shelf.",
147 "schema": {
148 "$ref": "#/definitions/listBooksResponse"
149 }
150 },
151 "default": {
152 "description": "unexpected error",
153 "schema": {
154 "$ref": "#/definitions/Error"
155 }
156 }
157 }
158 },
159 "post": {
160 "description": "Create a new book on the shelf.",
161 "operationId": "createBook",
162 "parameters": [
163 {
164 "description": "ID of the shelf where the book should be created.",
165 "format": "int64",
166 "in": "path",
167 "name": "shelf",
168 "required": true,
169 "type": "integer"
170 },
171 {
172 "description": "Book to create.",
173 "in": "body",
174 "name": "book",
175 "required": true,
176 "schema": {
177 "$ref": "#/definitions/book"
178 }
179 }
180 ],
181 "produces": [
182 "application/json"
183 ],
184 "responses": {
185 "200": {
186 "description": "A newly created book resource.",
187 "schema": {
188 "$ref": "#/definitions/book"
189 }
190 },
191 "default": {
192 "description": "unexpected error",
193 "schema": {
194 "$ref": "#/definitions/Error"
195 }
196 }
197 }
198 }
199 },
200 "/shelves/{shelf}/books/{book}": {
201 "get": {
202 "description": "Get a single book with a given ID from a shelf.",
203 "operationId": "getBook",
204 "parameters": [
205 {
206 "description": "ID of the shelf from which to get the book.",
207 "format": "int64",
208 "in": "path",
209 "name": "shelf",
210 "required": true,
211 "type": "integer"
212 },
213 {
214 "description": "ID of the book to get from the shelf.",
215 "format": "int64",
216 "in": "path",
217 "name": "book",
218 "required": true,
219 "type": "integer"
220 }
221 ],
222 "produces": [
223 "application/json"
224 ],
225 "responses": {
226 "200": {
227 "description": "A book resource.",
228 "schema": {
229 "$ref": "#/definitions/book"
230 }
231 },
232 "default": {
233 "description": "unexpected error",
234 "schema": {
235 "$ref": "#/definitions/Error"
236 }
237 }
238 }
239 },
240 "delete": {
241 "description": "Delete a single book with a given ID from a shelf.",
242 "operationId": "deleteBook",
243 "parameters": [
244 {
245 "description": "ID of the shelf from which to delete the book.",
246 "format": "int64",
247 "in": "path",
248 "name": "shelf",
249 "required": true,
250 "type": "integer"
251 },
252 {
253 "description": "ID of the book to delete from the shelf.",
254 "format": "int64",
255 "in": "path",
256 "name": "book",
257 "required": true,
258 "type": "integer"
259 }
260 ],
261 "responses": {
262 "default": {
263 "description": "An empty response body."
264 }
265 }
266 }
267 }
268 },
269 "definitions": {
270 "book": {
271 "properties": {
272 "author": {
273 "type": "string"
274 },
275 "name": {
276 "type": "string"
277 },
278 "title": {
279 "type": "string"
280 }
281 },
282 "required": [
283 "name",
284 "author",
285 "title"
286 ]
287 },
288 "listBooksResponse": {
289 "properties": {
290 "books": {
291 "items": {
292 "$ref": "#/definitions/book"
293 },
294 "type": "array"
295 }
296 },
297 "required": [
298 "books"
299 ],
300 "type": "object"
301 },
302 "listShelvesResponse": {
303 "properties": {
304 "shelves": {
305 "items": {
306 "$ref": "#/definitions/shelf"
307 },
308 "type": "array"
309 }
310 },
311 "type": "object"
312 },
313 "shelf": {
314 "properties": {
315 "name": {
316 "type": "string"
317 },
318 "theme": {
319 "type": "string"
320 }
321 },
322 "required": [
323 "name",
324 "theme"
325 ]
326 },
327 "error": {
328 "required": [
329 "code",
330 "message"
331 ],
332 "properties": {
333 "code": {
334 "type": "integer",
335 "format": "int32"
336 },
337 "message": {
338 "type": "string"
339 }
340 }
341 }
342 },
343 "security": [
344 {
345 "api_key": [
346
347 ]
348 }
349 ],
350 "securityDefinitions": {
351 "api_key": {
352 "in": "query",
353 "name": "key",
354 "type": "apiKey"
355 }
356 }
357 }