Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 2.16 KB

config-schema.md

File metadata and controls

40 lines (30 loc) · 2.16 KB

GutenTAG generation configuration schema

GutenTAG comes with YAML/JSON schema definitions for the generation configuration files (such as example-config.yaml). You can find the schema definitions in the folder `gutenTAG/config/schema/'.

The schema can be used to enhance IDEs and editors with syntax highlighting, code completion, and linting features for the GutenTAG configuration files.

The file guten-tag-generation-config.schema.yaml is the base schema that references the following sub-schemas:

  • oscillation.guten-tag-generation-config.schema.yaml for the definition of base oscillations and trends.
  • anomaly.guten-tag-generation-config.schema.yaml for the definition of anomalies.
  • anomaly-kind.guten-tag-generation-config.schema.yaml for the definition of anomaly kinds (only used within anomaly.guten-tag-generation-config.schema.yaml).
  • formula.guten-tag-generation-config.schema.yaml for the definition of formula base oscillations (only used within oscillation.guten-tag-generation-config.schema.yaml).

IDE/Editor configuration

Visual Studio Code

  1. Install and enable the Red Hat VSCode YAML plugin

  2. Add a mapping for files that should be checked against the GutenTAG schema guten-tag-generation-config.schema.yaml to your settings. E.g. for the example-config.yaml-file included in this repository:

    {
      "yaml.schemas": {
         "./gutenTAG/config/schema/guten-tag-generation-config.schema.yaml": [
            "generation_configs/example-config.yaml"
         ]
      }
    }

JetBrains (PyCharm)

  1. Open the desired file (e.g. the example-config.yaml)
  2. In the lower right corner, click on No JSON schema PyCharm select schema
  3. In the upcoming dropdown list, select New schema mapping ...
  4. Select the file gutenTAG/config/schema/guten-tag-generation-config.schema.yaml and give this schema a representative name. Hit OK. PyCharm create schema mapping