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

Support options for ajv #75

Open
AlexAxthelm opened this issue Nov 7, 2023 · 1 comment
Open

Support options for ajv #75

AlexAxthelm opened this issue Nov 7, 2023 · 1 comment

Comments

@AlexAxthelm
Copy link

Hi,

I'm interested in using jsonvalidate for my projects, and one of the features that would be really helpful from ajv is being able to fill in default values from the schema.

Doing so would require being able to set the useDefaults option for ajv. Is there a way to pass options other than strict to json_schema$new() without using a modified version of in.js?

@richfitz
Copy link
Member

richfitz commented Nov 8, 2023

That's an interesting option, I can see that would be useful. There is not a way without modifying in.js - if you have the capacity/ability to create a PR that adds this functionality I can review it and get it added to the package, otherwise I will look at this next time I do some work on the package. It's probably not that much work to implement in practice, if the argument moves though in the same way as strict but unmarshalling json from R always throws up some odd cases

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