Commit Graph
2 Commits
Author SHA1 Message Date
apuc 3b3e5c429a Serve an offline API reference at /api/docs/
The Swagger UI page was blank on networks where the jsdelivr CDN is
unreachable (here the proxy answers 407), so /api/docs/ now returns a
server-rendered reference built from the same OpenAPI schema: inline
CSS/JS, no external requests, search across methods.

- Extract the renderer into apps/common/api_docs.py
- Add api_docs_view and route it to /api/docs/
- Move Swagger UI to /api/swagger/, keep ReDoc at /api/redoc/
- Let export_api_docs reuse the shared renderer (new search field)
- Update the docs entry points in docs/architecture.md
2026-11-22 22:09:41 +03:00
apuc f6c61ff8da Document the API in Swagger with tags, parameters and examples
- Add OpenAPI tags for the seven API groups and a full description
  (auth, error envelope, pagination, idempotency) in SPECTACULAR_SETTINGS
- Annotate every endpoint with @extend_schema: summary, description,
  query parameters, request/response examples and error responses
- Add shared schema helpers in apps/common/schema.py: ErrorEnvelope,
  error_responses(), pagination and catalog filter parameters
- Document JWT login and token refresh that simplejwt ships without docs
- Add ReDoc at /api/redoc/ next to Swagger UI at /api/docs/
- Add export_api_docs management command rendering the schema into a
  standalone HTML reference (no CDN) and commit docs/api-reference.html
- Describe the documentation entry points in docs/architecture.md

Schema validates cleanly: 41 operations, 0 warnings.
2026-11-22 22:06:21 +03:00