-
Notifications
You must be signed in to change notification settings - Fork 218
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
Collapse eventstream with the streaming trait #365
Collapse eventstream with the streaming trait #365
Conversation
The eventstream and streaming trait fundamentally work in similar ways, and have identical validation rules. This merges the two traits to simplify the model and reduce duplication.
smithy-model/src/main/java/software/amazon/smithy/model/knowledge/EventStreamIndex.java
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/knowledge/HttpBindingIndex.java
Outdated
Show resolved
Hide resolved
...src/test/resources/software/amazon/smithy/model/errorfiles/validators/streaming-trait.errors
Show resolved
Hide resolved
...s/src/main/java/software/amazon/smithy/mqtt/traits/validators/MqttPublishInputValidator.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like "Initial messages" and "Initial-request" should go under the "Event streams" section. Can "Initial message client and server behavior" be shortened to "Initial message behavior"?
- Description | ||
* - requiresLength | ||
- ``boolean`` | ||
- Indicates that the stream must have a known size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can only be set when attached to blobs, right? Should this maybe be a separate trait to make this discrepancy less weird?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. Is there not a use case for it for event streams?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt it. Event streams usually don't have a predefined size or bounds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think requiresLength
is still odd since it doesn't make sense on eventStreams, but we can followup on that
The eventstream and streaming trait fundamentally work in similar
ways, and have identical validation rules. This merges the two traits
to simplify the model and reduce duplication.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.