Guest User

Multiple File Upload - OAS3

a guest
Dec 5th, 2022
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.02 KB | None | 0 0
  1. swagger: '2.0'
  2. info:
  3.   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.'
  4.   version: 1.0.6
  5.   title: Swagger Petstore
  6.   termsOfService: http://swagger.io/terms/
  7.   contact:
  8.     email: [email protected]
  9.   license:
  10.     name: Apache 2.0
  11.     url: http://www.apache.org/licenses/LICENSE-2.0.html
  12. host: petstore.swagger.io
  13. basePath: /v2
  14. tags:
  15.   - name: pet
  16.     description: Everything about your Pets
  17.     externalDocs:
  18.       description: Find out more
  19.       url: http://swagger.io
  20. schemes:
  21.  - https
  22.   - http
  23. paths:
  24.   /pet/{petId}/uploadImage:
  25.     post:
  26.       tags:
  27.        - pet
  28.       summary: uploads an image
  29.       description: ''
  30.       operationId: uploadFile
  31.       consumes:
  32.        - multipart/form-data
  33.       produces:
  34.        - application/json
  35.       parameters:
  36.         - name: petId
  37.           in: path
  38.           description: ID of pet to update
  39.           required: true
  40.           type: integer
  41.           format: int64
  42.         - name: additionalMetadata
  43.           in: formData
  44.           description: Additional data to pass to server
  45.           required: false
  46.           type: string
  47.         - name: file
  48.           in: formData
  49.           description: file to upload
  50.           required: false
  51.           type: file
  52.         - name: multi_files
  53.           in: formData
  54.           type: array
  55.           items:
  56.             type: string
  57.             format: binary
  58.       responses:
  59.         '200':
  60.           description: successful operation
  61.           schema:
  62.             $ref: '#/definitions/ApiResponse'
  63. definitions:
  64.   ApiResponse:
  65.     type: object
  66.     properties:
  67.       code:
  68.         type: integer
  69.         format: int32
  70.       type:
  71.         type: string
  72.       message:
  73.         type: string
  74. externalDocs:
  75.   description: Find out more about Swagger
  76.   url: http://swagger.io
Advertisement
Add Comment
Please, Sign In to add comment