Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jsonschema): sets default values defined in the schema
When we moved to validate `jsonschemas` on the fly instead of using the pre-compiled validation code, we regressed the existing implementation by not realizing that the validation isn't setting defaults anymore. In order to solve the issue, we referred to the following link, https://python-jsonschema.readthedocs.io/en/stable/faq/#why-doesn-t-my-schema-s-default-property-set-the-default-on-my-instance Since we are using the draft07 of JSONSchema, we referred to the article and updated the code to define a default validator by extending the Draft7Validator class to set defaults. We now use this default validator instead of the `jsonschema.validate` method.
- Loading branch information