Closed 82marbag closed 1 year ago
A related discussion is in https://github.com/awslabs/smithy/issues/1121.
They have to agree with the exception of the range trait. I think we need to add some of this content to the spec, but you can see the rules here: https://github.com/awslabs/smithy/blob/main/designs/defaults-and-model-evolution.md#default-value-constraints
From that link:
The @default trait accepts a document type. The value of the trait MUST be compatible with the shape targeted by the member and adhere to the following constraints:
Are all these checks implemented in smithy already? Can we trust a model has already performed static checks?
I've seen at least @range
constraints are validated
Yep!
What is the expected behavior when default and constraint traits are both applied? What happens if the two don't agree (the default value is outside the constraints)?