Documentation
¶
Overview ¶
Package schema carries the schema command, which prints the JSON Schema of one kubectl-nv kind, and the generator behind "make schema" that keeps the checked-in copies of those schemas in step with the code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDrift ¶
func CheckDrift(registry *output.SchemaRegistry, dir string) error
CheckDrift reports every way the schemas checked in under dir disagree with what the registry generates: a file that differs, a kind with no file, and a file no kind claims. All three are reported at once, because fixing them one error message at a time is three runs of the suite.
The checked-in schemas are the published contract. A consumer validates against the file in the repository, not against a binary it does not have, so a file that no longer matches the code is a contract that lies.
func NewCommand ¶
NewCommand builds the schema command over the registry the other commands register their kinds into.
Types ¶
This section is empty.