Skip to content

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

Merged
feanil merged 5 commits into
openedx:docs/ADRs-axim_api_improvementsfrom
edly-io:docs/ADRs-axim_api_improvements
Apr 28, 2026
Merged

[FC-0118] docs: add ADR for standardizing API documentation and schema coverage#38189
feanil merged 5 commits into
openedx:docs/ADRs-axim_api_improvementsfrom
edly-io:docs/ADRs-axim_api_improvements

Conversation

@Abdul-Muqadim-Arbisoft
Copy link
Copy Markdown
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
Comment thread docs/decisions/0027-standardize-api-documentation-and-schema-coverage.rst Outdated
- Add context explaining what api-doc-tools is and its relationship
  to drf-yasg
- Document deprecation and archival of api-doc-tools as a consequence
- Add migration guide mapping api-doc-tools decorators and URL helpers
  to their drf-spectacular equivalents
- Add rejected alternative for updating api-doc-tools internals
- Add rollout step for final archival cutover

Closes review comment by @feanil
Copy link
Copy Markdown
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

Mostly looks good, I think this is close to merging once we add a little bit more context on the decision to pivot away from api-doc-tools

Comment thread docs/decisions/0027-standardize-api-documentation-and-schema-coverage.rst Outdated
@feanil feanil requested a review from kdmccormick April 20, 2026 15:05
@feanil
Copy link
Copy Markdown
Contributor

feanil commented Apr 20, 2026

@kdmccormick tagging you for review since we've spoken about this before. This can wait till after the release is cut.

@kdmccormick
Copy link
Copy Markdown
Member

Thanks, I'll take a look next week

…ompatibility analysis

Address review feedback on FC-0118 ADR 0027:

- Add context paragraph explaining what api-doc-tools is (drf-yasg shim,
  decorators it provides, schema view, OpenAPI 2.0 output)
- Document deprecation of api-doc-tools and drf-yasg as a consequence,
  including transition-window behavior
- Add detailed 8-point incompatibility analysis explaining why drf-yasg
  cannot be replaced with drf-spectacular inside api-doc-tools (recorded
  in the ADR itself for future reference)
- Add migration plan for existing api-doc-tools consumers with concrete
  decorator/import/setting mapping
- Update Rollout Plan to track api-doc-tools removal
- Add references to drf-spectacular migration guide, drf-yasg upstream
  status, and api-doc-tools repository
Copy link
Copy Markdown
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

One small grammer issue (using Open edX as a noun) but otherwise I think this is good to merge now. I don't need to review again once the grammer issue is fixed.

Comment thread docs/decisions/0027-standardize-api-documentation-and-schema-coverage.rst Outdated
@feanil
Copy link
Copy Markdown
Contributor

feanil commented Apr 28, 2026

@Abdul-Muqadim-Arbisoft this looks great, please be sure to make the DEPR ticket for dropping api-doc-tools and drf-yasg so we can communicate that out to folks. We'll need to drop it from the other services (credentials, course-discovery, etc at some point as well.)

@feanil feanil merged commit cb35381 into openedx:docs/ADRs-axim_api_improvements Apr 28, 2026
65 checks passed
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.

5 participants