[Fixed]-Djangorestframework browsable api: how to show all available endpoints urls?

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!

πŸ‘€user798719

3πŸ‘

Django-Rest-Swagger as mentioned in the accepted answer is no longer maintained.

This is a good alternative

https://github.com/axnsan12/drf-yasg

πŸ‘€SohailAQ

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

πŸ‘€dimyG

Leave a comment