Skip to content

[DRAFT] docs: API documentation improvements#4318

Draft
jamesdanielwhitford wants to merge 5 commits into
FusionAuth:mainfrom
ritza-co:api-docs-improvements
Draft

[DRAFT] docs: API documentation improvements#4318
jamesdanielwhitford wants to merge 5 commits into
FusionAuth:mainfrom
ritza-co:api-docs-improvements

Conversation

@jamesdanielwhitford
Copy link
Copy Markdown
Contributor

@jamesdanielwhitford jamesdanielwhitford commented May 13, 2026

Users API: suggested DX improvements

This PR shows some improvements we have been exploring for the Users API docs.

Problems with the current state

  1. The Users API is a single large page containing all operations. The TOC on the right has some structure, but because all operations live on one page the content is extremely long and readers lose context as they scroll.
Before - single page with flat TOC

  1. All APIField entries are expanded by default. On parameter-heavy endpoints this means the reader must scroll through hundreds of field descriptions to reach the next operation.

Before - all fields expanded

What we changed

The Users API page has been split into 17 sub-pages, one per operation. Each page has a focused TOC with ###-level headings for each request variant, so readers can navigate directly to the lookup method they need. A new CodeExample component renders a minimal copyable curl/Python snippet directly below each endpoint definition.

After - split page with per-variant TOC and inline code example

APIField entries are now collapsed by default using a <details> element. Readers can expand only the fields they care about, significantly reducing scroll depth on parameter-heavy pages.

After - collapsible fields

Next steps

These changes cover the Users API only. If the approach looks good, the same improvements can be rolled out across all other API reference pages.

CI note

The check-apis-against-client-json.rb step in the lint workflow will fail on this PR. It expects to find the built output at dist/docs/apis/users.html, which no longer exists after the page split. Before merging any version of these changes, that script will need to be updated to check the sub-pages at dist/docs/apis/users/*.html instead.

@jamesdanielwhitford jamesdanielwhitford requested a review from a team as a code owner May 13, 2026 15:12
@jamesdanielwhitford jamesdanielwhitford requested review from nathan-contino and removed request for a team May 13, 2026 15:12
@jamesdanielwhitford jamesdanielwhitford changed the title Api docs improvements [DRAFT] docs: API documentation improvements May 13, 2026
@jamesdanielwhitford jamesdanielwhitford marked this pull request as draft May 13, 2026 15:21
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.

1 participant