Welcome to Your API Portal
This portal aggregates the API definitions of each microservice in your NestJS monorepo into one convenient place. Each service exposes its own OpenAPI (Swagger) document; this site fetches those documents and renders them using the ReDoc UI inside Docusaurus.
How It Works
- List your services – Edit
services.jsonat the root of this project and provide the name, title and URL for each NestJS service’s OpenAPI endpoint. - Fetch specs – Run
npm run update-specs. This executesscripts/fetch-openapi.js, which pulls down the OpenAPI documents and stores them under theopenapi/directory. - Build the site – Run
npm run buildto generate a static version of this portal under thebuild/directory. - Deploy – The build output can be served by any static hosting provider. For GitHub Pages, run
npm run deploy(after configuringorganizationName,projectName,urlandbaseUrlindocusaurus.config.js).
Updating the Docs
Whenever you release a new version of any service, simply run:
npm run update-specs
npm run build
Commit and push the changes, then redeploy. The portal will always reflect the current state of your APIs.
Adding Additional Pages
Use the docs/ directory to add guides, tutorials or usage examples. The sidebar configuration in sidebars.js determines how these documents appear in the navigation.
Enjoy building great APIs!