· 6 years ago · Mar 16, 2020, 12:30 PM
1{
2 "swagger": "2.0",
3 "info": {
4 "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.",
5 "version": "1.0.0",
6 "title": "Портал по заказу корпоративной символики"
7 },
8 "host": "sampleurl.swagger.io",
9 "basePath": "/v2",
10 "schemes": [
11 "https",
12 "http"
13 ],
14 "paths": {
15 "/store/order": {
16 "post": {
17 "tags": [
18 "store"
19 ],
20 "summary": "Place an order for an item",
21 "description": "",
22 "operationId": "placeOrder",
23 "produces": [
24 "application/xml",
25 "application/json"
26 ],
27 "parameters": [
28 {
29 "in": "body",
30 "name": "body",
31 "description": "order placed for purchasing the pet",
32 "required": true,
33 "schema": {
34 "$ref": "#/definitions/Order"
35 }
36 }
37 ],
38 "responses": {
39 "200": {
40 "description": "successful operation",
41 "schema": {
42 "$ref": "#/definitions/Order"
43 }
44 },
45 "400": {
46 "description": "Invalid Order"
47 }
48 }
49 }
50 },
51 "/store/order/{orderId}": {
52 "get": {
53 "tags": [
54 "store"
55 ],
56 "summary": "Find purchase order by ID",
57 "description": "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions",
58 "operationId": "getOrderById",
59 "produces": [
60 "application/xml",
61 "application/json"
62 ],
63 "parameters": [
64 {
65 "name": "orderId",
66 "in": "path",
67 "description": "ID of pet that needs to be fetched",
68 "required": true,
69 "type": "integer",
70 "maximum": 10,
71 "minimum": 1,
72 "format": "int64"
73 }
74 ],
75 "responses": {
76 "200": {
77 "description": "successful operation",
78 "schema": {
79 "$ref": "#/definitions/Order"
80 }
81 },
82 "400": {
83 "description": "Invalid ID supplied"
84 },
85 "404": {
86 "description": "Order not found"
87 }
88 }
89 },
90 "delete": {
91 "tags": [
92 "store"
93 ],
94 "summary": "Delete purchase order by ID",
95 "description": "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors",
96 "operationId": "deleteOrder",
97 "produces": [
98 "application/xml",
99 "application/json"
100 ],
101 "parameters": [
102 {
103 "name": "orderId",
104 "in": "path",
105 "description": "ID of the order that needs to be deleted",
106 "required": true,
107 "type": "integer",
108 "minimum": 1,
109 "format": "int64"
110 }
111 ],
112 "responses": {
113 "400": {
114 "description": "Invalid ID supplied"
115 },
116 "404": {
117 "description": "Order not found"
118 }
119 }
120 }
121 },
122 "/client": {
123 "post": {
124 "tags": [
125 "client"
126 ],
127 "summary": "Create a client",
128 "description": "This can only be done by the logged in user.",
129 "operationId": "createClient",
130 "produces": [
131 "application/xml",
132 "application/json"
133 ],
134 "parameters": [
135 {
136 "in": "body",
137 "name": "body",
138 "description": "Created user object",
139 "required": true,
140 "schema": {
141 "$ref": "#/definitions/Client"
142 }
143 }
144 ],
145 "responses": {
146 "default": {
147 "description": "successful operation"
148 }
149 }
150 }
151 },
152 "/client/{sigma_id}": {
153 "get": {
154 "tags": [
155 "client"
156 ],
157 "summary": "Get client by sigma Id",
158 "description": "",
159 "operationId": "getClientBySigmaId",
160 "produces": [
161 "application/xml",
162 "application/json"
163 ],
164 "parameters": [
165 {
166 "name": "sigma_id",
167 "in": "path",
168 "description": "The name that needs to be fetched. Use user1 for testing. ",
169 "required": true,
170 "type": "string"
171 }
172 ],
173 "responses": {
174 "200": {
175 "description": "successful operation",
176 "schema": {
177 "$ref": "#/definitions/Client"
178 }
179 },
180 "400": {
181 "description": "Invalid username supplied"
182 },
183 "404": {
184 "description": "User not found"
185 }
186 }
187 },
188 "put": {
189 "tags": [
190 "client"
191 ],
192 "summary": "Updated client",
193 "description": "This can only be done by the logged in user.",
194 "operationId": "updateClient",
195 "produces": [
196 "application/xml",
197 "application/json"
198 ],
199 "parameters": [
200 {
201 "name": "sigma_id",
202 "in": "path",
203 "description": "name that need to be updated",
204 "required": true,
205 "type": "string"
206 },
207 {
208 "in": "body",
209 "name": "body",
210 "description": "Updated user object",
211 "required": true,
212 "schema": {
213 "$ref": "#/definitions/Client"
214 }
215 }
216 ],
217 "responses": {
218 "400": {
219 "description": "Invalid Client supplied"
220 },
221 "404": {
222 "description": "Client not found"
223 }
224 }
225 },
226 "delete": {
227 "tags": [
228 "client"
229 ],
230 "summary": "Delete client",
231 "description": "This can only be done by the logged in user.",
232 "operationId": "deleteClient",
233 "produces": [
234 "application/xml",
235 "application/json"
236 ],
237 "parameters": [
238 {
239 "name": "sigma_id",
240 "in": "path",
241 "description": "The name that needs to be deleted",
242 "required": true,
243 "type": "string"
244 }
245 ],
246 "responses": {
247 "400": {
248 "description": "Invalid username supplied"
249 },
250 "404": {
251 "description": "User not found"
252 }
253 }
254 }
255 }
256 },
257 "securityDefinitions": {
258 "petstore_auth": {
259 "type": "oauth2",
260 "authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
261 "flow": "implicit",
262 "scopes": {
263 "write:pets": "modify pets in your account",
264 "read:pets": "read your pets"
265 }
266 },
267 "api_key": {
268 "type": "apiKey",
269 "name": "api_key",
270 "in": "header"
271 }
272 },
273 "definitions": {
274 "Order": {
275 "type": "object",
276 "properties": {
277 "id": {
278 "type": "integer",
279 "format": "int64"
280 },
281 "petId": {
282 "type": "integer",
283 "format": "int64"
284 },
285 "quantity": {
286 "type": "integer",
287 "format": "int32"
288 },
289 "shipDate": {
290 "type": "string",
291 "format": "date-time"
292 },
293 "status": {
294 "type": "string",
295 "description": "Order Status",
296 "enum": [
297 "placed",
298 "approved",
299 "delivered"
300 ]
301 },
302 "complete": {
303 "type": "boolean",
304 "default": false
305 }
306 },
307 "xml": {
308 "name": "Order"
309 }
310 },
311 "Category": {
312 "type": "object",
313 "properties": {
314 "id": {
315 "type": "integer",
316 "format": "int64"
317 },
318 "name": {
319 "type": "string"
320 }
321 },
322 "xml": {
323 "name": "Category"
324 }
325 },
326 "Client": {
327 "type": "object",
328 "properties": {
329 "id": {
330 "type": "integer",
331 "format": "int64"
332 },
333 "sigma_id": {
334 "type": "string"
335 },
336 "firstName": {
337 "type": "string"
338 },
339 "lastName": {
340 "type": "string"
341 },
342 "email": {
343 "type": "string"
344 },
345 "password": {
346 "type": "string"
347 },
348 "phone": {
349 "type": "string"
350 },
351 "userStatus": {
352 "type": "integer",
353 "format": "int32",
354 "description": "User Status"
355 }
356 },
357 "xml": {
358 "name": "User"
359 }
360 },
361 "ApiResponse": {
362 "type": "object",
363 "properties": {
364 "code": {
365 "type": "integer",
366 "format": "int32"
367 },
368 "type": {
369 "type": "string"
370 },
371 "message": {
372 "type": "string"
373 }
374 }
375 }
376 },
377 "externalDocs": {
378 "description": "Find out more about Swagger",
379 "url": "http://swagger.io"
380 }
381}