A unified API documentation site for Decentraland services, built with React, Redoc, and Redocly CLI.
- Node.js 22+
- Yarn package manager
-
Install dependencies
yarn install
-
Start development server
yarn dev
This will:
- Join all API specs using Redocly CLI
- Start the Vite dev server
- Open http://localhost:5173 in your browser
-
Build for production
yarn build
To add a new API to the documentation, simply update the redocly.yaml configuration file:
extends:
- recommended
apis:
social-service@v1:
root: https://decentraland.github.io/social-service-ea/communities-openapi.yaml
rules:
operation-4xx-response: off
comms-gatekeeper@v1:
root: https://decentraland.github.io/comms-gatekeeper/comms-gatekeeper-openapi.yaml
rules:
operation-4xx-response: off
# Add your new API here
your-new-api@v1:
root: https://your-api.com/openapi.yaml
rules:
operation-4xx-response: offThen update the join-specs script in package.json:
{
"scripts": {
"join-specs": "redocly join social-service@v1 comms-gatekeeper@v1 your-new-api@v1 -o public/joined-openapi.yaml --prefix-tags-with-filename --prefix-components-with-info-prop title"
}
}The documentation uses a custom theme defined in src/App.tsx. You can modify colors, typography, and layout by updating the theme object.
All Redocly settings are in redocly.yaml. This includes:
- API specifications and their sources
- Validation rules
- OpenAPI rendering options
yarn dev- Start development serveryarn build- Build for productionyarn join-specs- Join API specifications using Redocly CLIyarn preview- Preview production build
├── public/
│ └── joined-openapi.yaml # Generated unified API spec
├── src/
│ ├── App.tsx # Main React component with Redoc
│ └── main.tsx # React entry point
├── redocly.yaml # Redocly configuration
└── package.json # Dependencies and scripts
- Fork the repository
- Add your API specification to
redocly.yaml - Update the
join-specsscript to include your API - Test locally with
yarn dev - Submit a pull request