Skip to content

{ "type": null } in profiles.schema.json violates JSON Schema draft 2019-09 meta-schema #8024

@KalleOlaviNiemitalo

Description

@KalleOlaviNiemitalo

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:

"$schema": "https://json-schema.org/draft/2019-09/schema#",

The #/definitions/CloseOtherTabsAction and #/definitions/CloseTabsAfterAction schemas have a subschema { "type": null }:


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 the index 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SchemaThings that have to do with the json schema.Issue-DocsIt's a documentation issue that really should be on MicrosoftDocs/Console-DocsNeeds-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions