http http://127.0.0.1:8000/v1/ Accept:application/openapi+json;version=2.0
Get a JSON with Swagger API Schema.
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):
Checklist
masterbranch 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.8media type):