`file` shoud be an accepted primitive data type in swagger 2.0 spec
Describe the bug See https://swagger.io/specification/v2/#specification, Section Data types.
An additional primitive data type "file" is used by the Parameter Object and the Response Object to set the parameter type or the response as being a file.
It seems this file data type exception is not accounted for Response object.
To Reproduce
Steps to reproduce the behavior:
openapi lint --format stylish spec.yml
Expected behavior No spec error should be raised.
Logs
spec.yml:
28:19 error spec `type` can be one of the following only: "object", "array", "string", "number", "integer", "boolean", "null".
3:1 warning info-license Info object should contain `license` field.
20:5 warning operation-operationId Operation object should contain `operationId` field.
24:7 warning operation-4xx-response Operation must have at least one `4xx` response.
OpenAPI definition
swagger: "2.0"
info:
title: API
version: 0.0.1
description: |
API
host: swagger.petstore
schemes:
- https
basePath: /api/v1
consumes:
- application/json
produces:
- application/json; charset=utf-8
paths:
/foo:
get:
summary: foo
produces:
- application/octet-stream
responses:
200:
description: txt file
schema:
type: file
openapi-cli Version(s)
redocly/openapi-cli:v1.0.0-beta.80 container
Node.js Version(s)
See above.
this is basically a blocker for using it with our OAS 2.0 spec
I raised priority. Thanks.