--- alias: user-guide-automation-json-schema-validation-in-editors tags: - automation - connect iot description: "JSON editors across the Automation area validate input against JSON schemas, surfacing inline help and warnings while you type" --- # JSON Schema Validation in Editors Several **Automation** editors that accept raw JSON validate the content you type against a published JSON schema and provide inline guidance directly in the code editor. The goal is to catch malformed or unexpected configurations before they are saved, and to surface the meaning of each property without having to leave the editor. ## What You Get When you type or paste JSON into a schema-aware editor: * **Inline validation markers** highlight properties that do not match the schema, such as unknown property names, wrong data types, missing required fields, or values outside the allowed set. * **Hover tooltips** show the description of the property under the cursor, including which values are allowed. * **Auto-completion** suggests valid property names and enum values as you type (open the suggestion list with `Ctrl+Space`). ![Schema-aware JSON editor showing an inline marker, a hover tooltip with the property description, and a completion popup with the allowed property names.](images/json_schema_editor_overview.png) !!! info The inline help is generated from the schema attached to that specific editor. Different editors use different schemas - for example, the editor for Automation Manager Configuration offers different completions than the editor for Automation Business Scenario metadata. ## Severity Levels Each editor configures one of three validation behaviors. | Severity | Editor behavior | Save allowed? | |-----------|------------------------------------------------------------------------------------------------------------------|---------------| | `error` | Schema violations are shown as errors (red markers) and the value fails validation. | **No** | | `warning` | Schema violations are shown as warnings (yellow markers) but do not prevent the value from being saved. | Yes | | `ignore` | The schema is loaded for hover tooltips and completions, but violations are not reported. | Yes | Table: Severity Levels !!! warning Most of the editors listed below ship with the `warning` severity, so a non-conformant JSON can still be saved. This includes the Templates editor of the Custom Driver Definition task. In a future release the severity will be raised to `error` for these editors, so we recommend resolving every warning shown in the editor as you author the content, to avoid future migration work. ## Editors That Ship with a Schema The following editors come pre-configured with a JSON schema: | Editor | Where to find it | | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Automation Business Scenario** - Metadata step | [[user-guide-create-automation-business-scenario|Create]] / [[user-guide-edit-automation-business-scenario|Edit]] Automation Business Scenario | | **Automation Manager Configuration** | [[user-guide-automation-manager-configure|Configure Automation Manager]] | | **Automation Manager Deployment Configuration** | [[user-guide-automation-manager-configure-deployment|Configure Automation Manager Deployment]] | | **Automation Tasks Library** - Metadata step | [[user-guide-create-automation-tasks-library|Create]] / [[user-guide-edit-automation-tasks-library|Edit]] Automation Tasks Library | | **Automation Controller Workflow** - Page Settings (JSON view) | [[user-guide-workflow-designer|Workflow Designer]] - different schemas are used for **Control Flow** and **Data Flow** workflows. | | **Custom Driver Definition task** - Templates | [[user-guide-automation-task-core-customtemplates|Custom Driver Definition]] | Table: Editors That Ship with a Schema !!! note Some properties (for example `ImageName`, `UserName` and `UserAccount` in the Automation Manager Deployment Configuration) are filled automatically by the system in normal operation. The schema documents each of these as such, so a hover tooltip in the editor will tell you when a value will be overwritten by the platform. ## Working with the Editor * Hover any property name to see its description and allowed values. * Press `Ctrl+Space` inside the JSON to open the completion list at the cursor position. * Trigger the **Quick Suggestions** for an enumerated property to see only the values accepted by the schema. * Validation runs continuously - there is no "validate" button; warnings appear as you type. ## Authoring Schemas for Custom Task Settings If you write custom task settings in an **Automation Tasks Library** (the Settings JSON consumed by tasks), each setting can declare its own JSON schema for the value it edits. See [[user-guide-using-automation-tasks-library-settings#json-schema-validation-for-settings|Using Automation Tasks Library Settings]] for the `schemas` and `schemaValidation` fields available on a setting.