Documentation
¶
Overview ¶
Package recipe owns the embedded-and-installable validator recipes that aiwf ships out of the box.
A recipe is a single markdown file with a YAML frontmatter block that declares a validator. The frontmatter is the validator block the install verb appends to aiwf.yaml.contracts.validators; the markdown body is documentation served by `aiwf contract recipe show`.
Frontmatter shape:
---
name: <validator-name>
command: <executable>
args:
- <argv elements, may include {{schema}} {{fixture}} {{contract_id}} {{version}}>
---
Two recipes ship in I1 — `cue` and `jsonschema`. New recipes are added by dropping a markdown file into embedded/ and rebuilding; no engine code change is required.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("recipe not found")
ErrNotFound is returned when a requested recipe name is not in the embedded set.
Functions ¶
This section is empty.
Types ¶
type Recipe ¶
Recipe is the parsed, ready-to-install form of an embedded recipe. Validator carries the bytes that will land in aiwf.yaml.contracts.validators[Name]; Markdown is the full documentation including the frontmatter (so `recipe show` can reproduce the file as authored).
func Get ¶
Get returns the embedded recipe named name, or ErrNotFound if no embedded recipe carries that name in its frontmatter. The lookup is by frontmatter `name:`, not filename — though the convention is for them to match.