[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:david-perez <d@vidp.dev> Co-authored-by:
Russell Cohen <rcoh@amazon.com>
Loading
Please register or sign in to comment