@assert
The @assert
attribute in BAML is used for strict validations. If a type fails an @assert
validation, it will not be returned in the response, and an exception will be raised if it’s part of the top-level type.
Usage
Asserts can be named or unnamed.
Field Assertion
BAML
BAML
BAML
Parameter Assertion
Asserts can also be applied to parameters.
BAML
Block Assertion
Asserts can be used in a block definition, referencing fields within the block.
BAML