Atmos Schemas
Atmos Manifest JSON Schema
Atmos Manifest JSON Schema can be used to validate Atmos stack manifests and provide auto-completion.
Validate and Auto-Complete Atmos Manifests in IDEs
In supported editors like JetBrains IDEs, Microsoft Visual Studio or Visual Studio Code, the schema can offer auto-completion and validation to ensure that Atmos stack manifests, and all sections in them, are correct.
A list of editors that support validation using JSON Schema can be found here.
Validate Atmos Manifests on the Command Line
Atmos can use the Atmos Manifest JSON Schema to validate Atmos stack manifests on the
command line by executing the command atmos validate stacks
.
For this to work, configure the following:
-
Add the Atmos Manifest JSON Schema to your repository, for example in
stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
-
Configure the following section in the
atmos.yaml
CLI config fileatmos.yaml# Validation schemas (for validating atmos stacks and components)
schemas:
# JSON Schema to validate Atmos manifests
atmos:
# Can also be set using 'ATMOS_SCHEMAS_ATMOS_MANIFEST' ENV var, or '--schemas-atmos-manifest' command-line arguments
# Supports both absolute and relative paths (relative to the `base_path` setting in `atmos.yaml`)
manifest: "stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json" -
Execute the command
atmos validate stacks
-
Instead of configuring the
schemas.atmos.manifest
section inatmos.yaml
, you can provide the path to the Atmos Manifest JSON Schema file by using the ENV variableATMOS_SCHEMAS_ATMOS_MANIFEST
or the--schemas-atmos-manifest
command line argument:ATMOS_SCHEMAS_ATMOS_MANIFEST=stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json atmos validate stacks
atmos validate stacks --schemas-atmos-manifest stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
In case of any validation errors (invalid YAML syntax, Atmos manifest JSON Schema errors, invalid imports, etc.), you'll get an output from the command similar to the following: