Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for default trait on members #2267

Merged
merged 1 commit into from
May 1, 2024

Conversation

hpmellema
Copy link
Contributor

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.

@hpmellema hpmellema requested a review from a team as a code owner April 30, 2024 17:57
@hpmellema hpmellema assigned kstich and unassigned kstich May 1, 2024
@hpmellema hpmellema requested review from kstich and haydenbaker and removed request for kstich and AndrewFossAWS May 1, 2024 20:56
@hpmellema hpmellema merged commit 3565832 into smithy-lang:main May 1, 2024
13 checks passed
@hpmellema hpmellema deleted the trait-defaults branch May 1, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants