Generate RESTful APIs from schemas with proper routing, validation, and documentation
Installation
Open Claude Code and run this command:
/plugin install rest-api-generator@claude-code-plugins-plus
Use --global to install for all projects, or --project for current project only.
What It Does
Generate production-ready RESTful APIs from schema definitions with proper routing, validation, error handling, and documentation.
Features
- REST Principles - Resource-based URLs, proper HTTP methods
- Validation - Request body, query params, path params
- Authentication - JWT, OAuth, API key support
- Documentation - OpenAPI 3.0 specification
- Testing - Integration tests with Jest/Pytest
- Pagination - Limit, offset, cursor-based
- Filtering - Query parameter filtering
- Sorting - Multi-field sorting
- Rate Limiting - Prevent API abuse
- CORS - Cross-origin support
- Error Handling - Standardized error responses
Skills (1)
Generate complete REST API implementations from OpenAPI specifications or database schemas.
ReadWriteEditGrepGlobBash(api:rest-*)
How It Works
Basic Usage
/generate-rest-api
Or use the shortcut:
/gra
What It Does
- Asks about your API requirements (resources, operations, framework)
- Generates complete REST API structure with routes, controllers, models
- Adds validation schemas with Joi, Pydantic, or Zod
- Implements authentication middleware (JWT, OAuth, API keys)
- Creates OpenAPI/Swagger documentation
- Generates integration tests for all endpoints
- Follows REST best practices (proper HTTP methods, status codes, pagination)
Example Interaction
You: /generate-rest-api
Claude: I'll help you generate a RESTful API. Let me gather some details:
1. What resources/entities do you need? (e.g., users, posts, products)
2. What framework would you like? (Express, FastAPI, Django, Flask, NestJS)
3. What database? (PostgreSQL, MongoDB, MySQL)
4. Do you need authentication? (JWT, OAuth, API keys)
You: Users and posts, Express with PostgreSQL, JWT auth
Claude: [Generates complete API structure with routes, controllers, models, validation, tests, and OpenAPI docs]