You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently made a change for the SchemaStore Cargo.toml schema that added support for [lints]/[workspace.lints].
For workspace.lints specifically, this looks like:
"lints": {
"$ref": "#/definitions/Lints",
"description": "The `workspace.lints` table is where you define lint configuration to be inherited by members of a workspace.",
"x-taplo": {
"links": {
"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"
}
}
},
You can see that both $ref and description are defined for this property. However, when using the Taplo LSP/extension in VS Code (and presumably in other editors), hovering over the lints part of workspace.lints shows no information/tooltip:
When applying the same schema in a JSON file with the same contents, hovering over the lints property of workspace.lints does show a tooltip:
I suspect this is an issue where when resolving the $ref, the description field is ignored.
I can confirm that the definition on hover works in general with the TOML file, as evidenced by the tooltip shown if I hover over the clippy property of workspace.lints:
And of course this still works for the JSON file:
The text was updated successfully, but these errors were encountered:
This might be an issue with https://github.com/Stranger6667/jsonschema, not sure exactly where the responsibility for this comes from. Happy to remake this over there if this is the case.
I'm now wondering if this is of my own fault. It is more likely that the behavior I expect is simply not how JSON Schema itself works/is defined. In that case I can probably use something like https://github.com/orgs/json-schema-org/discussions/502 to move the reference out of the top level area for this property, but let me know if my schema snippet is invalid and I can close this :)
I recently made a change for the SchemaStore
Cargo.toml
schema that added support for[lints]
/[workspace.lints]
.For
workspace.lints
specifically, this looks like:(https://github.com/SchemaStore/schemastore/blob/7c91a8e5a643d68cd11ce7ebcd18214a88d1cf7e/src/schemas/json/cargo.json#L1185-L1193)
You can see that both
$ref
anddescription
are defined for this property. However, when using the Taplo LSP/extension in VS Code (and presumably in other editors), hovering over thelints
part ofworkspace.lints
shows no information/tooltip:When applying the same schema in a JSON file with the same contents, hovering over the
lints
property ofworkspace.lints
does show a tooltip:Contents of the two files for reference
I suspect this is an issue where when resolving the
$ref
, thedescription
field is ignored.I can confirm that the definition on hover works in general with the TOML file, as evidenced by the tooltip shown if I hover over the
clippy
property ofworkspace.lints
:And of course this still works for the JSON file:
The text was updated successfully, but these errors were encountered: