We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Spec validation doesn't support a file type as a schema on responses and simply fails to validate:
swagger: "2.0" info: version: "1.0.0" title: "Download app" paths: /download: get: summary: "Download a file" produces: - "application/pdf" responses: 200: description: OK schema: type: file
which is perfectly valid spec definition that you can confirm on https://editor.swagger.io/.
>>> from flex import load >>> load('test.yml') ValidationError Traceback (most recent call last) <ipython-input-2-ba70e59f9805> in <module>() ----> 1 load('test.yml') ... // snip snip ValidationError: 'paths': - '/download': - 'get': - 'responses': - 200: - 'referenceObject': - 'additionalProperties': - "When `additionalProperties` is False, no unspecified properties are allowed. The following unspecified properties were found:\n\t`{'schema', 'description'}`" - 'required': - '$ref': - 'This value is required' - 'responseObject': - 'schema': - 'type': - 'type': - 'enum': - "Invalid value. file is not one of the available options (['null', 'boolean', 'integer', 'number', 'string', 'array', 'object'])"
We can validate the same definition with no issues just by changing the type: file to type: string.
type: file
type: string
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
Spec validation doesn't support a file type as a schema on responses and simply fails to validate:
which is perfectly valid spec definition that you can confirm on https://editor.swagger.io/.
We can validate the same definition with no issues just by changing the
type: file
totype: string
.The text was updated successfully, but these errors were encountered: