Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.65 KB

editor-features.md

File metadata and controls

49 lines (35 loc) · 1.65 KB

Editor Features

Language Servers

There are language servers that use schemas from SchemaStore.

YAML

TOML

Schema Properties

allowTrailingCommas

Visual Studio Code allows specifying whether trailing commas are allowed in the schema itself. Use the allowTrailingCommas field. See this PR if you wish to add this for your schema:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "allowTrailingCommas": true,
  ...
}

title as an expected object type

Let's say you have the following schema:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "first": {
      "title": "first",
      "type": "object"
    }
  },
  "title": "schema title"
}

If integer or another incorrect value is passed to first, then Incorrect type. Expected "first". error is shown. If title for this property is removed, then Incorrect type. Expected "schema title". is displayed. The most nested title is used for the error message.