· 6 years ago · Mar 16, 2020, 02:12 PM
1swagger: '2.0'
2info:
3 description: >-
4 This is a sample server store server. You can find out more about
5 Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net,
6 #swagger](http://swagger.io/irc/). For this sample, you can use the api
7 key `special-key` to test the authorization filters.
8 version: 1.0.0
9 title: Портал по заказу корпоративной символики
10host: sampleurl.swagger.io
11basePath: /v2
12schemes:
13 - https
14 - http
15paths:
16 /store/order:
17 post:
18 tags:
19 - store
20 summary: Place an order for an item
21 description: ''
22 operationId: placeOrder
23 produces:
24 - application/xml
25 - application/json
26 parameters:
27 - in: body
28 name: body
29 description: order placed for purchasing the item
30 required: true
31 schema:
32 $ref: '#/definitions/Order'
33 responses:
34 '200':
35 description: successful operation
36 schema:
37 $ref: '#/definitions/Order'
38 '400':
39 description: Invalid Order
40 '/store/order/{orderId}':
41 get:
42 tags:
43 - store
44 summary: Find purchase order by ID
45 description: >-
46 For valid response try integer IDs with value >= 1 and <= 10.
47 Other values will generated exceptions
48 operationId: getOrderById
49 produces:
50 - application/xml
51 - application/json
52 parameters:
53 - name: orderId
54 in: path
55 description: ID of item that needs to be fetched
56 required: true
57 type: integer
58 maximum: 10
59 minimum: 1
60 format: int64
61 responses:
62 '200':
63 description: successful operation
64 schema:
65 $ref: '#/definitions/Order'
66 '400':
67 description: Invalid ID supplied
68 '404':
69 description: Order not found
70 delete:
71 tags:
72 - store
73 summary: Delete purchase order by ID
74 description: >-
75 For valid response try integer IDs with positive integer value.
76 Negative or non-integer values will generate API errors
77 operationId: deleteOrder
78 produces:
79 - application/xml
80 - application/json
81 parameters:
82 - name: orderId
83 in: path
84 description: ID of the order that needs to be deleted
85 required: true
86 type: integer
87 minimum: 1
88 format: int64
89 responses:
90 '400':
91 description: Invalid ID supplied
92 '404':
93 description: Order not found
94 put:
95 tags:
96 - store
97 summary: Update purchase order by order id
98 description: This can only be done by the logged in user.
99 operationId: updateOrder
100 produces:
101 - application/xml
102 - application/json
103 parameters:
104 - name: orderId
105 in: path
106 description: order that needs to be updated
107 required: true
108 type: string
109 - in: body
110 name: body
111 description: Updated order object
112 required: true
113 schema:
114 $ref: '#/definitions/Order'
115 responses:
116 '400':
117 description: Invalid Client supplied
118 '404':
119 description: Client not found
120 /client:
121 post:
122 tags:
123 - client
124 summary: Create a client
125 description: This can only be done by the logged in user.
126 operationId: createClient
127 produces:
128 - application/xml
129 - application/json
130 parameters:
131 - in: body
132 name: body
133 description: Created user object
134 required: true
135 schema:
136 $ref: '#/definitions/Client'
137 responses:
138 default:
139 description: successful operation
140 '/client/{sigmaId}':
141 get:
142 tags:
143 - client
144 summary: Get client by sigma Id
145 description: ''
146 operationId: getClientBySigmaId
147 produces:
148 - application/xml
149 - application/json
150 parameters:
151 - name: sigmaId
152 in: path
153 description: 'The name that needs to be fetched. Use user1 for testing. '
154 required: true
155 type: string
156 responses:
157 '200':
158 description: successful operation
159 schema:
160 $ref: '#/definitions/Client'
161 '400':
162 description: Invalid username supplied
163 '404':
164 description: User not found
165 put:
166 tags:
167 - client
168 summary: Updated client
169 description: This can only be done by the logged in user.
170 operationId: updateClient
171 produces:
172 - application/xml
173 - application/json
174 parameters:
175 - name: sigmaId
176 in: path
177 description: name that need to be updated
178 required: true
179 type: string
180 - in: body
181 name: body
182 description: Updated user object
183 required: true
184 schema:
185 $ref: '#/definitions/Client'
186 responses:
187 '400':
188 description: Invalid Client supplied
189 '404':
190 description: Client not found
191 delete:
192 tags:
193 - client
194 summary: Delete client
195 description: This can only be done by the logged in user.
196 operationId: deleteClient
197 produces:
198 - application/xml
199 - application/json
200 parameters:
201 - name: sigmaId
202 in: path
203 description: The name that needs to be deleted
204 required: true
205 type: string
206 responses:
207 '400':
208 description: Invalid username supplied
209 '404':
210 description: User not found
211securityDefinitions:
212 itemsstore_auth:
213 type: oauth2
214 authorizationUrl: 'http://store.swagger.io/oauth/dialog'
215 flow: implicit
216 scopes:
217 'write:items': modify items in your account
218 'read:items': read your items
219 api_key:
220 type: apiKey
221 name: api_key
222 in: header
223definitions:
224 Order:
225 type: object
226 properties:
227 id:
228 type: integer
229 format: int64
230 sigmaId:
231 type: integer
232 format: int64
233 quantity:
234 type: integer
235 format: int32
236 shipDate:
237 type: string
238 format: date-time
239 status:
240 type: string
241 description: Order Status
242 enum:
243 - placed
244 - approved
245 - delivered
246 complete:
247 type: boolean
248 default: false
249 xml:
250 name: Order
251 Client:
252 type: object
253 properties:
254 id:
255 type: integer
256 format: int64
257 sigmaId:
258 type: string
259 firstName:
260 type: string
261 lastName:
262 type: string
263 email:
264 type: string
265 password:
266 type: string
267 phone:
268 type: string
269 userStatus:
270 type: integer
271 format: int32
272 description: User Status
273 xml:
274 name: User
275 ApiResponse:
276 type: object
277 properties:
278 code:
279 type: integer
280 format: int32
281 type:
282 type: string
283 message:
284 type: string
285externalDocs:
286 description: Find out more about Swagger
287 url: 'http://swagger.io'