ASCP_API

Форк
0
/
swagger.yaml 
718 строк · 17.3 Кб
1
---
2
swagger: "2.0"
3
info:
4
  description: "This is a sample server Petstore server.  You can find out more about\
5
    \ Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\
6
    \  For this sample, you can use the api key `special-key` to test the authorization\
7
    \ filters."
8
  version: "1.0.5"
9
  title: "Swagger Petstore"
10
  termsOfService: "http://swagger.io/terms/"
11
  contact:
12
    email: "apiteam@swagger.io"
13
  license:
14
    name: "Apache 2.0"
15
    url: "http://www.apache.org/licenses/LICENSE-2.0.html"
16
host: "petstore.swagger.io"
17
basePath: "/v2"
18
tags:
19
- name: "pet"
20
  description: "Everything about your Pets"
21
  externalDocs:
22
    description: "Find out more"
23
    url: "http://swagger.io"
24
- name: "store"
25
  description: "Access to Petstore orders"
26
- name: "user"
27
  description: "Operations about user"
28
  externalDocs:
29
    description: "Find out more about our store"
30
    url: "http://swagger.io"
31
schemes:
32
- "https"
33
- "http"
34
paths:
35
  /pet/{petId}/uploadImage:
36
    post:
37
      tags:
38
      - "pet"
39
      summary: "uploads an image"
40
      description: ""
41
      operationId: "uploadFile"
42
      consumes:
43
      - "multipart/form-data"
44
      produces:
45
      - "application/json"
46
      parameters:
47
      - name: "petId"
48
        in: "path"
49
        description: "ID of pet to update"
50
        required: true
51
        type: "integer"
52
        format: "int64"
53
      - name: "additionalMetadata"
54
        in: "formData"
55
        description: "Additional data to pass to server"
56
        required: false
57
        type: "string"
58
      - name: "file"
59
        in: "formData"
60
        description: "file to upload"
61
        required: false
62
        type: "file"
63
      responses:
64
        200:
65
          description: "successful operation"
66
          schema:
67
            $ref: "#/definitions/ApiResponse"
68
      security:
69
      - petstore_auth:
70
        - "write:pets"
71
        - "read:pets"
72
  /pet:
73
    post:
74
      tags:
75
      - "pet"
76
      summary: "Add a new pet to the store"
77
      description: ""
78
      operationId: "addPet"
79
      consumes:
80
      - "application/json"
81
      - "application/xml"
82
      produces:
83
      - "application/json"
84
      - "application/xml"
85
      parameters:
86
      - in: "body"
87
        name: "body"
88
        description: "Pet object that needs to be added to the store"
89
        required: true
90
        schema:
91
          $ref: "#/definitions/Pet"
92
      responses:
93
        405:
94
          description: "Invalid input"
95
      security:
96
      - petstore_auth:
97
        - "write:pets"
98
        - "read:pets"
99
    put:
100
      tags:
101
      - "pet"
102
      summary: "Update an existing pet"
103
      description: ""
104
      operationId: "updatePet"
105
      consumes:
106
      - "application/json"
107
      - "application/xml"
108
      produces:
109
      - "application/json"
110
      - "application/xml"
111
      parameters:
112
      - in: "body"
113
        name: "body"
114
        description: "Pet object that needs to be added to the store"
115
        required: true
116
        schema:
117
          $ref: "#/definitions/Pet"
118
      responses:
119
        400:
120
          description: "Invalid ID supplied"
121
        404:
122
          description: "Pet not found"
123
        405:
124
          description: "Validation exception"
125
      security:
126
      - petstore_auth:
127
        - "write:pets"
128
        - "read:pets"
129
  /pet/findByStatus:
130
    get:
131
      tags:
132
      - "pet"
133
      summary: "Finds Pets by status"
134
      description: "Multiple status values can be provided with comma separated strings"
135
      operationId: "findPetsByStatus"
136
      produces:
137
      - "application/json"
138
      - "application/xml"
139
      parameters:
140
      - name: "status"
141
        in: "query"
142
        description: "Status values that need to be considered for filter"
143
        required: true
144
        type: "array"
145
        items:
146
          type: "string"
147
          enum:
148
          - "available"
149
          - "pending"
150
          - "sold"
151
          default: "available"
152
        collectionFormat: "multi"
153
      responses:
154
        200:
155
          description: "successful operation"
156
          schema:
157
            type: "array"
158
            items:
159
              $ref: "#/definitions/Pet"
160
        400:
161
          description: "Invalid status value"
162
      security:
163
      - petstore_auth:
164
        - "write:pets"
165
        - "read:pets"
166
  /pet/findByTags:
167
    get:
