...
1swagger: '2.0'
2info:
3 version: 1.0.0
4 title: 'Test'
5schemes:
6 - http
7
8paths:
9 /pets:
10 get:
11 description: Returns all pets from the system that the user has access to
12 operationId: findPets
13 parameters:
14 - name: tags
15 in: query
16 description: tags to filter by
17 required: false
18 type: array
19 items:
20 type: string
21 collectionFormat: csv
22 - name: limit
23 in: query
24 description: maximum number of results to return
25 required: false
26 type: integer
27 format: int32
28 responses:
29 '200':
30 description: pet response
31 schema:
32 type: array
33 items:
34 $ref: '#/definitions/pet'
35 default:
36 description: unexpected error
37 schema:
38 $ref: '#/definitions/errorModel'
39
40 post:
41 description: Creates a new pet in the store. Duplicates are allowed
42 operationId: addPet
43 consumes:
44 - application/json
45 produces:
46 - application/json
47 parameters:
48 - name: pet
49 in: body
50 description: Pet to add to the store
51 required: true
52 schema:
53 $ref: '#/definitions/newPet'
54 responses:
55 '200':
56 description: pet response
57 schema:
58 $ref: '#/definitions/pet'
59 default:
60 description: unexpected error
61 schema:
62 $ref: '#/definitions/errorModel'
63
64definitions:
65 pet:
66 required:
67 - id
68 - name
69 properties:
70 id:
71 type: integer
72 format: int64
73 name:
74 type: string
75 tag:
76 type: string
77
78 newPet:
79 allOf:
80 - $ref: '#/definitions/pet'
81 - required:
82 - name
83 properties:
84 id:
85 type: integer
86 format: int64
87 name:
88 type: string
89
90 errorModel:
91 required:
92 - code
93 - message
94 properties:
95 code:
96 type: integer
97 format: int32
98 message:
99 type: string
View as plain text