Schema validation and auto-completion ΒΆ
Use a YAML editor with SchemaStore support to get validation and auto-completion for Nais manifests. The editor schema covers supported resources in the Nais manifest format.
For Kubernetes-style manifests such as Application, Naisjob, and Topic, use the Kubernetes-style editor schemas instead. SchemaStore may recognize their file names, but its Nais schema does not validate those resources.
Use automatic schema selection ΒΆ
- Use an editor that supports the SchemaStore catalog. In VS Code or VSCodium, install the YAML extension.
- Create a manifest named
nais.yaml, or a.yamlfile directly inside a.nais/directory, such as.nais/valkey.yaml. - Write a manifest for a resource supported by the Nais editor schema. The editor provides validation and auto-completion without a manual schema mapping.
Use a different file name ΒΆ
If your file does not match the names above, associate it with the schema in your editor. For example, in VS Code, add this to settings.json to validate files in a manifests/ directory:
settings.json
{
"yaml.schemas": {
"https://schemas.nais.io/editor.json": ["manifests/*.yaml"]
}
}Adjust the file pattern to match your files. The mapping does not change which resources the schema validates.