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

SchemaValidatorsConfig not propagated #187

Closed
jorcasso opened this issue Sep 18, 2019 · 3 comments
Closed

SchemaValidatorsConfig not propagated #187

jorcasso opened this issue Sep 18, 2019 · 3 comments

Comments

@jorcasso
Copy link

When loading a schema using $ref I have found a case where the configuration I use to instantiate the main schema is not being honored, in my case I want to set typeLoose=false, but it seems is not propagated.

I have taken a look to the code and I think the issue is in this line:

return new JsonSchema(new ValidationContext(this.uriFactory, jsonMetaSchema, this), mappedUri, schemaNode, true /*retrieved via id, resolving will not change anything*/);

A ValidationContext is instantiated there, but the SchemaValidatorsConfig passed as an argument is not used.

Please could you take a look?

@stevehu
Copy link
Contributor

stevehu commented Oct 4, 2019

@jorcasso Could you please review the change? Thanks.

@jorcasso
Copy link
Author

jorcasso commented Oct 7, 2019

Thanks for the fix @stevehu. I have managed to try the library with the fix and it resolves our issue. I guess it will be included in next release, right?

@stevehu
Copy link
Contributor

stevehu commented Oct 7, 2019

@jorcasso Thanks for the review and confirmation. Yes. It will be in the next release. We still have several pending issues to merge before the release but it will be soon.

@stevehu stevehu closed this as completed in 6db536a Oct 7, 2019
stevehu added a commit that referenced this issue Oct 7, 2019
fixes #187 SchemaValidatorsConfig not propagated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants