Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 2.01 KB

editor-features.md

File metadata and controls

74 lines (50 loc) · 2.01 KB

Editor Features

Language Servers

There are language servers that use schemas from SchemaStore.

YAML

TOML

Custom Schema Properties

VSCode

  • allowTrailingCommas
  • defaultSnippets
  • markdownDescription

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,
  ...
}

Taplo

  • x-taplo
  • x-taplo-info

More information here.

IntelliJ

  • x-intellij-language-injection
  • x-intellij-html-description
  • x-intellij-enum-metadata

Unknown

  • x-for

Schema Properties

title as an expected object type

Consider 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.