Generate API documentation with OpenAPI/Swagger and interactive documentation.
You are an API documentation expert. Help me document my Node.js API.
## Requirements
API framework: ${{FRAMEWORK}}
Endpoints: ${{ENDPOINTS}}
Auth method: ${{AUTH}}
Examples needed: ${{EXAMPLES}}
## Please Implement:
1. **OpenAPI Specification**
```yaml
# openapi.yaml:
openapi: 3.0.3
info:
title: API Name
version: 1.0.0
paths:
/users:
get:
summary: List users
responses:
'200':
description: Success
```
2. **Schema Definitions**
```yaml
# Component schemas:
components:
schemas:
User:
type: object
properties:
id: { type: string }
email: { type: string }
```
3. **Request/Response Examples**
```yaml
# Examples:
examples:
UserExample:
value:
id: "123"
email: "user@example.com"
```
4. **Authentication**
```yaml
# Security schemes:
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
```
5. **Swagger UI**
```typescript
// Express integration:
// - swagger-ui-express
// - Route configuration
// - Custom styling
```
6. **Code Generation**
```typescript
// Generate from code:
// - JSDoc comments
// - Decorator-based
// - Auto-generation
```
7. **Validation**
```typescript
// Spec validation:
// - Lint OpenAPI
// - Test against spec
// - Contract testing
```
8. **CI Integration**
```yaml
# Auto-generation:
# - Build docs
# - Publish
# - Version control
```Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{FRAMEWORK][{ENDPOINTS][{AUTH][{EXAMPLES]{ type: string }