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

ensure that nullable is not set for required parameters #2079

Merged
merged 2 commits into from
Nov 13, 2022

Conversation

erikbrinkman
Copy link
Collaborator

nullable was enforced for optional parameters, but not forbidden for
required parameters. This tests and enforces the latter case.

What issue does this pull request resolve?

fixes #2030

at least partially

What changes did you make?

add nullable?: false and tests

Is there anything that requires more attention while reviewing?

nope

nullable was enforced for optional parameters, but not forbidden for
required parameters. This tests and enforces the latter case.

fixes ajv-validator#2030
@erikbrinkman
Copy link
Collaborator Author

I should note that typescript 4.8 causes errors with the JTD schema type, so I restricted the typescript version too.

@epoberezkin
Copy link
Member

Fixed the error in 4.8 now, so made it >= 4.8

@epoberezkin epoberezkin added the OK label Nov 13, 2022
@epoberezkin epoberezkin merged commit 00b3939 into ajv-validator:master Nov 13, 2022
@erikbrinkman erikbrinkman deleted the fix-nullable-param branch November 14, 2022 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

JSONSchemaType allows schemas with optional attributes for Types where they are required
2 participants