Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation mappings in separate JSON for checker #71

Closed
carlosmada22 opened this issue Feb 3, 2025 · 0 comments · Fixed by #72
Closed

Validation mappings in separate JSON for checker #71

carlosmada22 opened this issue Feb 3, 2025 · 0 comments · Fixed by #72
Assignees

Comments

@carlosmada22
Copy link
Collaborator

Currently, validation mappings are hardcoded within the checker, making it difficult to modify or extend them without code changes. To improve maintainability and flexibility, the mappings should be extracted into a separate JSON file that the checker can load dynamically.

Proposed Changes:

  • Create a structured JSON file to store validation mappings.
  • Modify the checker to read and apply validation rules from the external JSON.
  • Ensure proper error handling in case the JSON is missing or malformed.

Expected Benefits:

  • Easier updates to validation rules without modifying code.
  • Improved readability and maintainability.
  • Potential for reusability across multiple components.

Additional Notes:

  • Consider adding a fallback mechanism in case the JSON file is unavailable.
  • Validate JSON structure before use to prevent runtime issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant