-
Notifications
You must be signed in to change notification settings - Fork 194
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
httpPayload
does not work on union
shapes
#1896
Labels
bug
Something isn't working
Comments
I think we're blocked on smithy-lang/smithy#1462. |
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 31, 2023
This PR incorporates the new test cases in Smithy from smithy-lang/smithy#1908, and adds support to `@restXml` and `@restJson1` for unions with the `@httpPayload` trait. This resolves #1896. This also fixes code generation for the latest `medicalimaging` SDK model. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
ysaito1001
pushed a commit
that referenced
this issue
Sep 15, 2023
This PR incorporates the new test cases in Smithy from smithy-lang/smithy#1908, and adds support to `@restXml` and `@restJson1` for unions with the `@httpPayload` trait. This resolves #1896. This also fixes code generation for the latest `medicalimaging` SDK model. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
rcoh
added a commit
to awslabs/aws-sdk-rust
that referenced
this issue
Nov 2, 2023
Update to the first commit where nothing in history has a bad revision: ``` git rev-list 5c6b1a1..release-2023-11-01 | tac | xargs -I {} bash -ce 'git checkout {} && grep "smithy-lang/smithy-rs#1896" codegen-core -r' ```
Velfi
pushed a commit
to awslabs/aws-sdk-rust
that referenced
this issue
Nov 2, 2023
Update to the first commit where nothing in history has a bad revision: ``` git rev-list 5c6b1a1..release-2023-11-01 | tac | xargs -I {} bash -ce 'git checkout {} && grep "smithy-lang/smithy-rs#1896" codegen-core -r' ``` <!-- IMPORTANT: > Making changes to examples? Be sure to make example changes in the awsdocs/aws-doc-sdk-examples repository (https://github.com/awsdocs/aws-doc-sdk-examples). The examples in aws-sdk-rust are copied from the `rust_dev_preview/` directory in that repository. > Making changes to code? All the code in aws-sdk-rust is auto-generated by smithy-rs (https://github.com/awslabs/smithy-rs). Changes to code need to be made in that repository. --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? --> <!-- If it fixes an open issue, please link to the issue here --> 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
Generates in
operation_ser.rs
:Relevant generator code:
https://github.com/awslabs/smithy-rs/blob/ca2c7883e7c252b7686314b404ecc11d408460f5/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt#L257-L281
The
httpPayload
trait:However, we're only handling
string
,blob
,document
, andstructure
shapes.Of note is that no AWS protocol supports
list
ormap
, butHttpBoundProtocolPayloadGenerator
is protocol-agnostic (in that it handles all protocols that support HTTP binding traits). That's something to take into account if/when we ever support a non-AWS protocol where binding tolist
ormap
shapes is allowed.When we fix this bug, we should ensure to include an
else
branch to thatwhen
that aborts code generation with an informative message, and contribute HTTP protocol tests to awslabs/smithy.The text was updated successfully, but these errors were encountered: