-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fix server code generation of @httpPayload
-bound constrained shapes
#2584
Merged
david-perez
merged 3 commits into
main
from
davidpz/fix-server-code-generation-of-httpPayload-bound-constrained-shapes
Apr 19, 2023
Merged
Fix server code generation of @httpPayload
-bound constrained shapes
#2584
david-perez
merged 3 commits into
main
from
davidpz/fix-server-code-generation-of-httpPayload-bound-constrained-shapes
Apr 19, 2023
Conversation
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
The issue is we're not changing the return type of the payload deserializing function to be the unconstrained type (e.g. the builder in case of an `@httpPayload`-bound structure shape) when the shape is constrained. Yet another example of why code-generating `constraints.smithy` (see #2101) is important. Closes #2583.
david-perez
commented
Apr 17, 2023
Comment on lines
+242
to
+246
val outputT = if (member.isStreaming(model)) { | ||
symbolProvider.toSymbol(member) | ||
} else { | ||
RuntimeType.ByteSlab.toSymbol() | ||
} |
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 is an unrelated style change.
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
hlbarber
approved these changes
Apr 18, 2023
crisidev
approved these changes
Apr 18, 2023
ysaito1001
approved these changes
Apr 18, 2023
…code-generation-of-httpPayload-bound-constrained-shapes
A new generated diff is ready to view.
A new doc preview is ready to view. |
david-perez
deleted the
davidpz/fix-server-code-generation-of-httpPayload-bound-constrained-shapes
branch
April 19, 2023 10:12
unexge
pushed a commit
that referenced
this pull request
Apr 24, 2023
…#2584) The issue is we're not changing the return type of the payload deserializing function to be the unconstrained type (e.g. the builder in case of an `@httpPayload`-bound structure shape) when the shape is constrained. Yet another example of why code-generating `constraints.smithy` (see #2101) is important. Closes #2583. ## Testing The added integration test operation fails to compile without this patch. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
rcoh
pushed a commit
that referenced
this pull request
Apr 24, 2023
…#2584) The issue is we're not changing the return type of the payload deserializing function to be the unconstrained type (e.g. the builder in case of an `@httpPayload`-bound structure shape) when the shape is constrained. Yet another example of why code-generating `constraints.smithy` (see #2101) is important. Closes #2583. ## Testing The added integration test operation fails to compile without this patch. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The issue is we're not changing the return type of the payload
deserializing function to be the unconstrained type (e.g. the builder in
case of an
@httpPayload
-bound structure shape) when the shape isconstrained.
Yet another example of why code-generating
constraints.smithy
(see #2101)is important.
Closes #2583.
Testing
The added integration test operation fails to compile without this patch.
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.