Validate a software template locally
To catch template errors before they reach a running instance, validate locally with no Red Hat Developer Hub connection required. The validate command runs YAML schema, gotcha, and optional Nunjucks checks so you can fix issues early and avoid failed catalog imports.
Before you begin
- You have installed the
rhdh-templatesskill and authored a template. - Optional:
djlintis installed for Nunjucks linting of skeleton files.
Procedure
-
Ask your agent to validate your template directory, including the root
location.yaml. - Ask your agent to lint Nunjucks in the skeleton files.
-
Ask your agent to auto-fix common issues, such as missing
{% raw %}blocks or wrong action ID casing. - Address any remaining findings manually, then ask your agent to validate the template again.
Results
- Validation reports
ok: truewith a critical count of0. Critical findings, such as a wrongapiVersionor invalid action casing, cause failures in the Template Editor. - You reviewed all warnings and decided whether to fix them before merging.