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
master
Implement the documentation example of SwaggerRenderer at: https://github.com/tomchristie/django-rest-framework/blame/master/docs/api-guide/schemas.md#L244
And try to get an HTTP request to an endpoint that uses this renderer:
http http://127.0.0.1:8000/v1/ Accept:application/openapi+json;version=2.0
Get a JSON with Swagger API Schema.
Get an HTTP 406:
HTTP/1.0 406 Not Acceptable Allow: GET, HEAD, OPTIONS Content-Type: application/json Date: Tue, 19 Jul 2016 19:51:47 GMT Server: WSGIServer/0.2 CPython/3.5.1+ Vary: Accept X-Frame-Options: SAMEORIGIN { "detail": "Could not satisfy the request Accept header." }
I've found that media_type doesn't match "version" parameter correctly in the following lines (even with */*; q=0.8 media type):
*/*; q=0.8
The text was updated successfully, but these errors were encountered:
Thanks for raising this!
Sorry, something went wrong.
Note that this is actually a subtle command line issue... This:
In bash is actually treated as:
http http://127.0.0.1:8000/v1/ Accept:application/openapi+json version=2.0
To simplify things I think we'll remove the optional "version=2.0" from the docs.
I'm 👍 for this. I think that the version 2.0 is kind-of implicit in application/openapi+json content/mime-type.
application/openapi+json
No branches or pull requests
Checklist
master
branch of Django REST framework.Steps to reproduce
Implement the documentation example of SwaggerRenderer at: https://github.com/tomchristie/django-rest-framework/blame/master/docs/api-guide/schemas.md#L244
And try to get an HTTP request to an endpoint that uses this renderer:
Expected behavior
Get a JSON with Swagger API Schema.
Actual behavior
Get an HTTP 406:
Preliminar analisys
I've found that media_type doesn't match "version" parameter correctly in the following lines (even with
*/*; q=0.8
media type):The text was updated successfully, but these errors were encountered: