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

Default trait applied to streaming in version 1 #1456

Closed
82marbag opened this issue Oct 21, 2022 · 2 comments
Closed

Default trait applied to streaming in version 1 #1456

82marbag opened this issue Oct 21, 2022 · 2 comments

Comments

@82marbag
Copy link
Contributor

The data member in this v1 model is being applied the @default trait.

In the v1 spec there is no mention of this behavior.

@82marbag
Copy link
Contributor Author

Related: #1380

@mtdowling
Copy link
Member

You're seeing that in the in memory semantic model when using the Smithy libraries. The Smithy reference implementation automatically transforms all models to be valid for v2 semantics. It does that for anything that previously had a default zero value too. Tools that don't use or know about the default trait can simply ignore it. A code generator that supports both v1 and v2 should not ignore it. In Smithy v1, these members were implicitly considered to have a default by most server generators because it's not really possible to know if a streaming member was supplied but empty, so we decided to make that explicit in v2.

mtdowling added a commit that referenced this issue Oct 21, 2022
* Clarify that streaming trait members need httpPayload when using
  an http binding protocol.
* Clarify that servers should interpret streaming members as
  having a default value of zero bytes.
* Mention this in the v1 docs too.
* Fixed a doc linking issue for the streaming docs where we were
  using the wrong casing.

Closes #1380
Addresses #1456
mtdowling added a commit that referenced this issue Oct 22, 2022
* Clarify that streaming trait members need httpPayload when using
  an http binding protocol.
* Clarify that servers should interpret streaming members as
  having a default value of zero bytes.
* Mention this in the v1 docs too.
* Fixed a doc linking issue for the streaming docs where we were
  using the wrong casing.

Closes #1380
Addresses #1456
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

No branches or pull requests

2 participants