From 4ce7ef3f444ec7d2de9c351b189b372c3b518591 Mon Sep 17 00:00:00 2001 From: Madeline <92826525+Madeline-UX@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:51:27 -0500 Subject: [PATCH] Update-docs-Getting-started-vs-code (#1459) ## Description Current: Docs steps for adding schema validation was confusing to follow Changes: - Clarification of steps for adding schema validation - added code example for adding schema version to a yaml file ## Related Issue Fixes # ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Other (security config, docs update, etc) --------- Co-authored-by: Wayne Starr --- docs/4-user-guide/6-vscode.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/4-user-guide/6-vscode.md b/docs/4-user-guide/6-vscode.md index 53603cd574..55e9b39f27 100644 --- a/docs/4-user-guide/6-vscode.md +++ b/docs/4-user-guide/6-vscode.md @@ -4,20 +4,22 @@ Zarf uses its own [schema](https://github.com/defenseunicorns/zarf/blob/main/zar ## Adding schema validation -1. Open VS Code's `settings.json` file with `CTRL/CMD + SHIFT + P` and search for `Preferences: Open User Settings (JSON)`. -2. Add the below to your config, or modify the existing `yaml.schemas` object to include the Zarf schema. - -:::note - -The [YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) by RedHat is a prerequisite for this feature. - -::: +1. Open VS Code +2. Install the [YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) by RedHat. +3. Open the VS Code command pallete by typing `CTRL/CMD + SHIFT + P`. +4. Type `Preferences: Open User Settings (JSON)`into the search bar to open the `settings.json` file. +5. Add the below to the settlings.json config, or modify the existing `yaml.schemas` object to include the Zarf schema. ```json "yaml.schemas": { "https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json": "zarf.yaml" } ``` +:::tip + +yaml.schema line turns the same color as other lines in the setting when installed succesfully!! + +::: ## Specifying Zarf's schema version @@ -30,3 +32,7 @@ This can be accomplished by adding the below to the **first** line of any given ``` Where `` is one of [Zarf's releases](https://github.com/defenseunicorns/zarf/releases). + +### Code Example + +![yaml schema](https://user-images.githubusercontent.com/92826525/226490465-1e6a56f7-41c4-45bf-923b-5242fa4ab64e.png)