Install
openclaw skills install api-documentation-generatorGenerate comprehensive API documentation from code — extract endpoints, parameters, response schemas, and examples from Express, FastAPI, Django, Rails, and...
openclaw skills install api-documentation-generatorGenerate comprehensive API documentation by analyzing source code. Extracts endpoints, parameters, request/response schemas, authentication requirements, and generates examples. Works with Express, FastAPI, Django REST Framework, Rails, Spring Boot, and other frameworks.
"Generate API docs from my Express app"
"Create API reference documentation"
"Document all endpoints in this project"
"Generate OpenAPI spec from my code"
# Detect framework from dependencies
cat package.json 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin).get('dependencies',{})
for fw in ['express','fastify','koa','hapi','nestjs','next']:
if fw in str(d): print(f'Node: {fw}')
" 2>/dev/null
cat requirements.txt setup.py pyproject.toml 2>/dev/null | grep -i "fastapi\|django\|flask\|starlette"
Scan source code for route definitions:
Express/Node:
grep -rn "router\.\(get\|post\|put\|patch\|delete\|all\)\|app\.\(get\|post\|put\|patch\|delete\)" src/ routes/
FastAPI/Python:
grep -rn "@app\.\(get\|post\|put\|patch\|delete\)\|@router\.\(get\|post\|put\|patch\|delete\)" src/ app/
Django REST Framework:
grep -rn "class.*ViewSet\|class.*APIView\|path(" */views.py */urls.py
For each endpoint, extract:
Analyze types/models for request/response schemas:
Generate realistic request/response examples:
Generate in multiple formats:
Markdown API Reference:
## POST /api/users
Create a new user account.
**Authentication:** Bearer token required
**Rate limit:** 10 requests/minute
### Request Body
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| email | string | yes | Valid email address |
| name | string | yes | Full name (2-100 chars) |
| role | enum | no | "user" or "admin" (default: "user") |
### Response (201 Created)
```json
{
"id": "usr_abc123",
"email": "user@example.com",
"name": "Jane Smith",
"role": "user",
"createdAt": "2026-04-30T10:00:00Z"
}
400 — Invalid email format or missing required field409 — Email already registered429 — Rate limit exceeded
**OpenAPI 3.1 spec** — machine-readable for Swagger UI, Redoc, Postman
### 6. Completeness Check
Verify documentation quality:
- All endpoints documented
- All parameters described
- Response schemas match actual responses
- Authentication documented
- Error codes listed
- Examples present and valid
## Output
Framework: Express.js + TypeScript Endpoints found: 23 Documentation completeness: 87%
| Category | Endpoints | Documented | Missing |
|---|---|---|---|
| Auth | 4 | 4 (100%) | — |
| Users | 6 | 5 (83%) | PATCH /users/:id |
| Orders | 8 | 7 (88%) | webhook handler |
| Admin | 5 | 5 (100%) | — |