-
Notifications
You must be signed in to change notification settings - Fork 92
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
Updates for latest protocol tests #246
Merged
Merged
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
This commit fixes several issues when generating code for protocol tests discovered when incorporating the newest aws protocol tests in the JS v3 repository. It contains the following fixes: * Headers are normalized to lower-cased for comparison, as this is how fetch and other middleware handle setting header keys. * Fixes a type comparison failure when comparing streaming blob body contents by collecting the stream as would be expected in use. * Fixes issues rendering input and output expected values when comparing document types. * Fixes issues rendering input and output expected values when comparing union types.
This commit fixes several issues when generating code for protocol serialization discovered when incorporating the newest AWS protocol tests in the JS v3 repository. It contains the following changes: * Support for populating fields marked with `@httpResponseCode`. * Fixes for encoding strings with `@mediaType` when in headers. * Fixes for document type serialization. * Canonicalize the `content-type` header to lower case. * Fix for serializing `null` header values.
This commit increases the visibility of the `readResponsePayload` method so that protocol implementations can customize how they load response payload contents in to deserialized responses. This is done mainly for customizing how a document type would be loaded in each protocol.
mtdowling
approved these changes
Dec 12, 2020
...degen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java
Show resolved
Hide resolved
...n/src/main/java/software/amazon/smithy/typescript/codegen/integration/ProtocolGenerator.java
Show resolved
Hide resolved
...java/software/amazon/smithy/typescript/codegen/integration/HttpBindingProtocolGenerator.java
Show resolved
Hide resolved
...degen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java
Show resolved
Hide resolved
trivikr
approved these changes
Dec 14, 2020
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.
This PR will be paired with one to aws/aws-sdk-js-v3: aws/aws-sdk-js-v3#1770
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Update Smithy dependencies and version
Use safe name for Document serde functions
Fix several issues generating protocol tests
This commit fixes several issues when generating code for protocol
tests discovered when incorporating the newest aws protocol tests
in the JS v3 repository. It contains the following fixes:
is how fetch and other middleware handle setting header keys.
contents by collecting the stream as would be expected in use.
comparing document types.
comparing union types.
Fix several issues in generating protocol serde
This commit fixes several issues when generating code for protocol
serialization discovered when incorporating the newest AWS protocol
tests in the JS v3 repository. It contains the following changes:
@httpResponseCode
.@mediaType
when in headers.content-type
header to lower case.null
header values.Allow customizing of HTTP response payload serde
This commit increases the visibility of the
readResponsePayload
method so that protocol implementations can customize how they load
response payload contents in to deserialized responses. This is done
mainly for customizing how a document type would be loaded in each
protocol.