This document explains how to configure specific IDEs to improve your development experience when developing UDS packages, such as setting up schema validation for Zarf packages, UDS bundles and Maru tasks.
To configure your VSCode for schema validation, you must install a yaml language support extension. From there you have three options. You can configure VSCode globally, on a per repo basis or per file basis to provide validations.
Open the command palette and select the specific level of settings you want to modify. For example select default from the options provided.
In the file that opens, add your yaml language server specific settings (and any other setting you may want globally) in line with the example configuration. Then save the settings.
Either manually or via the Command Palette, create a .vscode/settings.json
at the repo level you are working on. In that settings.json
, you can add the appropriate yaml.schemas
settings, similar to what is found in the example in this repo.
Note
The references to schema versions are tied to git tags in the example; depending on your goals, it may be appropriate to do this to validate the schema is correct for the version of the tools you expect to be using in the repo. Otherwise, to check if the schema is up to date with the latest, you can have the links to each json schema pointed at main
.
Add a comment at the top of each file pointing to the specific json schema you want validation against. Below is an example of what that would look like for a zarf.yaml
:
# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json
kind: ZarfPackageConfig
metadata:
name: example
...