Confusion with the streaming example in section 13.1 of IDL v2
See original GitHub issueLink. Example as of writing:
operation StreamingOperation {
input: StreamingOperationInput
output: StreamingOperationOutput
}
@input
structure StreamingOperationInput {}
@output
structure StreamingOperationOutput {
@required
streamId: String
output: StreamingBlob
}
@streaming
blob StreamingBlob
I’m confused because:
- Smithy IDL v2 introduces a change where members targeting streaming blobs now MUST have
@default
or@required
. However,output
in the example above does not have any of the two traits attached. - In IDL v1 there is a restriction on the
streaming
trait that says:
If a service supports a protocol that supports the httpPayload trait, any member that targets a streaming blob must also be marked as
@httpPayload
.
However, this restriction does not appear in IDL v2. Is that intentional? The Smithy library is still enforcing it for IDL v2 models:
= Member
com.amazonaws.simple#AnOperationInput$streamingBlob
referencing @streaming shapecom.amazonaws.simple#StreamingBlob
must have the @httpPayload trait, as servicecom.amazonaws.simple#SimpleService
has a protocol that supports @httpPayload.
- The example is confusing because you can’t send both a string (
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.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Interface Definition Language - Object Management Group
This clause describes OMG Interface Definition Language (IDL) middleware1-agnostic semantics2 and defines the syntax for IDL grammatical constructs. OMG IDL is ...
Read more >Introducing Smithy IDL 2.0 | AWS Developer Tools Blog
The AWS Smithy team is happy to announce the 2.0 release of the Smithy Interface Definition Language (IDL). This release focuses on ...
Read more >TAS1020B USB Streaming Controller datasheet (Rev. B)
An example of this is P3.2, which is used as the external interrupt (XINT) input to the TAS1020B. A detailed description of the...
Read more >Media Source Extensions - W3C
13.1 Attributes. 14. Byte Stream Formats; 15. Examples; 16. Acknowledgments; 17. Revision History; A. References. A.1 Normative references ...
Read more >HbbTV 2.0.3 Specification
HbbTV 2.0.3 Specification ... Adding and removing stream event listeners . ... A.1 Detailed section-by-section definition for volume 5 .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The streaming blob has a default value assigned using
= ""
which is exactly the same as@default("")
. I’ll add an HTTP binding for thestreamId
member. (Edit) Actually, we can just remove thestreamId
member. I don’t think it’s needed for the example.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.