DefaultValue
alloy.DefaultValue
object DefaultValue extends Newtype[Document]
Use this trait to give a default value to a structure member. This is not the same as smithy.api#default which is more constrained. You can use defaultValue
to specify a default that does not align with the target's shape constraints, where as Smithy's default
trait prevents that. For example:
`@`length(min:5)
string MyString
structure MyStruct {
`@`defaultValue("N/A") // that's valid
s1: MyString
s2: MyString = "N/A" // that's invalid
}
Attributes
- Graph
-
- Supertypes
- Self type
-
DefaultValue.type
Members list
In this article