-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor event streams to target members
This commit removes the inputEventStream and outputEventStream traits and replaces them with the eventStream trait that targets members. This simplifies the model, validation, code generation, and I found that it makes it easier to model operations correctly. In fact, several typos were fixed in the documentation while making these changes due to the fact that the previous design required that the member name of an input/output shape is referenced from the operation. The major drawbacks of this approach are: 1) It's a breaking change. While this is a breaking change, no models are currently using the event stream feature in Smithy, and external tooling hasn't been published that consumes them either. 2) Structures that contain an event stream cannot be targeted by anything other than operation input or output. While it's awkward that event stream structures are essentially "poisoned" and can't be targeted by other members or used as errors, it does make event stream far easier to use with code generation since the structure itself does not need to be specialized when generating operation inputs and outputs. If we find ourselves needing to use this for other abstractions, something more reusable like a trait attribute could be introduced to automate this validation.
- Loading branch information
Showing
29 changed files
with
352 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.