Skip to content
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

Response codes must be in string format #17

Closed
MissiaL opened this issue Mar 30, 2020 · 1 comment
Closed

Response codes must be in string format #17

MissiaL opened this issue Mar 30, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@MissiaL
Copy link
Contributor

MissiaL commented Mar 30, 2020

At the moment it is incorrect format:
https://github.com/tfranzel/drf-spectacular/blob/master/tests/test_extend_schema.yml#L53
Must be like "200"

Details:
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#patterned-fields-1

@tfranzel
Copy link
Owner

actually i stumbled upon this before but the the schema validation never complained about it (which runs for every test). fyi if you did not see this yet: ./migrate.py spectacular --file schema.yaml --validate

I didn't notice this in the spec though:
This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML.

easy fix. i'll do it right now.

@tfranzel tfranzel added the bug Something isn't working label Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants