Implement the following endpoints:
| Method |
Endpoint |
Success Code |
Error Codes |
Description |
| POST |
/templates |
201 Created |
400 |
Creates a template. |
| GET |
/templates |
200 OK |
400 |
Retrieves a list of all templates. Only return most important information of template. |
| GET |
/templates/{id} |
200 OK |
400, 404 |
Retrieves a specific sport by its ID. Only return most important information of template. |
| GET |
/templates/{id}/details |
200 OK |
400, 404 |
Retrieves a specific sport by its ID. Return the entire template. |
| PUT |
/sports/{id} |
204 No Content |
400, 404 |
Updates an existing template by its ID. |
| DELETE |
/sports/{id} |
204 No Content |
400, 404 |
Deletes a specific template by its ID. |
- Protocol: JSON over HTTP.
- Headers: All requests sending data and all responses must include Content-Type: application/json.
- Error Payloads: 400 Bad Request and 404 Not Found responses must return a plain JSON object containing error details (e.g., {"error": "Template not found"}).
Implement the following endpoints: