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

Updates for latest protocol tests #246

Merged
merged 6 commits into from
Dec 14, 2020
Merged

Updates for latest protocol tests #246

merged 6 commits into from
Dec 14, 2020

Conversation

kstich
Copy link
Contributor

@kstich kstich commented Dec 11, 2020

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:

  • 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.

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:

  • 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.

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.

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.
@trivikr trivikr merged commit 54fa9b8 into master Dec 14, 2020
@trivikr trivikr deleted the protocol_test_fixes branch December 14, 2020 05:52
srchase pushed a commit to srchase/smithy-typescript that referenced this pull request Mar 17, 2023
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.

3 participants