· 6 years ago · Nov 28, 2019, 04:56 PM
1{
2 "swagger" : "2.0",
3 "host" : "api-dev.boehringer-ingelheim.com:8443",
4 "basePath" : "/PetstoreDEMO/v2",
5 "schemes" : [ "https" ],
6 "paths" : {
7 "/pet" : {
8 "put" : {
9 "description" : "",
10 "operationId" : "updatePet",
11 "summary" : "Update an existing pet",
12 "consumes" : [ "application/json", "application/xml" ],
13 "produces" : [ "application/json", "application/xml" ],
14 "parameters" : [ {
15 "description" : "Pet object that needs to be added to the store",
16 "required" : true,
17 "in" : "body",
18 "name" : "body",
19 "schema" : {
20 "$ref" : "#/definitions/Pet"
21 }
22 } ],
23 "responses" : {
24 "400" : {
25 "description" : "Invalid ID supplied"
26 },
27 "404" : {
28 "description" : "Pet not found"
29 },
30 "405" : {
31 "description" : "Validation exception"
32 }
33 }
34 },
35 "post" : {
36 "description" : "",
37 "operationId" : "addPet",
38 "summary" : "Add a new pet to the store",
39 "consumes" : [ "application/json", "application/xml" ],
40 "produces" : [ "application/json", "application/xml" ],
41 "parameters" : [ {
42 "description" : "Pet object that needs to be added to the store",
43 "required" : true,
44 "in" : "body",
45 "name" : "body",
46 "schema" : {
47 "$ref" : "#/definitions/Pet"
48 }
49 } ],
50 "responses" : {
51 "405" : {
52 "description" : "Invalid input"
53 }
54 }
55 }
56 },
57 "/user/{username}" : {
58 "get" : {
59 "description" : "",
60 "operationId" : "getUserByName",
61 "summary" : "Get user by user name",
62 "produces" : [ "application/json", "application/xml" ],
63 "parameters" : [ {
64 "description" : "The name that needs to be fetched. Use user1 for testing. ",
65 "required" : true,
66 "in" : "path",
67 "name" : "username",
68 "type" : "string"
69 } ],
70 "responses" : {
71 "200" : {
72 "description" : "successful operation",
73 "schema" : {
74 "$ref" : "#/definitions/User"
75 }
76 },
77 "400" : {
78 "description" : "Invalid username supplied"
79 },
80 "404" : {
81 "description" : "User not found"
82 }
83 }
84 },
85 "put" : {
86 "description" : "This can only be done by the logged in user.",
87 "operationId" : "updateUser",
88 "summary" : "Updated user",
89 "consumes" : [ "application/json" ],
90 "produces" : [ "application/json", "application/xml" ],
91 "parameters" : [ {
92 "description" : "name that need to be updated",
93 "required" : true,
94 "in" : "path",
95 "name" : "username",
96 "type" : "string"
97 }, {
98 "description" : "Updated user object",
99 "required" : true,
100 "in" : "body",
101 "name" : "body",
102 "schema" : {
103 "$ref" : "#/definitions/User"
104 }
105 } ],
106 "responses" : {
107 "400" : {
108 "description" : "Invalid user supplied"
109 },
110 "404" : {
111 "description" : "User not found"
112 }
113 }
114 },
115 "delete" : {
116 "description" : "This can only be done by the logged in user.",
117 "operationId" : "deleteUser",
118 "summary" : "Delete user",
119 "produces" : [ "application/json", "application/xml" ],
120 "parameters" : [ {
121 "description" : "The name that needs to be deleted",
122 "required" : true,
123 "in" : "path",
124 "name" : "username",
125 "type" : "string"
126 } ],
127 "responses" : {
128 "400" : {
129 "description" : "Invalid username supplied"
130 },
131 "404" : {
132 "description" : "User not found"
133 }
134 }
135 }
136 },
137 "/pet/findByStatus" : {
138 "get" : {
139 "description" : "Multiple status values can be provided with comma separated strings",
140 "operationId" : "findPetsByStatus",
141 "summary" : "Finds Pets by status",
142 "produces" : [ "application/json", "application/xml" ],
143 "parameters" : [ {
144 "description" : "Status values that need to be considered for filter",
145 "required" : true,
146 "items" : {
147 "type" : "string"
148 },
149 "in" : "query",
150 "name" : "status",
151 "type" : "array"
152 } ],
153 "responses" : {
154 "200" : {
155 "description" : "successful operation",
156 "schema" : {
157 "items" : {
158 "$ref" : "#/definitions/Pet"
159 },
160 "type" : "array"
161 }
162 },
163 "400" : {
164 "description" : "Invalid status value"
165 }
166 }
167 }
168 },
169 "/user/createWithList" : {
170 "post" : {
171 "description" : "",
172 "operationId" : "createUsersWithListInput",
173 "summary" : "Creates list of users with given input array",
174 "consumes" : [ "application/json" ],
175 "produces" : [ "application/json", "application/xml" ],
176 "parameters" : [ {
177 "description" : "List of user object",
178 "required" : true,
179 "in" : "body",
180 "name" : "body",
181 "schema" : {
182 "items" : {
183 "$ref" : "#/definitions/User"
184 },
185 "type" : "array"
186 }
187 } ],
188 "responses" : {
189 "default" : {
190 "description" : "successful operation"
191 }
192 }
193 }
194 },
195 "/pet/{petId}/uploadImage" : {
196 "post" : {
197 "description" : "",
198 "operationId" : "uploadFile",
199 "summary" : "uploads an image",
200 "consumes" : [ "multipart/form-data" ],
201 "produces" : [ "application/json" ],
202 "parameters" : [ {
203 "description" : "ID of pet to update",
204 "format" : "int64",
205 "required" : true,
206 "in" : "path",
207 "name" : "petId",
208 "type" : "integer"
209 }, {
210 "description" : "Additional data to pass to server",
211 "required" : false,
212 "in" : "formData",
213 "name" : "additionalMetadata",
214 "type" : "string"
215 }, {
216 "description" : "file to upload",
217 "required" : false,
218 "in" : "formData",
219 "name" : "file",
220 "type" : "file"
221 } ],
222 "responses" : {
223 "200" : {
224 "description" : "successful operation",
225 "schema" : {
226 "$ref" : "#/definitions/ApiResponse"
227 }
228 }
229 }
230 }
231 },
232 "/user/login" : {
233 "get" : {
234 "description" : "",
235 "operationId" : "loginUser",
236 "summary" : "Logs user into the system",
237 "produces" : [ "application/json", "application/xml" ],
238 "parameters" : [ {
239 "description" : "The user name for login",
240 "required" : true,
241 "in" : "query",
242 "name" : "username",
243 "type" : "string"
244 }, {
245 "description" : "The password for login in clear text",
246 "required" : true,
247 "in" : "query",
248 "name" : "password",
249 "type" : "string"
250 } ],
251 "responses" : {
252 "200" : {
253 "description" : "successful operation",
254 "schema" : {
255 "type" : "string"
256 }
257 },
258 "400" : {
259 "description" : "Invalid username/password supplied"
260 }
261 }
262 }
263 },
264 "/store/inventory" : {
265 "get" : {
266 "description" : "Returns a map of status codes to quantities",
267 "operationId" : "getInventory",
268 "summary" : "Returns pet inventories by status",
269 "produces" : [ "application/json" ],
270 "responses" : {
271 "200" : {
272 "description" : "successful operation",
273 "schema" : {
274 "type" : "object"
275 }
276 }
277 }
278 }
279 },
280 "/user" : {
281 "post" : {
282 "description" : "This can only be done by the logged in user.",
283 "operationId" : "createUser",
284 "summary" : "Create user",
285 "consumes" : [ "application/json" ],
286 "produces" : [ "application/json", "application/xml" ],
287 "parameters" : [ {
288 "description" : "Created user object",
289 "required" : true,
290 "in" : "body",
291 "name" : "body",
292 "schema" : {
293 "$ref" : "#/definitions/User"
294 }
295 } ],
296 "responses" : {
297 "default" : {
298 "description" : "successful operation"
299 }
300 }
301 }
302 },
303 "/user/createWithArray" : {
304 "post" : {
305 "description" : "",
306 "operationId" : "createUsersWithArrayInput",
307 "summary" : "Creates list of users with given input array",
308 "consumes" : [ "application/json" ],
309 "produces" : [ "application/json", "application/xml" ],
310 "parameters" : [ {
311 "description" : "List of user object",
312 "required" : true,
313 "in" : "body",
314 "name" : "body",
315 "schema" : {
316 "items" : {
317 "$ref" : "#/definitions/User"
318 },
319 "type" : "array"
320 }
321 } ],
322 "responses" : {
323 "default" : {
324 "description" : "successful operation"
325 }
326 }
327 }
328 },
329 "/pet/findByTags" : {
330 "get" : {
331 "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
332 "operationId" : "findPetsByTags",
333 "summary" : "Finds Pets by tags",
334 "produces" : [ "application/json", "application/xml" ],
335 "parameters" : [ {
336 "description" : "Tags to filter by",
337 "required" : true,
338 "items" : {
339 "type" : "string"
340 },
341 "in" : "query",
342 "name" : "tags",
343 "type" : "array"
344 } ],
345 "responses" : {
346 "200" : {
347 "description" : "successful operation",
348 "schema" : {
349 "items" : {
350 "$ref" : "#/definitions/Pet"
351 },
352 "type" : "array"
353 }
354 },
355 "400" : {
356 "description" : "Invalid tag value"
357 }
358 }
359 }
360 },
361 "/user/logout" : {
362 "get" : {
363 "description" : "",
364 "operationId" : "logoutUser",
365 "summary" : "Logs out current logged in user session",
366 "produces" : [ "application/json", "application/xml" ],
367 "responses" : {
368 "default" : {
369 "description" : "successful operation"
370 }
371 }
372 }
373 },
374 "/store/order" : {
375 "post" : {
376 "description" : "",
377 "operationId" : "placeOrder",
378 "summary" : "Place an order for a pet",
379 "consumes" : [ "application/json" ],
380 "produces" : [ "application/json", "application/xml" ],
381 "parameters" : [ {
382 "description" : "order placed for purchasing the pet",
383 "required" : true,
384 "in" : "body",
385 "name" : "body",
386 "schema" : {
387 "$ref" : "#/definitions/Order"
388 }
389 } ],
390 "responses" : {
391 "200" : {
392 "description" : "successful operation",
393 "schema" : {
394 "$ref" : "#/definitions/Order"
395 }
396 },
397 "400" : {
398 "description" : "Invalid Order"
399 }
400 }
401 }
402 },
403 "/pet/{petId}" : {
404 "get" : {
405 "description" : "Returns a single pet",
406 "operationId" : "getPetById",
407 "summary" : "Find pet by ID",
408 "produces" : [ "application/json", "application/xml" ],
409 "parameters" : [ {
410 "description" : "ID of pet to return",
411 "format" : "int64",
412 "required" : true,
413 "in" : "path",
414 "name" : "petId",
415 "type" : "integer"
416 } ],
417 "responses" : {
418 "200" : {
419 "description" : "successful operation",
420 "schema" : {
421 "$ref" : "#/definitions/Pet"
422 }
423 },
424 "400" : {
425 "description" : "Invalid ID supplied"
426 },
427 "404" : {
428 "description" : "Pet not found"
429 }
430 }
431 },
432 "post" : {
433 "description" : "",
434 "operationId" : "updatePetWithForm",
435 "summary" : "Updates a pet in the store with form data",
436 "consumes" : [ "application/x-www-form-urlencoded" ],
437 "produces" : [ "application/json", "application/xml" ],
438 "parameters" : [ {
439 "description" : "ID of pet that needs to be updated",
440 "format" : "int64",
441 "required" : true,
442 "in" : "path",
443 "name" : "petId",
444 "type" : "integer"
445 }, {
446 "description" : "Updated name of the pet",
447 "required" : false,
448 "in" : "formData",
449 "name" : "name",
450 "type" : "string"
451 }, {
452 "description" : "Updated status of the pet",
453 "required" : false,
454 "in" : "formData",
455 "name" : "status",
456 "type" : "string"
457 } ],
458 "responses" : {
459 "405" : {
460 "description" : "Invalid input"
461 }
462 }
463 },
464 "delete" : {
465 "description" : "",
466 "operationId" : "deletePet",
467 "summary" : "Deletes a pet",
468 "produces" : [ "application/json", "application/xml" ],
469 "parameters" : [ {
470 "required" : false,
471 "in" : "header",
472 "name" : "api_key",
473 "type" : "string"
474 }, {
475 "description" : "Pet id to delete",
476 "format" : "int64",
477 "required" : true,
478 "in" : "path",
479 "name" : "petId",
480 "type" : "integer"
481 } ],
482 "responses" : {
483 "400" : {
484 "description" : "Invalid ID supplied"
485 },
486 "404" : {
487 "description" : "Pet not found"
488 }
489 }
490 }
491 },
492 "/store/order/{orderId}" : {
493 "get" : {
494 "description" : "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions",
495 "operationId" : "getOrderById",
496 "summary" : "Find purchase order by ID",
497 "produces" : [ "application/json", "application/xml" ],
498 "parameters" : [ {
499 "description" : "ID of pet that needs to be fetched",
500 "format" : "int64",
501 "required" : true,
502 "in" : "path",
503 "name" : "orderId",
504 "type" : "integer"
505 } ],
506 "responses" : {
507 "200" : {
508 "description" : "successful operation",
509 "schema" : {
510 "$ref" : "#/definitions/Order"
511 }
512 },
513 "400" : {
514 "description" : "Invalid ID supplied"
515 },
516 "404" : {
517 "description" : "Order not found"
518 }
519 }
520 },
521 "delete" : {
522 "description" : "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors",
523 "operationId" : "deleteOrder",
524 "summary" : "Delete purchase order by ID",
525 "produces" : [ "application/json", "application/xml" ],
526 "parameters" : [ {
527 "description" : "ID of the order that needs to be deleted",
528 "format" : "int64",
529 "required" : true,
530 "in" : "path",
531 "name" : "orderId",
532 "type" : "integer"
533 } ],
534 "responses" : {
535 "400" : {
536 "description" : "Invalid ID supplied"
537 },
538 "404" : {
539 "description" : "Order not found"
540 }
541 }
542 }
543 }
544 },
545 "definitions" : {
546 "Order" : {
547 "properties" : {
548 "id" : {
549 "format" : "int64",
550 "type" : "integer"
551 },
552 "petId" : {
553 "format" : "int64",
554 "type" : "integer"
555 },
556 "quantity" : {
557 "format" : "int32",
558 "type" : "integer"
559 },
560 "shipDate" : {
561 "format" : "date-time",
562 "type" : "string"
563 },
564 "status" : {
565 "description" : "Order Status",
566 "type" : "string"
567 },
568 "complete" : {
569 "type" : "boolean"
570 }
571 },
572 "type" : "object"
573 },
574 "Category" : {
575 "properties" : {
576 "id" : {
577 "format" : "int64",
578 "type" : "integer"
579 },
580 "name" : {
581 "type" : "string"
582 }
583 },
584 "type" : "object"
585 },
586 "User" : {
587 "properties" : {
588 "id" : {
589 "format" : "int64",
590 "type" : "integer"
591 },
592 "username" : {
593 "type" : "string"
594 },
595 "firstName" : {
596 "type" : "string"
597 },
598 "lastName" : {
599 "type" : "string"
600 },
601 "email" : {
602 "type" : "string"
603 },
604 "password" : {
605 "type" : "string"
606 },
607 "phone" : {
608 "type" : "string"
609 },
610 "userStatus" : {
611 "description" : "User Status",
612 "format" : "int32",
613 "type" : "integer"
614 }
615 },
616 "type" : "object"
617 },
618 "Tag" : {
619 "properties" : {
620 "id" : {
621 "format" : "int64",
622 "type" : "integer"
623 },
624 "name" : {
625 "type" : "string"
626 }
627 },
628 "type" : "object"
629 },
630 "Pet" : {
631 "required" : [ "name", "photoUrls" ],
632 "properties" : {
633 "id" : {
634 "format" : "int64",
635 "type" : "integer"
636 },
637 "category" : {
638 "$ref" : "#/definitions/Category"
639 },
640 "name" : {
641 "example" : "doggie",
642 "type" : "string"
643 },
644 "photoUrls" : {
645 "items" : {
646 "type" : "string"
647 },
648 "type" : "array"
649 },
650 "tags" : {
651 "items" : {
652 "$ref" : "#/definitions/Tag"
653 },
654 "type" : "array"
655 },
656 "status" : {
657 "description" : "pet status in the store",
658 "type" : "string"
659 }
660 },
661 "type" : "object"
662 },
663 "ApiResponse" : {
664 "properties" : {
665 "code" : {
666 "format" : "int32",
667 "type" : "integer"
668 },
669 "type" : {
670 "type" : "string"
671 },
672 "message" : {
673 "type" : "string"
674 }
675 },
676 "type" : "object"
677 }
678 },
679 "securityDefinitions" : {
680 "OAuthImplicit" : {
681 "type" : "oauth2",
682 "description" : "OAuth",
683 "flow" : "implicit",
684 "scopes" : {
685 "resource.WRITE" : "",
686 "resource.READ" : ""
687 },
688 "authorizationUrl" : "https://localhost:8089/api/oauth/authorize"
689 },
690 "OAuthAccessCode" : {
691 "type" : "oauth2",
692 "description" : "OAuth",
693 "flow" : "accessCode",
694 "scopes" : {
695 "resource.WRITE" : "",
696 "resource.READ" : ""
697 },
698 "authorizationUrl" : "https://localhost:8089/api/oauth/authorize",
699 "tokenUrl" : "https://localhost:8089/api/oauth/token"
700 }
701 },
702 "security" : [ {
703 "OAuthImplicit" : [ "resource.WRITE" ]
704 }, {
705 "OAuthImplicit" : [ "resource.READ" ]
706 }, {
707 "OAuthAccessCode" : [ "resource.WRITE" ]
708 }, {
709 "OAuthAccessCode" : [ "resource.READ" ]
710 } ],
711 "info" : {
712 "title" : "PetStore DEMO",
713 "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.",
714 "version" : "1.0.3"
715 },
716 "x-axway" : {
717 "corsEnabled" : true,
718 "basePaths" : [ "" ],
719 "serviceType" : "rest",
720 "deprecated" : false,
721 "tags" : { }
722 }
723}