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

Validate config with jsonschema #26

Merged
merged 4 commits into from
Apr 22, 2022

Conversation

iaindillingham
Copy link
Member

Aside from a couple of small enhancements, in this PR we replace the simple "are the observed keys the expected keys" approach to validation with jsonschema. This allows us to add more complex configuration in the future, which is discussed in #4 and #18. It also allows us to validate types, meaning that this will no longer pass validation:

config:
  show_outer_percentiles: definitely

This way, we setup logging as soon as reasonably possible.
Doing so allows us to add more complex configuration in the future e.g.
nested data structure; and allows us to validate types.
The latter displays a nicely formatted error message. Hat-tip to
@ccunningham101, who I saw using this recently.
@iaindillingham iaindillingham merged commit abbccb6 into main Apr 22, 2022
@iaindillingham iaindillingham deleted the iaindillingham/validate-with-jsonschema branch April 22, 2022 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants