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

Detect constraints on event stream errors #2069

Merged

Conversation

david-perez
Copy link
Contributor

Constrained shapes in the closure of an event stream are not supported
0. However, the ValidateUnsupportedConstraints validator was not
detecting constrained shapes in event stream errors because the
EventStreamNormalizer model transformer pulls them out of the
@streaming union shape.

This commit makes it so that the validator will detect such usages, by
leveraging the SyntheticEventStreamUnionTrait trait that gets attached
in the model transformer.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Constrained shapes in the closure of an event stream are not supported
[0]. However, the `ValidateUnsupportedConstraints` validator was not
detecting constrained shapes in event stream errors because the
`EventStreamNormalizer` model transformer pulls them out of the
`@streaming` union shape.

This commit makes it so that the validator will detect such usages, by
leveraging the `SyntheticEventStreamUnionTrait` trait that gets attached
in the model transformer.

[0]: smithy-lang/smithy#1388
@david-perez david-perez requested a review from a team as a code owner December 7, 2022 15:48
@david-perez david-perez added the server Rust server SDK label Dec 7, 2022
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

@LukeMathWalker LukeMathWalker enabled auto-merge (squash) December 9, 2022 11:06
@github-actions
Copy link

github-actions bot commented Dec 9, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Dec 9, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

@LukeMathWalker LukeMathWalker merged commit f54b36b into main Dec 9, 2022
@LukeMathWalker LukeMathWalker deleted the davidpz/detect-constraints-on-event-stream-errors branch December 9, 2022 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Rust server SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants