As a Configuration Author
I want to declare what constitutes a valid Data Value right in my schema definition
In a way that requires even less custom Starlark code from me ⭐
And I can write fewer annotations ⭐ because ytt can confidently infer for what have written.
*So that**
I can state those invariants in one central place and know they will be respected throughout the execution
those who use my ytt library and violate one of those variants will receive a helpful error message
and my overall maintenance effort/costs are less than before. ⭐
(this is the next feature increment of #561)
As a Configuration Author I want to declare what constitutes a valid Data Value right in my schema definition In a way that requires even less custom Starlark code from me ⭐ And I can write fewer annotations ⭐ because
ytt
can confidently infer for what have written. *So that**ytt
library and violate one of those variants will receive a helpful error message(⭐ = a desired improvement on top of the MVP.)
[proposal] [getting started]
Backlog
UX:
@assert/validate
, implement 3-tuple rules where the third tuple is the violation template; to@schema/validation
, add 3-tuple tules.@schema/validation
in non-schema documents.@assert/validate
in schema documents.Fast Follow: other must-have OOTB rules
matches=
Programmatic Validation of YAML
@assert/validate
annotationsassert.is_valid()
as a method in@ytt:assert
moduleInclude Validations in Schema Inspect
Authoring Conveniences:
@schema/validate-string-default
)@schema/nullable
for all children implicated in a@schema/validation one_not_null=
Resources
Related Issues:
103 — originating issue
556 — requesting "required" use-case, explicitly.