IDE Setup

In order for the code editor to provide autocomplete suggestions and validate the configuration, we must associate the JSON Schema of TDK configuration with the file being edited. Here is how we can do it for most popular IDEs.

Getting the JSON schema

The JSON Schema file for your version of TDK can be obtained by running

tdk json-schema

The schema file for the current version of TDK can be also downloaded here: userconfig.schema.json.

Setup Visual Studio Code

Open the IDE settings (File → Preferences → Settings), search for "Yaml: Schemas" and click on “Edit in settings.json".

vs code settings

The settings.json will be opened with the corresponding section already created.

Fill it with the mapping of the schema with a file name mask:

"yaml.schemas": {
  • For SCHEMA_LOCATION use either file:// url to your locally stored JSON schema file or the hyperlink to userconfig.schema.json.

  • You can choose any FILE_MASK convenient for you, e. g. */

Now create a file and verify that validation and autocompletion is available:

vs code autocompletion

Setup JetBrains family of IDEs

Open File → Settings and search for "JSON Schema mappings". Click "Add" to create a new mapping. Enter "SynthesizedWorkflow" as "Name" and use either the file name of your locally stored JSON schema or the hyperlink to userconfig.schema.json for "Schema file or URL".

idea settings

Then you can associate this schema with a file, file pattern or a directory, for example, with a file pattern

Now create a file anywhere and make sure that autocompletion is available:

idea autocompletion