Skip to content

How I can describe multiple files uploading #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
psdcoder opened this issue May 23, 2015 · 1 comment
Closed

How I can describe multiple files uploading #467

psdcoder opened this issue May 23, 2015 · 1 comment

Comments

@psdcoder
Copy link

Hi.
Now I have that config:

swagger: '2.0'
info:
  title: HitRockGames API
  version: "0.0.1"
host: api.hitrockgames.com
schemes:
  - http
consumes:
  - application/json
produces:
  - application/json
paths:
  /files/{id}:
    post:
      summary: Upload new file.
      tags:
        - Files
      consumes:
        - multipart/form-data
      parameters:
        - name: id
          in: path
          required: true
          type: string
          format: byte
          description: Type of uploading file.
        - name: files
          in: formData
          type: file
          required: true
      responses:
        200: 
          description: Successfully uploaded.
          schema:
            type: object
            properties:
              id:
                 type: integer
                 format: int64
              url:
                 type: string
                 format: url

But I want describe of multiple files uploading. I'm tried:

parameters:
  - name: files
    in: formData
    type: array
    required: true
    items:
       type: file

but in doc swagger docs I saw that items doesn't support _file_ type
It's possible?
Thanks.

@mohsen1
Copy link
Contributor

mohsen1 commented May 24, 2015

Swagger 2.0 doesn't support it. Follow this thread for feature updates.

@mohsen1 mohsen1 closed this as completed May 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants