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

Allow passing options through to Ajv #29

Merged
merged 2 commits into from
Feb 10, 2020
Merged

Allow passing options through to Ajv #29

merged 2 commits into from
Feb 10, 2020

Conversation

bigpopakap
Copy link
Contributor

@bigpopakap bigpopakap commented Feb 10, 2020

I would like to be able to pass options through to Ajv (here is the doc about the available options. For my particular use case, I want to set verbose: true; removeAdditional: true, allErrors: true

src/json-schema.ts Outdated Show resolved Hide resolved
src/tsjson.test.ts Outdated Show resolved Hide resolved
Copy link
Owner

@ostrowr ostrowr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I'm definitely game to add the ajvOptions parameter.

Do you mind splitting this into 2 PRs – one that adds the ajvOptions parameter, which I'll be happy to take ASAP – and one that changes the type on AdditionalProperties? I want to discuss that change a little more, since I'm not sure I want to explicitly only allow false for that type.

@bigpopakap
Copy link
Contributor Author

Thanks for the quick response! I just split it up (but I left the package-lock.json change in this PR, if that's ok)

@bigpopakap bigpopakap changed the title Allow passing options through to Ajv, and allow setting additionalProperties to false Allow passing options through to Ajv Feb 10, 2020
Copy link
Owner

@ostrowr ostrowr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! And thanks for catching the package-lock.json thing...

@ostrowr ostrowr merged commit 31f98ac into ostrowr:master Feb 10, 2020
@bigpopakap bigpopakap deleted the ajv-options branch February 10, 2020 18:46
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.

None yet

3 participants