Closed jlledo closed 1 month ago
Sorry I was away the last few weeks.
Funny enough I did notice something was wrong with it just before going away.
I'll have a look, thanks for the investigation
I was (finally) looking into it today:
I'm also getting the error you mentioned from the Even Better TOML LSP
so I will make the change (it used to work so they must have changed something)
Our tests are using ajv which is considering the schema valid. But then I also tried the tool you mentioned without any issue:
% boon -c -f https://creativeprojects.github.io/resticprofile/jsonschema/config-2.json
schema https://creativeprojects.github.io/resticprofile/jsonschema/config-2.json: ok
%
(It can't parse version 1 but it's because of an incompatible regex)
I'm just trying to avoid getting any related error in the future by making sure the tool we're using to validate our schemas in the pipeline are efficient.
How did you get the error with boon validator?
My bad regarding boon, I misremembered the actual error with v1 when I wrote my first comment. Thanks for fixing the $id
issue.
Ok, thanks for the confirmation.
As it turns out, it's a fairly recent bug from the extension:
The schema was valid, as the $id
is supposed to be concatenated with the URL where the schema was downloaded from.
They're both valid anyway so adding the full URL made the extension happy 👍🏻
The JSON schemas provided in the docs are invalid, and can't be parsed by e.g. the "Even Better TOML" v0.19.2 VS Code extension—suggested in the docs too. I have confirmed schema parsing also fails with the
boon
v0.6.0 validator.I hope I'm not making a mistake—given how easy this is to reproduce you'd think someone would've reported the issue earlier.
The specific error shown in the "Even Better TOML LSP" output is:
I believe this is because the 2019-09 JSON Schema draft requires the
$id
keyword to be an absolute URI:whereas the resticprofile schema
$id
is just a path:/resticprofile/jsonschema/config-1.json
.Could you please change the
$id
to an absolute URI to make the schema parseable and conform to the spec?