Skip to content

feat(docs): add foundation for automating SDK reference docs - #1242

Closed
mikemimik wants to merge 2 commits into
auth0:mainfrom
mikemimik:feat/sdk-reference-docs
Closed

mikemimik wants to merge 2 commits into
auth0:mainfrom
mikemimik:feat/sdk-reference-docs

Conversation

@mikemimik

@mikemimik mikemimik commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor
  • Refactor typedoc.js to use entryPoints resolve strategy and auth0 theme
  • Add scripts/typedoc-plugin.js: categorizes exports and extends sidebar nav
  • Add scripts/typedoc-plugin-mintlify.js: injects markdown type links for Mintlify
  • Add typedoc.docsv2.js: JSON-only config for docs-v2 Mintlify pipeline
  • Add docs:docsv2 npm script for generating the Mintlify artifact

By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

Describe the purpose of this PR along with any background information and the impacts of the proposed change. For the benefit of the community, please do not assume prior context.

Provide details that support your chosen implementation, including: breaking changes, alternatives considered, changes to the API, etc.

If the UI is being changed, please provide screenshots.

References

Include any links supporting this change such as a:

  • GitHub Issue/PR number addressed or fixed
  • Auth0 Community post
  • StackOverflow post
  • Support forum thread
  • Related pull requests/issues from other repos

If there are no references, simply delete this section.

Testing

Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Also include details of the environment this PR was developed in (language/platform/browser version).

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

Summary by CodeRabbit

  • Documentation
    • Improved the Auth0 React SDK API reference with clearer categories, task-oriented navigation, and expanded sidebar organization.
    • Added cross-links between related types and API symbols in Mintlify documentation.
    • Added structured documentation output for more consistent, readable API reference updates.
    • Improved documentation filtering to focus on relevant public APIs while excluding internal and test-only details.
    • Updated documentation generation to provide more useful search results from comments.

- Refactor typedoc.js to use entryPoints resolve strategy and auth0 theme
- Add scripts/typedoc-plugin.js: categorizes exports and extends sidebar nav
- Add scripts/typedoc-plugin-mintlify.js: injects markdown type links for Mintlify
- Add typedoc.docsv2.js: JSON-only config for docs-v2 Mintlify pipeline
- Add docs:docsv2 npm script for generating the Mintlify artifact
@mikemimik
mikemimik requested a review from a team as a code owner September 15, 2026 14:36
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: auth0/auth0-react/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b6b568f4-8573-4363-878c-1cabc42faf7b

📥 Commits

Reviewing files that changed from the base of the PR and between 1cd8dc3 and 4832652.

📒 Files selected for processing (1)
  • package.json

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The pull request expands TypeDoc configuration and navigation, adds Mintlify JSON link generation, updates documentation scripts, and changes package versions.

Changes

TypeDoc documentation generation

Layer / File(s) Summary
TypeDoc navigation and categorization
scripts/typedoc-plugin.js, typedoc.js
The plugin categorizes SDK exports and Auth0ContextInterface members. The configuration adds custom navigation, filtering, sorting, entry-point resolution, and sidebar settings.
Mintlify JSON documentation output
scripts/typedoc-plugin-mintlify.js, typedoc.docsv2.js
The plugin collects referenced TypeDoc types and appends links to generated pages. The second configuration writes formatted JSON documentation with the Mintlify directory setting.

Package and script updates

Layer / File(s) Summary
Documentation scripts and package versions
package.json
Documentation scripts use both TypeDoc option files. The package, React, React DOM, React type packages, and Auth0 SPA dependency use updated versions.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant TypeDoc
  participant typedoc.js
  participant typedoc-plugin-mintlify.js
  participant JSONArtifact
  TypeDoc->>typedoc.js: Load documentation options
  TypeDoc->>typedoc-plugin-mintlify.js: Resolve documented reflections
  typedoc-plugin-mintlify.js->>JSONArtifact: Append Mintlify markdown links
  TypeDoc->>JSONArtifact: Write formatted JSON output
Loading

Suggested reviewers: frederikprijck

Merge Risk: ⚪ Minimal · up to 48326

This change adds TypeDoc and Mintlify SDK reference generation and updates package versions; no concrete production-impacting risk is evidenced, so it is mergeable with normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding the foundation for automated SDK reference documentation, including TypeDoc and Mintlify configuration and plugins.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 4 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gyaneshgouraw

Copy link
Copy Markdown
Contributor

Closing this PR as newer PR is up adding this changes with enhancements - #1258

gyaneshgouraw added a commit that referenced this pull request Oct 5, 2026
## Summary

Updates TypeDoc so the generated API reference is grouped into readable
sections (Getting Started, Hooks & HOCs, Context, Errors, Reference)
instead of a flat alphabetical list.

Categories derive from `@category` tags on the public declarations, a
plugin controls category order and warns when an own-symbol is left
uncategorised, and the sidebar now surfaces `Auth0ContextInterface`
members grouped by category.

  No runtime changes, only documentation-related updates.

  ## Supersedes

  This PR supersedes and closes the earlier docs-reference work:

  - #1242 — feat(docs): add foundation for automating SDK reference docs
- #1210 — docs: generate a Mintlify SDK reference artifact from TypeDoc


  ## Changes

- **Entry point**: reference is generated from `src/index.tsx` (the
public contract) rather than expanding the whole `src/` tree, keeping
internal modules (reducer, auth state, utils)
  out.
- **Grouping by category**: `typedoc.js` groups the landing page and
sidebar by `@category`, wired to the plugin's `CATEGORY_ORDER` and
`DEFAULT_CATEGORY`.

- **Plugin** (`scripts/typedoc-plugin.js`): controls category order and
validates categories per reflection against level-scoped allowed-sets
(top-level vs interface-member).

- **Category tags**: `@category` tags added across the public surface
(hooks/HOCs, provider options, context interface + its members, errors,
and re-exported spa-js option/claim typesunder Reference).
`Auth0ContextInterface` members are tagged so they appear grouped in the
sidebar.


  ## Testing

- `npm run docs:docsv2` — generates the Mintlify JSON artefact (exit 0;
Reference holds 60
  symbols, 57 re-exported).
  - `npm test` — 100% coverage, all tests pass.
  - `npm run lint` — clean.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Documentation

* Added a categorized SDK reference with clearer navigation for
authentication state, errors, hooks, and getting started.
* Made the Getting Started and Hooks & HOCs navigation groups expanded
by default when no saved preference is available.
* Clarified the `useAuth0` documentation, including the returned auth
state, methods, and available sub-clients.
* Added a JSON documentation output alongside the existing documentation
format.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Michael Perrotte <mike@mikecorp.ca>
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.

2 participants