What problem does it solve?
Developing API endpoints often involves repetitive HTTP request/response handling, proper error management, and consistent documentation, which can be tedious and lead to inconsistencies. This skill provides patterns for clean, well-documented API controllers.
Core Features & Use Cases
- HTTP Request/Response Handling: Efficiently manage incoming requests and format outgoing responses using a consistent utility, reducing boilerplate code.
- Swagger Documentation: Automatically generate comprehensive API documentation using JSDoc annotations directly in your code, keeping docs in sync with implementation.
- Middleware Integration: Seamlessly integrate authentication and authorization middleware to secure your endpoints, centralizing access control.
- Use Case: Create a new API endpoint for managing user profiles. You'll define the route, implement the controller method to delegate to a service, and add Swagger annotations for automatic documentation, saving time on manual updates.
Quick Start
Create a new GET endpoint /api/v1/users/{id} to retrieve user details, ensuring it uses ApiResponse.success and has full Swagger documentation.