168
      tags:
169
      - "pet"
170
      summary: "Finds Pets by tags"
171
      description: "Multiple tags can be provided with comma separated strings. Use\
172
        \ tag1, tag2, tag3 for testing."
173
      operationId: "findPetsByTags"
174
      produces:
175
      - "application/json"
176
      - "application/xml"
177
      parameters:
178
      - name: "tags"
179
        in: "query"
180
        description: "Tags to filter by"
181
        required: true
182
        type: "array"
183
        items:
184
          type: "string"
185
        collectionFormat: "multi"
186
      responses:
187
        200:
188
          description: "successful operation"
189
          schema:
190
            type: "array"
191
            items:
192
              $ref: "#/definitions/Pet"
193
        400:
194
          description: "Invalid tag value"
195
      security:
196
      - petstore_auth:
197
        - "write:pets"
198
        - "read:pets"
199
      deprecated: true
200
  /pet/{petId}:
201
    get:
202
      tags:
203
      - "pet"
204
      summary: "Find pet by ID"
205
      description: "Returns a single pet"
206
      operationId: "getPetById"
207
      produces:
208
      - "application/json"
209
      - "application/xml"
210
      parameters:
211
      - name: "petId"
212
        in: "path"
213
        description: "ID of pet to return"
214
        required: true
215
        type: "integer"
216
        format: "int64"
217
      responses:
218
        200:
219
          description: "successful operation"
220
          schema:
221
            $ref: "#/definitions/Pet"
222
        400:
223
          description: "Invalid ID supplied"
224
        404:
225
          description: "Pet not found"
226
      security:
227
      - api_key: []
228
    post:
229
      tags:
230
      - "pet"
231
      summary: "Updates a pet in the store with form data"
232
      description: ""
233
      operationId: "updatePetWithForm"
234
      consumes:
235
      - "application/x-www-form-urlencoded"
236
      produces:
237
      - "application/json"
238
      - "application/xml"
239
      parameters:
240
      - name: "petId"
241
        in: "path"
242
        description: "ID of pet that needs to be updated"
243
        required: true
244
        type: "integer"
245
        format: "int64"
246
      - name: "name"
247
        in: "formData"
248
        description: "Updated name of the pet"
249
        required: false
250
        type: "string"
251
      - name: "status"
252
        in: "formData"
253
        description: "Updated status of the pet"
254
        required: false
255
        type: "string"
256
      responses:
257
        405:
258
          description: "Invalid input"
259
      security:
260
      - petstore_auth:
261
        - "write:pets"
262
        - "read:pets"
263
    delete:
264
      tags:
265
      - "pet"
266
      summary: "Deletes a pet"
267
      description: ""
268
      operationId: "deletePet"
269
      produces:
270
      - "application/json"
271
      - "application/xml"
272
      parameters:
273
      - name: "api_key"
274
        in: "header"
275
        required: false
276
        type: "string"
277
      - name: "petId"
278
        in: "path"
279
        description: "Pet id to delete"
280
        required: true
281
        type: "integer"
282
        format: "int64"
283
      responses:
284
        400:
285
          description: "Invalid ID supplied"
286
        404:
287
          description: "Pet not found"
288
      security:
289
      - petstore_auth:
290
        - "write:pets"
291
        - "read:pets"
292
  /store/order:
293
    post:
294
      tags:
295
      - "store"
296
      summary: "Place an order for a pet"
297
      description: ""
298
      operationId: "placeOrder"
299
      consumes:
300
      - "application/json"
301
      produces:
302
      - "application/json"
303
      - "application/xml"
304
      parameters:
305
      - in: "body"
306
        name: "body"
307
        description: "order placed for purchasing the pet"
308
        required: true
309
        schema:
310
          $ref: "#/definitions/Order"
311
      responses:
312
        200:
313
          description: "successful operation"
314
          schema:
315
            $ref: "#/definitions/Order"
316
        400:
317
          description: "Invalid Order"
318
  /store/order/{orderId}:
319
    get:
320
      tags:
321
      - "store"
322
      summary: "Find purchase order by ID"
323
      description: "For valid response try integer IDs with value >= 1 and <= 10.\
324
        \ Other values will generated exceptions"
325
      operationId: "getOrderById"
326
      produces:
327
      - "application/json"
328
      - "application/xml"
329
      parameters:
330
      - name: "orderId"
331
        in: "path"
332
        description: "ID of pet that needs to be fetched"
333
        required: true
334
        type: "integer"
335
        maximum: 10
336
        minimum: 1
337
        format: "int64"
338
      responses:
339
        200:
340
          description: "successful operation"
341
          schema:
342
            $ref: "#/definitions/Order"
