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

Implement JSONSchema Validation for Config File Loading #11

Open
le91688 opened this issue Jun 21, 2023 · 0 comments
Open

Implement JSONSchema Validation for Config File Loading #11

le91688 opened this issue Jun 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@le91688
Copy link
Contributor

le91688 commented Jun 21, 2023

Title: Implement JSONSchema Validation for Config File Loading

Description:

In order to ensure the integrity and correctness of our configuration data, we propose to implement automatic JSONSchema validation in the load_config function. This will verify that all required fields exist and that they are of the correct type, improving our application's robustness and error-handling capabilities.

Tasks:

  1. Write a JSONSchema template that reflects the expected structure and data types in our configuration files.
  2. Incorporate the JSONSchema validator into the load_config function to validate configuration data against the template.
  3. Handle potential exceptions that may arise from validation failures, providing informative error messages to aid in troubleshooting.
  4. Test the new load_config function with various valid and invalid configuration files to ensure correct operation.
  5. Update relevant documentation to reflect the new JSONSchema validation feature.

Acceptance Criteria:

  • A JSONSchema template is created that accurately reflects our configuration file structure and data types.
  • The load_config function uses the JSONSchema validator to check configuration files.
  • Exceptions from validation failures are handled appropriately and provide helpful error messages.
  • The updated load_config function is fully tested with different configuration file scenarios.
  • Related documentation is updated with information on the new JSONSchema validation feature.
@le91688 le91688 changed the title [IMPROVEMENT] JSON schema validation Implement JSONSchema Validation for Config File Loading Jun 27, 2023
@le91688 le91688 added the enhancement New feature or request label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant