Overview
The easey-mdm-api is responsible for managing metadata and must have robust input validation in place.
This ticket focuses on adding proper input validation across all endpoints to prevent invalid metadata submissions
and mitigate potential security risks.
Key Tasks
- Implement input validation for metadata creation and updates, including ensuring that all required fields are properly sanitized and validated.
- Use decorators to enforce input type checks (e.g., strings, numbers, enums).
- Add input sanitization to prevent SQL injection or improper metadata handling.
- Ensure that all metadata entries are validated for correctness and completeness.
- Write unit tests to confirm validation logic.
Acceptance Criteria
- All metadata inputs should be validated for correctness and type before processing.
- Invalid inputs should return appropriate error responses (e.g., `400 Bad Request`).
- SQL injection must be prevented via input sanitization and parameterized queries.
- Unit tests must confirm that validation and sanitization logic is working as expected.
Body: