Menu

📰
0

I built a Django command that generates API docs without Swagger or annotations

Reddit r/django·u/Slight_Law5384·about 1 month ago
#3dN8yxSf
#routes#docs#manage#django#article#discussion
Reading 0:00
15s threshold

I built a Django command that generates API docs without Swagger or annotations I’ve been working with Django REST Framework for a while, and one thing that always annoyed me was how hard it is to get a clear view of all routes. You either: * dig through multiple [`urls.py`](http://urls.py) files * or set up Swagger / OpenAPI and maintain schemas Both felt like overkill for quick visibility or internal docs. So I built a small tool: 👉 `python` [`manage.py`](http://manage.py) `routes` It prints all routes in a clean table (methods, views, serializers, etc.) Then I added this: 👉 `python` [`manage.py`](http://manage.py) `routes --format markdown` It generates a full API reference (`api_docs.md`) directly from your code: * serializers * permissions * auth classes * filters * path params * docstrings No decorators, no YAML, no schema config. It’s basically like `rails routes`, but for Django — with docs generation.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More