date-time validation
ubmarco opened this issue · 4 comments
Hi,
thanks for this awesome coc extension, I use it often. I stumbled upon a problem with date-time validation.
This is my schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time"
}
}
}
This is my JSON:
{
"date": "020-12-23T18:25:43.511Z"
}
The year is missing the first digit and coc-json does not report any errors. Actually no errors are detected, it seems like it ignores the validation. When I set the format
to email
, all erroneous mail addresses are reported, so the format validation is working.
Here is how it should behave: https://www.jsonschemavalidator.net/s/AjNuDoH9
Is that a known issue?
Should be problem of https://github.com/Microsoft/vscode-json-languageservice
I opened this ticket for vscode-json-languageservice and they say date-time
validation was added in version 3.3.1 while coc-json
uses 3.3.0.
Can we update to 3.3.1?
Sure, but it's not easy for coc-json
Thanks for the feedback. May I ask what obstacles you see?
When I look ad the diff between 3.3.0 and 3.3.1 it seems no big structural changes were done in the LS. I can help if you guide me just a little.