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-templates skill and authored a template.
  • Optional: djlint is installed for Nunjucks linting of skeleton files.

Procedure

  1. Ask your agent to validate your template directory, including the root location.yaml.
  2. Ask your agent to lint Nunjucks in the skeleton files.
  3. Ask your agent to auto-fix common issues, such as missing {% raw %} blocks or wrong action ID casing.
  4. Address any remaining findings manually, then ask your agent to validate the template again.

Results

  1. Validation reports ok: true with a critical count of 0. Critical findings, such as a wrong apiVersion or invalid action casing, cause failures in the Template Editor.
  2. You reviewed all warnings and decided whether to fix them before merging.

What to do next