Schema and editor setup

DNML files are TOML. Add the DNML JSON Schema to your editor to find key and type errors.

Schema URL

The DNML 1.0 schema uses JSON Schema draft 2020-12. It covers request files and the collection.dnml marker.

https://dynomate.io/schemas/dnml-1.0.schema.json

What the Schema Checks

The schema checks the structure of a file:

  • Top-level keys, and the [variables], [defaults] and [execution] tables.
  • Unknown keys, except extension keys under x or with the prefix x-.
  • Required keys, value types and valid values.
  • Typed values, table ARNs and S3 locations.
  • ${...} expressions where DNML accepts them.

The app and the CLI also check these items before each run:

To check a file fully, open it in the app or run it with the CLI. See Error codes.

Editor Setup

VS Code

  1. Install the Even Better TOML extension.
  2. Open your user or workspace settings.json.
  3. Add these settings:
{
  "files.associations": {
    "*.dnml": "toml"
  },
  "evenBetterToml.schema.associations": {
    ".*\\.dnml$": "https://dynomate.io/schemas/dnml-1.0.schema.json"
  }
}

The key under evenBetterToml.schema.associations is a regular expression for the file path.

For one file only, add this directive on the first line:

#:schema https://dynomate.io/schemas/dnml-1.0.schema.json
version = "1.0"
name = "find-and-update-order"

The app removes all comments when it saves a request. If you edit requests in the app, use the settings.

JetBrains IDEs

  1. Make sure that TOML support is active in your IDE.
  2. Open Settings and go to Editor › File Types.
  3. Add *.dnml to the file name patterns of TOML.
  4. Go to Languages & Frameworks › Schemas and DTDs › JSON Schema Mappings.
  5. Add a mapping.
  6. Enter the schema URL as the schema file or URL.
  7. Add the file pattern *.dnml.