-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
{ "type": null } in profiles.schema.json violates JSON Schema draft 2019-09 meta-schema #8024
Comments
|
@KalleOlaviNiemitalo - I don't think that it is that important to forbid |
* The index field should be of type `"null"` and not `null`. * The default value should be `null` and not `""` Closes #8024
AFAIK, one would do it like this: "index": {
"type": "integer",
"description": "Close the tabs other than the one at this index. If no index is provided, use the focused tab's index."
} If the |
…t#8547) * The index field should be of type `"null"` and not `null`. * The default value should be `null` and not `""` Closes microsoft#8024
https://aka.ms/terminal-profiles-schema redirects to https://raw.githubusercontent.com/microsoft/terminal/release-1.3/doc/cascadia/profiles.schema.json, i.e. the raw view of https://github.com/microsoft/terminal/blob/release-1.3/doc/cascadia/profiles.schema.json. That schema uses the https://json-schema.org/draft/2019-09/schema# meta-schema:
terminal/doc/cascadia/profiles.schema.json
Line 3 in 327ddd7
The
#/definitions/CloseOtherTabsAction
and#/definitions/CloseTabsAfterAction
schemas have a subschema{ "type": null }
:terminal/doc/cascadia/profiles.schema.json
Line 401 in 327ddd7
terminal/doc/cascadia/profiles.schema.json
Line 420 in 327ddd7
That is not valid according to https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1, referenced by http://json-schema.org/specification-links.html#2019-09-formerly-known-as-draft-8. The value of type "MUST be either a string or an array";
null
is neither.{ "type": "null" }
would be valid according to the meta-schema, but it would not match the documentation https://docs.microsoft.com/windows/terminal/customize-settings/actions#close-tabs-after-index, which says that theindex
property is optional but does not say that an explicit{ "index": null }
is allowed.The
null
literals were added in #7390. Meta-schemas were also discussed in #7683.The text was updated successfully, but these errors were encountered: