swagger2 icon indicating copy to clipboard operation
swagger2 copied to clipboard

Unknown type: file

Open amcdnl opened this issue 7 years ago • 6 comments

When using file as a parameter like:

  /**
   * @swagger
   * /pakcage:
   *    post:
   *      summary: Upload package
   *      operationId: "upload"
   *      tags:
   *        - Bundles
   *      parameters:
   *        - name: file
   *          in: formData
   *          description: the package
   *          required: true
   *          type: file
   *      consumes:
   *        - "multipart/form-data"
   *      produces:
   *        - "application/json"
   *      responses:
   *        200:
   *          description: the newly created package
   *          schema:
   *            $ref: "#/definitions/Package"
   *        500:
   * /

I receive the following message: Unknown type: file. Looking at the is-my-json-valid plugin it doesn't support this type so thus the failure.

amcdnl avatar May 09 '17 22:05 amcdnl

We should definitely support this, PRs welcome :)

carlansley avatar May 16 '17 15:05 carlansley

+1 definitely need it

ctc316 avatar Jul 11 '17 09:07 ctc316

This is absolutely desired feature.

UKNC avatar Jun 09 '18 10:06 UKNC

+1

exsesx avatar Oct 10 '18 07:10 exsesx

+1

I got the same error today, I cannot use the type "file"

dmpvost avatar Jun 19 '19 16:06 dmpvost

I cannot use the type "file"

andrew-ma avatar May 03 '21 07:05 andrew-ma