Generate Api Documentation
Auto-generate API reference documentation with multiple output formats and automated deployment
$ npx claude-code-templates@latest --command="documentation/generate-api-documentation" --yesRequires Claude Code. The command adds this command to your project's .claudedirectory — nothing runs on ToolZip's servers.
What's inside this command
Component source
Automated API Documentation Generator
Auto-generate API reference documentation: $ARGUMENTS
Current API Infrastructure
- Code annotations: !
grep -r "@api\|@swagger\|@doc" src/ 2>/dev/null | wc -lannotations found - API framework: @package.json or detect from imports
- Existing specs: !
find . -name "spec.yaml" -o -name "spec.json" | head -3 - Documentation tools: !
grep -E "swagger|redoc|postman" package.json 2>/dev/null || echo "None detected" - CI/CD pipeline: @.github/workflows/ (if exists)
Task
Setup automated API documentation generation with modern tooling:
- API Documentation Strategy Analysis
- Identify documentation requirements (REST, GraphQL, gRPC, etc.)
- Assess existing code annotations and documentation
- Determine documentation output formats and hosting requirements
- Plan documentation automation and maintenance strategy
- Documentation Tool Selection
- OpenAPI/Swagger: REST API documentation with Swagger UI
- Redoc: Modern OpenAPI documentation renderer
- GraphQL: GraphiQL, Apollo Studio, GraphQL Playground
- Postman: API documentation with collections
- Insomnia: API documentation and testing
- API Blueprint: Markdown-based API documentation
- JSDoc/TSDoc: Code-first documentation generation
- Consider factors: API type, team workflow, hosting, interactivity
- Code Annotation and Schema Definition
- Define request/response schemas and data models
- Add parameter descriptions and validation rules
- Document authentication and authorization requirements
- Add example requests and responses
- API Specification Generation
- Configure OpenAPI/Swagger specification generation
- Set up schema validation and consistency checking
- Configure API versioning and changelog generation
- Set up specification file management and version control
- Interactive Documentation Setup
- Set up API testing and example execution
- Configure authentication handling in documentation
- Set up request/response validation and examples
- Configure API endpoint categorization and organization
- Documentation Content Enhancement
- Create authentication and authorization documentation
- Add error handling and status code documentation
- Create SDK and client library documentation
- Add rate limiting and usage guidelines
- Documentation Hosting and Deployment
- Configure documentation website generation and styling
- Set up custom domain and SSL configuration
- Configure documentation search and navigation
- Set up documentation analytics and usage tracking
- Automation and CI/CD Integration
- Set up documentation deployment automation
- Configure documentation validation and quality checks
- Set up documentation change detection and notifications
- Configure documentation testing and link validation
- Multi-format Documentation Generation
- Set up downloadable documentation packages
- Configure offline documentation access
- Set up documentation API for programmatic access
- Configure documentation syndication and distribution
- Maintenance and Quality Assurance
- Configure documentation feedback and improvement workflows
- Set up documentation analytics and usage metrics
- Create documentation maintenance procedures and guidelines
- Train team on documentation best practices and tools
- Set up documentation review and approval processes
Related Claude Code Commands
Create Architecture Documentation
Generate comprehensive architecture documentation with diagrams, ADRs, and interactive visualization
Update Docs
Systematically update project documentation with implementation status, API changes, and synchronized content
Docs Maintenance
Use PROACTIVELY to implement comprehensive documentation maintenance systems with quality assurance, validation, and automated updates
Create Onboarding Guide
Create comprehensive developer onboarding guide with environment setup, workflows, and interactive tutorials
Doc Api
Generate comprehensive API documentation from code with interactive examples and testing capabilities
Troubleshooting Guide
Generate systematic troubleshooting documentation with diagnostic procedures, common issues, and automated solutions
Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.