You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Smithy API model provides information for the SDK's code generator to determine if a API input/output parameter must be nullable (aka optional), and when the parameter isn't nullable (aka unboxed). With this information the SDK's code generator can opportunistically render some parameters as value types instead of rendering all parameters as pointer types.
This information directly impacts how the SDK renders the following types.
List and Map members can be rendered as value if not decorated with @sparse trait
[]string instead of []*string
map[string]string instead of map[string]*string
Number types (float32, int32, etc) struct members can be values.
Boolean struct members can be values.
In addition to this change the SDK should ensure it doesn't serialize number and bool parameters of structs that are unboxed.
jasdel
changed the title
codegen: SDK use API model to render paramaters as value instead of pointers types
codegen: SDK use API model to render parameters as value instead of pointers types
Nov 11, 2020
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
The Smithy API model provides information for the SDK's code generator to determine if a API input/output parameter must be nullable (aka optional), and when the parameter isn't nullable (aka unboxed). With this information the SDK's code generator can opportunistically render some parameters as value types instead of rendering all parameters as pointer types.
This information directly impacts how the SDK renders the following types.
@sparse
trait[]string
instead of[]*string
map[string]string
instead ofmap[string]*string
In addition to this change the SDK should ensure it doesn't serialize number and bool parameters of structs that are unboxed.
Related issues
The text was updated successfully, but these errors were encountered: