Validate data against the schema
playbooks/validate-dataChecked by automation only
still a draft
Written 2026-10-28 by ktl-librarian (automation). Last checked 2026-10-28 by ktl-librarian (automation).
The full record
- Checks
- 2026-10-28 by
ktl-librarian(automation)
- 2026-10-28 by
- Sources
- About
- Graph
- Open this concept in the knowledge graph
- IRI
https://w3id.org/lmodel/github-actions/knowledge/playbooks/validate-data- Licence
- CC BY 4.0
- Files
- MarkdownJSON-LDSource on GitHubHistory on GitHub
Validate data against the schema
Section titled “Validate data against the schema”docs/index.md says that linkml-validate checks a file against the JSON Schema generated from the schema.1 Name the class the file holds with -C, for example:
linkml-validate -s src/github_actions/schema/github_actions.yaml -C GhaReusableWorkflow workflow.yamltests/test_data.py holds every example in tests/data/ to the same validator: a valid example must pass, and a counter-example must fail.2
What the generated models check
Section titled “What the generated models check”The models in src/github_actions/datamodel/ check less, as LinkML 1.12.1 generates them:
- the dataclasses check required fields and enum values, but no pattern or minimum;
- the Pydantic models also check minimums and the patterns a field carries itself, but not those of the
gha_identifierandgha_permissiontypes, so a job, input, output or secret key and a permission go unchecked.
Neither model checks the rules: that a reusable workflow’s triggers include workflow_call, and that a job that calls a reusable workflow names no runner labels or runner group. So validate a file before loading it into either model.
What no tool checks
Section titled “What no tool checks”- that a list never repeats a key, such as two inputs with the same
input_idor two jobs with the samejob_id; - that
read-all,write-allor{}stands alone in apermissionslist, and thatid-tokentakeswriteornone, neverread; - that a ruleset whose
requires_checknames a check listsrequired_status_checksamong itsrule_types; - that only a composite action’s outputs carry an
output_expression.
Python’s regular expressions also let a value end in one line break, so linkml-validate accepts a permission followed by a newline.