Skip to content

[FC-0118] docs: add ADR for standardizing API documentation and schema coverage#38189

Open
Abdul-Muqadim-Arbisoft wants to merge 2 commits intoopenedx:docs/ADRs-axim_api_improvementsfrom
edly-io:docs/ADRs-axim_api_improvements
Open

[FC-0118] docs: add ADR for standardizing API documentation and schema coverage#38189
Abdul-Muqadim-Arbisoft wants to merge 2 commits intoopenedx:docs/ADRs-axim_api_improvementsfrom
edly-io:docs/ADRs-axim_api_improvements

Conversation

@Abdul-Muqadim-Arbisoft
Copy link
Contributor

Description

Currently, API documentation and schema coverage is inconsistent across Open edX services, with many views lacking OpenAPI decorators and machine-readable documentation. This ADR proposes standardizing on drf-spectacular with @extend_schema decorators across all endpoints to improve AI-tool discoverability, reduce duplicate endpoints, and provide a consistent developer experience for external integrations.

Issue: #38164

- Propose adoption of drf-spectacular across Open edX services
- Require @extend_schema decorators for all API endpoints
- Document request/response schemas, status codes, and error conditions
@Abdul-Muqadim-Arbisoft Abdul-Muqadim-Arbisoft changed the title docs: add ADR for standardizing API documentation and schema coverage [FC-0118] docs: add ADR for standardizing API documentation and schema coverage Mar 18, 2026
"""Create a new discussion topic."""
return Response({"detail": "Topic created"}, status=201)

Consequences
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we use https://github.com/openedx/api-doc-tools/ as a shim over drf-yasg, which is currently being used to generate API docs in the platform. Another option here would be to update that tool to replace the underlying drf-yasg usage with drf-spectacular. This would mean that all the endpoints we have currently documented would not need new documentation or further updates. If that is not viable, then I think a consequence would be the deprecation and archival of api-doc-tools and drf-yasg and if that's the direction you want to move then you should document that here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants