Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
Applying the @default trait to a member will cause it to be treated as non-nullable and will set the value as the initial value for the member within the shape's builder.
Testing
A new set of integration tests were added to ensure the defaults for all types of members are set on a structure shape with no value for those default members.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Background
Adds support for defaults on trait member values.
Applying the
@default
trait to a member will cause it to be treated as non-nullable and will set the value as the initial value for the member within the shape's builder.Testing
A new set of integration tests were added to ensure the defaults for all types of members are set on a structure shape with no value for those default members.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.