343
        400:
344
          description: "Invalid ID supplied"
345
        404:
346
          description: "Order not found"
347
    delete:
348
      tags:
349
      - "store"
350
      summary: "Delete purchase order by ID"
351
      description: "For valid response try integer IDs with positive integer value.\
352
        \ Negative or non-integer values will generate API errors"
353
      operationId: "deleteOrder"
354
      produces:
355
      - "application/json"
356
      - "application/xml"
357
      parameters:
358
      - name: "orderId"
359
        in: "path"
360
        description: "ID of the order that needs to be deleted"
361
        required: true
362
        type: "integer"
363
        minimum: 1
364
        format: "int64"
365
      responses:
366
        400:
367
          description: "Invalid ID supplied"
368
        404:
369
          description: "Order not found"
370
  /store/inventory:
371
    get:
372
      tags:
373
      - "store"
374
      summary: "Returns pet inventories by status"
375
      description: "Returns a map of status codes to quantities"
376
      operationId: "getInventory"
377
      produces:
378
      - "application/json"
379
      parameters: []
380
      responses:
381
        200:
382
          description: "successful operation"
383
          schema:
384
            type: "object"
385
            additionalProperties:
386
              type: "integer"
387
              format: "int32"
388
      security:
389
      - api_key: []
390
  /user/createWithArray:
391
    post:
392
      tags:
393
      - "user"
394
      summary: "Creates list of users with given input array"
395
      description: ""
396
      operationId: "createUsersWithArrayInput"
397
      consumes:
398
      - "application/json"
399
      produces:
400
      - "application/json"
401
      - "application/xml"
402
      parameters:
403
      - in: "body"
404
        name: "body"
405
        description: "List of user object"
406
        required: true
407
        schema:
408
          type: "array"
409
          items:
410
            $ref: "#/definitions/User"
411
      responses:
412
        default:
413
          description: "successful operation"
414
  /user/createWithList:
415
    post:
416
      tags:
417
      - "user"
418
      summary: "Creates list of users with given input array"
419
      description: ""
420
      operationId: "createUsersWithListInput"
421
      consumes:
422
      - "application/json"
423
      produces:
424
      - "application/json"
425
      - "application/xml"
426
      parameters:
427
      - in: "body"
428
        name: "body"
429
        description: "List of user object"
430
        required: true
431
        schema:
432
          type: "array"
433
          items:
434
            $ref: "#/definitions/User"
435
      responses:
436
        default:
437
          description: "successful operation"
438
  /user/{username}:
439
    get:
440
      tags:
441
      - "user"
442
      summary: "Get user by user name"
443
      description: ""
444
      operationId: "getUserByName"
445
      produces:
446
      - "application/json"
447
      - "application/xml"
448
      parameters:
449
      - name: "username"
450
        in: "path"
451
        description: "The name that needs to be fetched. Use user1 for testing. "
452
        required: true
453
        type: "string"
454
      responses:
455
        200:
456
          description: "successful operation"
457
          schema:
458
            $ref: "#/definitions/User"
459
        400:
460
          description: "Invalid username supplied"
461
        404:
462
          description: "User not found"
463
    put:
464
      tags:
465
      - "user"
466
      summary: "Updated user"
467
      description: "This can only be done by the logged in user."
468
      operationId: "updateUser"
469
      consumes:
470
      - "application/json"
471
      produces:
472
      - "application/json"
473
      - "application/xml"
474
      parameters:
475
      - name: "username"
476
        in: "path"
477
        description: "name that need to be updated"
478
        required: true
479
        type: "string"
480
      - in: "body"
481
        name: "body"
482
        description: "Updated user object"
483
        required: true
484
        schema:
485
          $ref: "#/definitions/User"
486
      responses:
487
        400:
488
          description: "Invalid user supplied"
489
        404:
490
          description: "User not found"
491
    delete:
492
      tags:
493
      - "user"
494
      summary: "Delete user"
495
      description: "This can only be done by the logged in user."
496
      operationId: "deleteUser"
497
      produces:
498
      - "application/json"
499
      - "application/xml"
500
      parameters:
501
      - name: "username"
502
        in: "path"
503
        description: "The name that needs to be deleted"
504
        required: true
505
        type: "string"
506
      responses:
507
        400:
508
          description: "Invalid username supplied"
509
        404:
510
          description: "User not found"
511
  /user/login:
512
    get:
513
      tags:
514
      - "user"
515
      summary: "Logs user into the system"
516
      description: ""
517
      operationId: "loginUser"
518
      produces:
519
      - "application/json"
520
      - "application/xml"
521
      parameters:
522
      - name: "username"
523
        in: "query"
