2024-01-01 - v1.1.0
Added
- Webhook support for user events
statusfilter onGET /users
Security
- API keys now support IP allowlisting
## Interactive Documentation
### Swagger UI Configuration
// swagger-config.js
const swaggerUiOptions = {
customCss: '.swagger-ui .topbar { display: none }',
customSiteTitle: 'API Documentation',
customfavIcon: '/favicon.ico',
swaggerOptions: {
persistAuthorization: true,
displayRequestDuration: true,
filter: true,
tryItOutEnabled: true,
},
};
### Redoc Configuration
redoc.yaml
x-tagGroups:
- name: Getting Started
tags:
- Authentication
- name: Core Resources
tags:
- Users
- Items
- name: Utilities
tags:
- Webhooks
- Health
Core Workflows
Workflow 1: Primary Action
- Analyze the input and context
- Validate prerequisites are met
- Execute the core operation
- Verify the output meets expectations
- Report results
x-logo:
url: 'https://example.com/logo.png'
altText: 'API Logo'
## Documentation Checklist
### Per Endpoint
- [ ] Summary (one line)
- [ ] Description (detailed explanation)
- [ ] All parameters documented with types and examples
- [ ] All response codes with examples
- [ ] Error codes with remediation steps
- [ ] Code examples in at least 2 languages
- [ ] Authentication requirements stated
### Overall API
- [ ] Getting started guide
- [ ] Authentication guide with examples
- [ ] Rate limiting documentation
- [ ] Pagination patterns
- [ ] Error handling guide
- [ ] Changelog maintained
- [ ] Versioning strategy documented
- [ ] SDK/library links
### Developer Experience
- [ ] Interactive "Try It" functionality
- [ ] Copy-paste ready examples
- [ ] Consistent terminology
- [ ] Search functionality
- [ ] Mobile-friendly rendering
## Tools Integration
### Generate from Code
From Express/Node.js routes
npx swagger-jsdoc -d swaggerDef.js -o openapi.yaml
From TypeScript types
npx openapi-typescript-codegen --input openapi.yaml --output ./sdk
### Validate OpenAPI
Validate spec
npx @redocly/cli lint openapi.yaml
Preview documentation
npx @redocly/cli preview-docs openapi.yaml