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

codegen: Update generated serde to skip unmodeled input/outputs #261

Merged
merged 2 commits into from
Jan 16, 2021

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Jan 15, 2021

Updates the SDK's generated serializers and deserializers to skip unmodeled
input and output shapes for operations.

This issue caused generated deserializers to attempt to deserialize
operation responses that were not modeled, resulting in an error.
Whereas the SDK should of ignored the response if one was present for
operations without a modeled output.

Related to aws/aws-sdk-go-v2#1047
Fixes #262

Input

Unmodeled Input shape serializer functions are not generated.

This update changes API protocol operation serializers for HTTP binding protocols to skip serialization of the request document if the operation's input was not modeled.

This change is not applied to HTTP RPC protocol serializations. This is due to the AwsQuery protocol requiring some protocol specific elements to always be serialized regardless if an input is modeled or not.

Output

Unmodeled output shape serializer functions are not generated.

This update changes all API protocol operation deserializers to discard the response body if the operation's output was not modeled.

Updates the SDK's generated serializers and deserializers to skip unmodeled
input and output shapes for operations.

This issue caused generated deserializers to attempt to deserialize
operation responses that were not modeled, resulting in an error.
Whereas the SDK should of ignored the response if one was present for
operations without a modeled output.

Related to aws/aws-sdk-go-v2#1047
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Jan 15, 2021
Updates the AwsQuery and JSONPRC protocols to skip serializing inputs
with no methods.

Related to aws/smithy-go#261
@jasdel jasdel requested a review from skmcgrail January 15, 2021 23:18
@jasdel jasdel merged commit fd031a7 into aws:main Jan 16, 2021
@jasdel jasdel deleted the fixup/DeserUnmodeledOutput branch January 16, 2021 00:44
jasdel added a commit to aws/aws-sdk-go-v2 that referenced this pull request Jan 16, 2021
…output (#1050)

Updates the SDK's generate serializers and deserializers for operations without modeled input and output types. This fixes #1047 where the SDK was attempting to deserialize a response from a service for an operation that had no modeled output. The SDK should of ignored the response instead of trying to deserialize it.

This update will not attempt to serialize inputs for operations without modeled inputs, and will discard responses from services of operations with unmodeled outputs.

Related to aws/smithy-go#261
Fixes #1047
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

codegen: SyntheticClone's getArchetype should return Optional<ShapeId>
3 participants