524
        description: "The user name for login"
525
        required: true
526
        type: "string"
527
      - name: "password"
528
        in: "query"
529
        description: "The password for login in clear text"
530
        required: true
531
        type: "string"
532
      responses:
533
        200:
534
          description: "successful operation"
535
          headers:
536
            X-Expires-After:
537
              type: "string"
538
              format: "date-time"
539
              description: "date in UTC when token expires"
540
            X-Rate-Limit:
541
              type: "integer"
542
              format: "int32"
543
              description: "calls per hour allowed by the user"
544
          schema:
545
            type: "string"
546
        400:
547
          description: "Invalid username/password supplied"
548
  /user/logout:
549
    get:
550
      tags:
551
      - "user"
552
      summary: "Logs out current logged in user session"
553
      description: ""
554
      operationId: "logoutUser"
555
      produces:
556
      - "application/json"
557
      - "application/xml"
558
      parameters: []
559
      responses:
560
        default:
561
          description: "successful operation"
562
  /user:
563
    post:
564
      tags:
565
      - "user"
566
      summary: "Create user"
567
      description: "This can only be done by the logged in user."
568
      operationId: "createUser"
569
      consumes:
570
      - "application/json"
571
      produces:
572
      - "application/json"
573
      - "application/xml"
574
      parameters:
575
      - in: "body"
576
        name: "body"
577
        description: "Created user object"
578
        required: true
579
        schema:
580
          $ref: "#/definitions/User"
581
      responses:
582
        default:
583
          description: "successful operation"
584
securityDefinitions:
585
  api_key:
586
    type: "apiKey"
587
    name: "api_key"
588
    in: "header"
589
  petstore_auth:
590
    type: "oauth2"
591
    authorizationUrl: "https://petstore.swagger.io/oauth/authorize"
592
    flow: "implicit"
593
    scopes:
594
      read:pets: "read your pets"
595
      write:pets: "modify pets in your account"
596
definitions:
597
  ApiResponse:
598
    type: "object"
599
    properties:
600
      code:
601
        type: "integer"
602
        format: "int32"
603
      type:
604
        type: "string"
605
      message:
606
        type: "string"
607
  Category:
608
    type: "object"
609
    properties:
610
      id:
611
        type: "integer"
612
        format: "int64"
613
      name:
614
        type: "string"
615
    xml:
616
      name: "Category"
617
  Pet:
618
    type: "object"
619
    required:
620
    - "name"
621
    - "photoUrls"
622
    properties:
623
      id:
624
        type: "integer"
625
        format: "int64"
626
      category:
627
        $ref: "#/definitions/Category"
628
      name:
629
        type: "string"
630
        example: "doggie"
631
      photoUrls:
632
        type: "array"
633
        xml:
634
          wrapped: true
635
        items:
636
          type: "string"
637
          xml:
638
            name: "photoUrl"
639
      tags:
640
        type: "array"
641
        xml:
642
          wrapped: true
643
        items:
644
          xml:
645
            name: "tag"
646
          $ref: "#/definitions/Tag"
647
      status:
648
        type: "string"
649
        description: "pet status in the store"
650
        enum:
651
        - "available"
652
        - "pending"
653
        - "sold"
654
    xml:
655
      name: "Pet"
656
  Tag:
657
    type: "object"
658
    properties:
659
      id:
660
        type: "integer"
661
        format: "int64"
662
      name:
663
        type: "string"
664
    xml:
665
      name: "Tag"
666
  Order:
667
    type: "object"
668
    properties:
669
      id:
670
        type: "integer"
671
        format: "int64"
672
      petId:
673
        type: "integer"
674
        format: "int64"
675
      quantity:
676
        type: "integer"
677
        format: "int32"
678
      shipDate:
679
        type: "string"
680
        format: "date-time"
681
      status:
682
        type: "string"
683
        description: "Order Status"
684
        enum:
685
        - "placed"
686
        - "approved"
687
        - "delivered"
688
      complete:
689
        type: "boolean"
690
    xml:
691
      name: "Order"
692
  User:
693
    type: "object"
694
    properties:
695
      id:
696
        type: "integer"
697
        format: "int64"
698
      username:
699
        type: "string"
700
      firstName:
701
        type: "string"
702
      lastName:
703
        type: "string"
704
      email:
705
        type: "string"
706
      password:
707
        type: "string"
708
      phone:
709
        type: "string"
710
      userStatus:
711
        type: "integer"
712
        format: "int32"
713
        description: "User Status"
714
    xml:
715
      name: "User"
716
externalDocs:
717
  description: "Find out more about Swagger"
718
  url: "http://swagger.io"
719

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.