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

Correct precedence in NullableIndex and fix diffs #1460

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

mtdowling
Copy link
Member

Smithy-Diff was flagging acceptable changes of removing @default(null) from member when the trait had no effect because the target shape was already nullable. NullableIndex was also giving the @default(null) trait precedence over the @required trait which is incorrect. Required members are non-nullable, and the @default(null) trait doesn't override this. It simply means that there is no default value for the member (so coupled with the required trait, the member is still always present).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling mtdowling requested a review from a team as a code owner October 21, 2022 20:28
@syall syall self-requested a review October 21, 2022 20:46
Smithy-Diff was flagging acceptable changes of removing `@default(null)` from
member when the trait had no effect because the target shape was already nullable.
NullableIndex was also giving the `@default(null)` trait precedence over the
`@required` trait which is incorrect. Required members are non-nullable, and
the `@default(null)` trait doesn't override this. It simply means that there is
no default value for the member (so coupled with the required trait, the member
is still always present).
@mtdowling mtdowling force-pushed the fix-smithy-diff-default-null-removal branch from 7404671 to 8fd5eeb Compare October 21, 2022 20:50
@mtdowling mtdowling requested a review from sugmanue October 21, 2022 20:50
@mtdowling mtdowling merged commit 8beb77a into main Oct 21, 2022
@mtdowling mtdowling deleted the fix-smithy-diff-default-null-removal branch October 24, 2022 16:26
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