-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotate a Data Value with validation #604
Comments
Should the
|
Insightful question. And I think you intuition is right: that an This points to a need to be able to declare the need for an Folding this into the overall proposal. 🙌🏻 |
Following discussions with [gcheadle-vmware](carvel-dev/ytt#604 (comment)) and @cppforlife, it became clear that @assert/validate ought to always be consumed in a step after overlays are applied for the current pipeline. When writing schema, the author intends not for the schema document _itself_ to be validated, but to validate the _produced_ document (of which the schema is a basis for). Authors need a way to declare the intention for a validation to be attached to the type composite: @schema/validation.
Following discussions with [gcheadle-vmware](carvel-dev/ytt#604 (comment)) and @cppforlife, it became clear that @assert/validate ought to always be consumed in a step after overlays are applied for the current pipeline. When writing schema, the author intends not for the schema document _itself_ to be validated, but to validate the _produced_ document (of which the schema is a basis for). Authors need a way to declare the intention for a validation to be attached to the type composite: @schema/validation.
Split this story into two:
|
Closing since follow up PR was merged. |
Following discussions with [gcheadle-vmware](carvel-dev/ytt#604 (comment)) and @cppforlife, it became clear that @assert/validate ought to always be consumed in a step after overlays are applied for the current pipeline. When writing schema, the author intends not for the schema document _itself_ to be validated, but to validate the _produced_ document (of which the schema is a basis for). Authors need a way to declare the intention for a validation to be attached to the type composite: @schema/validation.
Given a Data Values document (and only a Data Values document), annotated with a validation rule:
Scenario: Invalid Data Value
Given the final Data Value's value does not satisfies the rule:
When
ytt
runsThen reports a Data Values violation error message:
Scenario: Valid Data Value
Given the final Data Value's value satisfies the rule:
Then no error message is displayed.
Note: validations are checked after all overlays have been applied.
Notes:
The text was updated successfully, but these errors were encountered: