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
timezone should be more strict according to the JSON-schema spec #1193
Comments
I think we should raise this question to JSON Schema and the relevant test cases could be added to JSON-Schema-Test-Suite. cc @Julian |
PR with the change: #1062 cc @cjpillsbury - what do you think? |
Sounds good to me! |
@epoberezkin @Julian tldr; yeah I think we should ask JSON Schema what they think a spec-compliant implementation should do re:RFC 3339/ISO 8601. That said, given the definitions of the specifications in question, your implementation w/the 1062 changes is spec compliant as it stands. Specifications use normative language very intentionally so, even if we interpret JSON Schema as a "new protocol on the internet" (instead of, e.g., a "schematization of pre-existing protocols actively used on the internet"), SHOULD is a (strong?) recommendation, whereas MUST is a requirement to be spec-compliant. Some considerations:
|
The timezone of the
date-time
format is too lazy since #1061 has been resolved.According to the JSON-schema specification about date-time :
and thus according to the RFC 3339:
particularly the
time-numoffset
does explicitly said that the format must include:
and thetime-inute
The thing that I am not sure of is the following part:
Does this mean that we need to follow ISO8601 or the subset defined after this phrase ?? 🤔
Some searches about the subject:
What version of Ajv are you using? Does the issue happen if you use the latest version?
Every version since #1061 has been resolved
JSON Schema
Sample data
Should not be valid :
"2020-04-21T18:00:00+0200"
"2020-04-21T18:00:00+02"
Should be valid :
"2020-04-21T18:00:00+02:00"
Your code
Validation result, data AFTER validation, error messages
What results did you expect?
Are you going to resolve the issue?
I can if you agree with the process
The text was updated successfully, but these errors were encountered: