Modernize Legacy API to RESTful Standards
Refactor a legacy API endpoint to follow RESTful conventions and modern best practices.
modernization
api
rest
backend
refactor
upgrade
0
Prompt
Modernize this legacy API endpoint to follow RESTful standards and current best practices. Requirements: - Use proper HTTP methods (GET, POST, PUT, PATCH, DELETE) - Implement consistent resource naming - Add proper status codes (200, 201, 204, 400, 404, 500, etc.) - Include request/response validation - Add error handling with meaningful messages - Follow async/await patterns - Add TypeScript types for request/response Legacy endpoint: [Paste your endpoint code here] Explain the changes made and how they improve the API design.