Skip to content

Add auto-generated API reference documentation#131

Merged
gricha merged 2 commits intomainfrom
feat/api-reference-docs
Jan 15, 2026
Merged

Add auto-generated API reference documentation#131
gricha merged 2 commits intomainfrom
feat/api-reference-docs

Conversation

@gricha
Copy link
Copy Markdown
Owner

@gricha gricha commented Jan 15, 2026

Summary

Adds automatic API reference documentation generated from the oRPC router, appearing at the bottom of the Docusaurus sidebar.

Changes

  • Add @orpc/openapi and @orpc/zod for OpenAPI spec generation
  • Create scripts/generate-openapi.ts to generate openapi.json from oRPC router
  • Add docusaurus-plugin-openapi-docs to render API docs
  • Configure docs build to regenerate API docs on each build
  • Add "API Reference" section at bottom of sidebar (52 endpoints documented)

Build Flow

npm run build (in docs/)
  → generate:openapi (creates openapi.json from router)
  → gen-api-docs (converts to MDX)
  → docusaurus build

The API docs are auto-generated and gitignored, so they stay in sync with the router automatically.

- Add @orpc/openapi and @orpc/zod for OpenAPI spec generation from router
- Create scripts/generate-openapi.ts to generate openapi.json from oRPC router
- Add docusaurus-plugin-openapi-docs to render API docs in Docusaurus
- Configure build to regenerate API docs on each build
- Add API Reference section at bottom of docs sidebar (52 endpoints)
Instead of generating at build time, commit the generated files so
the docs workflow doesn't need to run bun/generate scripts.
@gricha gricha merged commit f5d81b4 into main Jan 15, 2026
8 checks passed
@gricha gricha deleted the feat/api-reference-docs branch January 15, 2026 06:50
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