Skip to content
Unverified Commit 25c50a5f authored by Matteo Bigoi's avatar Matteo Bigoi Committed by GitHub
Browse files

[Server] Respect @required trait in model generation (#1148)



Since adding @required to a shape member is not a backwards-compatible change, the server implementation can generate non-Optional structure members for @required shape members.

On top of this generated server code shouldn't use non-exhaustive tag on structures for the same non-backwards compatibility and because it forces to constructs instances through builders.

This change introduces the new parameter handleRequired when constructing the SymbolVisitor. This parameter is set to false for client codegen and to true for server codegen.

With this new parameter we control whether to always treat symbols as Option or to follow the model directives more strictly remove optionality for @required members.

Co-authored-by: default avatardavid-perez <d@vidp.dev>
Co-authored-by: default avatarRussell Cohen <rcoh@amazon.com>
parent a1f06527
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment