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

"error: nullable value must be ["boolean"]" does not give line number #111

Open
mbylstra opened this issue Feb 11, 2021 · 1 comment
Open

Comments

@mbylstra
Copy link

I got this error:

schema docs/endpoints/schemas/get-employee.json is invalid
error: nullable value must be ["boolean"]

but unlike the other schema validation error messages, there is no hint as to where this error is coming from. It turned out that I had accidentally added nullable: "true" (this was a typo) in just one of the 100+ instances of nullable. This was extremely hard to find, and the error message didn't make it clear what the problem was in the first place.

Also, a suggestion to make the error message a bit easier to understand:

nullable value type must be one of ["boolean"] or just nullable value must be of type boolean (seems to be no reason to include a confusing array if there is only one possible type). Even better: nullable value must be of type boolean, not string

@bacebu4
Copy link

bacebu4 commented Mar 7, 2022

Yep, the same one here
Thanks to you, I could spend hours looking for diffs to figure it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants