6π
The answer is as Klahnen said. Use this:
https://django-rest-swagger.readthedocs.io/en/latest/
It works out of the box for me and it is exactly what I was hoping for.
I still maintain, though, that the term browsable API implies that there is a table of contents available for consumers of your API to see. This app is a lifesaver and perhaps it should be included!
3π
Django-Rest-Swagger
as mentioned in the accepted answer is no longer maintained.
This is a good alternative
- How can I disable a model field in a django form
- Disable pylint warning E1101 when using enums
- How can I reset a Django test database id's after each test?
- Docker, web app static files. Best practices?
1π
Django-Rest-Swagger doesnβt support OpenAPI 3.0 and is unlikely to support it soon, so if you want an actively maintained library that supports OpenAPI 3.0 then you should use drf-spectacular. It mostly works out of the box, and you can customize it a lot.
A side note:
Your api client needs access to the internet so that it gets the swagger UI or ReDoc from CDNs. Alternatively you can serve those static files from your service with an optional additional package, the drf-spectacular-sidecar