django DJA with swagger setting content-type

491 Views Asked by At

I want to use the JSON API format for our API and django-rest-framework-json-api seems to work perfectly for that.

However, I also use swagger. Now DJA follows content-negotiation-clients

Loading the swagger docs goes fine however when I want to try something it does not follows the JSON API content negotiation. When I change the curl command and run it in the shell it goes fine.

How can I change Django swagger to add the Content-Type: 'application/vdn.api+json' ?

( it is basically this first problem django-rest-framework-json-api/issues , however, she does not state how she solved that issue only the second issue)

1

There are 1 best solutions below

0
On

It seems to me like the answer has been laid out here... https://github.com/django-json-api/django-rest-framework-json-api/issues/314