-
Notifications
You must be signed in to change notification settings - Fork 1
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
Validation not case sensitive for JSON keys #1
Comments
JSON schema is treating keys as case sensitive. When you send |
@4kochi I saw that I was not clear enough (I typed in speed obviously). SW should work as you described, and that is what I expected. However, there seems to be a bug, and both This is the bug I wanted to report, and it is vell described in the issue subject. Please reopen the issue. |
Maybe you can provide an example. But in JSON schema it is totally valid to send an object You can test this with this site: http://jsonschemalint.com/draft4/# Choose the sample "Sample schema and valid document". If you then change |
Thanks, I will check and keep you posted. My use case is that I have If both |
JSON Schema is case sensitive. If |
@4kochi Schema is here: https://github.com/Mainflux/mainflux-core-server/blob/master/app/models/deviceSchema.json and validaion code is here: https://github.com/Mainflux/mainflux-core-server/blob/master/app/controllers/devices.js#L44 Sending |
Ok, i found the problem. It was actually a problem with lx-valid. The required array you used in your schema I released a new version |
@4kochi good work! I confirm that it works correctly now. Bug fixed. Thanks! |
One more question - what happens to non-required fields? They are not validated for being capital or lowercase, as I can see. Is this OK by the spec, or this has to be corrected also? |
@4kochi I saw now that I opened the issue on the wrong project ;). New issue opened here: litixsoft/lx-valid#15 |
Both
{"name" : ...}
and{"Name": ...}
when Schema uses only capital "Name".The text was updated successfully, but these errors were encountered: