-
Notifications
You must be signed in to change notification settings - Fork 6k
Expand file tree
/
Copy pathpet.yml
More file actions
181 lines (181 loc) · 4.51 KB
/
pet.yml
File metadata and controls
181 lines (181 loc) · 4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
apiVersion: 1.0.0
swaggerVersion: "1.2"
basePath: "http://localhost:8002/api"
resourcePath: /pet
produces:
- application/json
- application/xml
- text/plain
- text/html
apis:
- path: "/pet/{petId}"
operations:
- method: GET
summary: Find pet by ID
notes: Returns a pet based on ID
type: Pet
nickname: getPetById
produces:
- application/json
- application/xml
authorizations:
- oauth2
parameters:
- name: petId
description: ID of pet that needs to be fetched
required: true
allowMultiple: false
type: string
paramType: path
responseMessages:
- code: 400
message: Invalid ID supplied
- code: 404
message: Pet not found
- method: DELETE
summary: Deletes a pet
notes: ""
type: void
nickname: deletePet
parameters:
- name: petId
description: Pet id to delete
required: true
allowMultiple: false
type: string
paramType: path
responseMessages:
- code: 400
message: Invalid pet value
- path: /pet
operations:
- method: POST
summary: Add a new pet to the store
notes: ""
type: void
nickname: addPet
parameters:
- name: body
description: Pet object that needs to be added to the store
required: true
allowMultiple: false
type: Pet
paramType: body
responseMessages:
- code: 405
message: Invalid input
- method: PUT
summary: Update an existing pet
notes: ""
type: void
nickname: updatePet
parameters:
- name: body
description: Pet object that needs to be updated in the store
required: true
allowMultiple: false
type: Pet
paramType: body
responseMessages:
- code: 400
message: Invalid ID supplied
- code: 404
message: Pet not found
- code: 405
message: Validation exception
- path: /pet/findByStatus
operations:
- method: GET
summary: Finds Pets by status
notes: Multiple status values can be provided with comma separated strings
type: array
items:
$ref: Pet
nickname: findPetsByStatus
produces:
- application/json
- application/xml
parameters:
- name: status
description: Status values that need to be considered for filter
defaultValue: available
required: true
allowMultiple: true
type: string
paramType: query
enum:
- available
- pending
- sold
responseMessages:
- code: 400
message: Invalid status value
- path: /pet/findByTags
operations:
- method: GET
summary: Finds Pets by tags
notes: "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
type: array
items:
$ref: Pet
nickname: findPetsByTags
produces:
- application/json
- application/xml
parameters:
- name: tags
description: Tags to filter by
required: true
allowMultiple: true
type: string
paramType: query
responseMessages:
- code: 400
message: Invalid tag value
deprecated: "true"
models:
Tag:
id: Tag
properties:
name:
type: string
id:
type: integer
format: int64
Pet:
id: Pet
description: "A pet is a person's best friend"
required:
- id
- name
properties:
id:
type: integer
format: int64
tags:
type: array
items:
$ref: Tag
name:
type: string
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
category:
$ref: Category
photoUrls:
type: array
items:
type: string
Category:
id: Category
properties:
name:
type: string
id:
type: integer
format: int64