-
Notifications
You must be signed in to change notification settings - Fork 98
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
fix streaming members shape #138
Conversation
* Fix the streaming member's shape from Uint8Array to Readable|ReadableStream|Blob * For streaming members in command input, ease the restriction to allow Uint8Array, Buffer and string
@@ -186,6 +194,29 @@ private void writeOutputType(String typeName, Optional<StructureShape> outputSha | |||
} | |||
} | |||
|
|||
private List<MemberShape> getStramingMembers(StructureShape shape) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/getStramingMembers
/getStreamingMembers
*/ | ||
private void writeStreamingInputType( | ||
String typeName, | ||
Optional<StructureShape> inputShape, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just take the content of the optional, it's already known to exist when this is called and is required by the contents of the function as well.
writer.write("export type $L = $T;", typeName, symbolProvider.toSymbol(inputShape.get())); | ||
StructureShape input = inputShape.get(); | ||
List<MemberShape> streamingMembers = getStramingMembers(input); | ||
if (!streamingMembers.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can this conditional be flipped? Streaming members are less likely to exist as well.
* Update streaming member types(smithy-lang/smithy-typescript#138) * Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
* Update streaming member types(smithy-lang/smithy-typescript#138) * Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
* Update streaming member types(smithy-lang/smithy-typescript#138) * Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
* Update streaming member types(smithy-lang/smithy-typescript#138) * Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
* Update streaming member types(smithy-lang/smithy-typescript#138) * Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
* Update streaming member types(smithy-lang/smithy-typescript#138) * Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
* Update streaming member types(smithy-lang/smithy-typescript#138) * Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
* Fix the streaming member's shape from Uint8Array to Readable|ReadableStream|Blob * For streaming members in command input, ease the restriction to allow Uint8Array, Buffer and string
Uint8Array, Buffer and string
updated
PutObjectCommandInput
:Only command input that has streaming member is updated.
Fixes: aws/aws-sdk-js-v3#843
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.