...
1swagger: '2.0'
2info:
3 version: 1.0.0
4 title: 'Test'
5schemes:
6 - http
7produces:
8 - application/vnd.cia.v1+json
9
10paths:
11 /pets:
12 get:
13 description: Returns all pets from the system that the user has access to
14 operationId: findPets
15 parameters:
16 - name: tags
17 in: query
18 description: tags to filter by
19 required: false
20 type: array
21 items:
22 type: string
23 collectionFormat: csv
24 - name: limit
25 in: query
26 description: maximum number of results to return
27 required: false
28 type: integer
29 format: int32
30 responses:
31 '200':
32 description: pet response
33 schema:
34 type: array
35 items:
36 $ref: '#/definitions/pet'
37 default:
38 description: unexpected error
39 schema:
40 $ref: '#/definitions/errorModel'
41
42 post:
43 description: Creates a new pet in the store. Duplicates are allowed
44 operationId: addPet
45 consumes:
46 - application/vnd.cia.v1+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