Full CRUD API Endpoint Generator
Generate complete CRUD operations for any resource with model definitions, route setup, input validation, error handling, and proper status codes.
The prompt
4 slots to fillprompt.md702 chars
Generate the full CRUD logic for managing a resource in .
Include:
1. **Model/Schema definition** with appropriate types and validation
2. **Controller/Handler methods** for Create, Read (single + list with pagination), Update, and Delete
3. **Route setup** following RESTful conventions
4. **Input validation** for all endpoints
5. **Error handling** with appropriate HTTP status codes (400, 404, 409, 500)
6. **TypeScript types** for request/response shapes
Requirements:
- Use best practices
- Include comments explaining design decisions
- Handle edge cases (duplicate entries, not found, invalid input)
- Return consistent response shapes
Additional context:
3/4 slots filled
Workshop
Discussion
What people are saying
Forks
0 forks of this promptLoading forks…