API Documentation
Goals
Repository Structure
/docs
openapi.yaml # Source of truth (OpenAPI 3.1)
openapi.json # Auto-generated in CI for Hugo/renderers
index.html # Auto-generated standalone docs (optional)File Requirements
openapi.yaml
openapi.yamlopenapi.json
openapi.jsonindex.html
index.htmlOpenAPI Standards
Endpoint Summary
Operation ID
Versioning
Tags and Grouping
Complete Example
Local Development
Preview Documentation Locally
Add to package.json
Install Redocly CLI
Validate OpenAPI Spec
Automation Setup
Step 1: Configure GitBook Secrets
Secret Name
Description
Where to Find
Step 2: Add GitHub Actions Workflow
Step 3: Enable GitHub Pages
Adding to GitBook
Manual Addition (Current Process)
GitBook Integration Features
Complete Setup Flow
Initial Setup
Ongoing Updates
Best Practices
Documentation Quality
Example with Best Practices
Schema Reusability
Security Schemas
Validation and Quality Checks
Pre-Commit Validation
Common Validation Rules
Troubleshooting
Workflow Fails
GitHub Pages Not Working
GitBook Not Syncing
Migration from Existing Docs
Next Steps
Related Standards
Resources
Last updated