The Adapt authoring tool uses a three-tier documentation system:
- Source code reference — Auto-generated API documentation from JSDoc comments
- Developer manual — Handwritten markdown guides for practical usage
- REST API reference — Auto-generated OpenAPI/Swagger documentation from route definitions
All documentation is built using the at-docgen CLI provided by this module.
JSDoc comments in your code are automatically parsed and rendered as API documentation. This requires no extra configuration beyond enabling documentation for your module, which can done by adding the following to your module's adapt-authoring.json:
{
"documentation": {
"enable": true
}
}For guidance on writing effective JSDoc comments, see the JSDoc style guide.
Markdown files in your module's docs/ folder are included in the developer manual. These provide practical guides on using your module.
To assign pages to specific sections in the manual, use the manualPages option:
{
"documentation": {
"enable": true,
"manualPages": {
"getting-started.md": "basics",
"advanced-usage.md": "advanced"
}
}
}Available sections include basics, advanced, reference, and contributing. You can also define custom sections if needed. Files not listed in manualPages are assigned to the default section.
You can also add documentation for the REST API endpoints defined in your module.
If your module extends AbstractApiModule, REST API documentation is generated automatically from your route definitions. For custom routes or additional metadata, see the API documentation guide.
For documentation that needs to be generated programmatically (e.g. listing all registered schemas), you can write custom documentation plugins. See writing custom documentation plugins for details.
- JSDoc style guide — Conventions for documenting your code
- API documentation guide — Documenting REST API endpoints
- Custom documentation plugins — Generating dynamic documentation