-
Notifications
You must be signed in to change notification settings - Fork 226
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
Confusion with the streaming example in section 13.1 of IDL v2 #1380
Comments
Looks like an accidental omission.
The same limitation applies, and is documented here: https://awslabs.github.io/smithy/2.0/spec/http-bindings.html#event-streams. We should make it more clear this applies to event streams and string/blob streams too.
RPC protocols like AWS JSON can work with this example. |
How? What does an HTTP body message look like in AWS JSON 1.x for that example? |
I'm updating the docs to address 1 and 2.
RPC protocols use an initial event that's sent as an actual event. We don't have docs for this yet. We can track this in #1287 |
But isn't #1287 for event streams? This is for a |
Oh! You're right. I completely glossed over that this targeted a blob. The example is theoretically fine as is, but doesn't work with any existing protocols, so I'll change it. |
* 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
* 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
The example was changed in #1458 to: @http(method: "GET", uri: "/streaming-operation")
operation StreamingOperation {
input := {}
output := {
@required
streamId: String
@httpPayload
output: StreamingBlob = ""
}
}
@streaming
blob StreamingBlob This is still invalid because the member targeting the streaming blob is not marked with Moreover, the example is still confusing because it's irrealizable in any of the supported protocols: we can't send both a streaming blob and a string in the output payload. |
The streaming blob has a default value assigned using |
Link. Example as of writing:
I'm confused because:
@default
or@required
. However,output
in the example above does not have any of the two traits attached.streaming
trait that says:However, this restriction does not appear in IDL v2. Is that intentional? The Smithy library is still enforcing it for IDL v2 models:
streamId
) and a streaming blob (output
) in the same HTTP message body (?). I acknowledge that in another application-level protocol sending both pieces of data might be possible (which one?), but if you want to keep the example as-is, I think it would be better to call out immediately below it that it's not realizable in HTTP.The text was updated successfully, but these errors were encountered: