Module dev.metaschema.databind
Annotation Type ValueConstraints
Defines value-level constraints for field and flag definitions.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionGet the allowed value constraints for the type or field this annotation is applied to.Expect[]Get the expect constraints for the type or field this annotation is applied to.Get the index-has-key constraints for the type or field this annotation is applied to.Let[]Get the let statements for the type of field this annotation is applied to.Matches[]Get the matches constraints for the type or field this annotation is applied to.Report[]Get the report constraints for the type or field this annotation is applied to.
-
Element Details
-
lets
Get the let statements for the type of field this annotation is applied to.- Returns:
- the let statements or an empty array if no let statements are defined
- Default:
- {}
-
allowedValues
Get the allowed value constraints for the type or field this annotation is applied to.- Returns:
- the allowed values or an empty array if no allowed values constraints are defined
- Default:
- {}
-
matches
Get the matches constraints for the type or field this annotation is applied to.- Returns:
- the allowed values or an empty array if no allowed values constraints are defined
- Default:
- {}
-
indexHasKey
Get the index-has-key constraints for the type or field this annotation is applied to.- Returns:
- the allowed values or an empty array if no allowed values constraints are defined
- Default:
- {}
-
expect
Get the expect constraints for the type or field this annotation is applied to.- Returns:
- the expected constraints or an empty array if no expected constraints are defined
- Default:
- {}
-
report
Get the report constraints for the type or field this annotation is applied to.Report constraints generate findings when their test expression evaluates to
true, which is the opposite of expect constraints.- Returns:
- the report constraints or an empty array if no report constraints are defined
- Default:
- {}
-