fix: Filter out http-bound members from schema passed to payload serializer#1892
Closed
haydenbaker wants to merge 1 commit intosmithy-lang:mainfrom
Closed
fix: Filter out http-bound members from schema passed to payload serializer#1892haydenbaker wants to merge 1 commit intosmithy-lang:mainfrom
haydenbaker wants to merge 1 commit intosmithy-lang:mainfrom
Conversation
Contributor
|
Thanks, I'll take a look soon, and add some changes & tests as needed. |
Contributor
|
will be fixed in #1893 |
Contributor
|
A fix was released in https://www.npmjs.com/package/@smithy/core/v/3.23.5. |
This file contains hidden or 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
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.
Context:
@httpHeaderand@idempotencyToken, the header is serialized correctly but the body also had that same member populated (with a different value)JsonShapeSerializer) iterates schema members (not input keys), finds the member is undefined, sees@IdempotencyToken, and generates a fresh UUID bound to the request body (not the header)HttpBindingProtocol.serializeRequest()passes the full schema to the payload serializer including http-bound members (headers, params, etc)delete input[memberName]trick mostly works, but not for fields that get special treatment in the payload serializer@idempotencyTokenbreaks it because the serializer treatsundefined+@idempotencyTokenas "generate a value."Description of changes:
filterMembers(cacheKey, predicate)toNormalizedSchemaas a wrapper that overridesstructIterator()so that a "view" of the schema can be passed (without explicit copying)HttpBindingProtocolto give the payload serializer a view of the schema that excludes HTTP-bound members, so that it doesn't try to consume already bound membersBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.