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

Fix streaming type types when they are required #140

Merged
merged 2 commits into from
Mar 5, 2020

Conversation

AllanZhengYP
Copy link
Contributor

@AllanZhengYP AllanZhengYP commented Mar 3, 2020

  • Fix a bug when streaming member shape is required:
    before:
export type UploadDocumentsCommandInput = Omit<UploadDocumentsRequest,"documents"> & {
  documents?: UploadDocumentsRequest["documents"] | string | Uint8Array | Buffer;
};

now:

export type UploadDocumentsCommandInput = Omit<UploadDocumentsRequest,"documents"> & {
  documents: UploadDocumentsRequest["documents"] | string | Uint8Array | Buffer;
};
  • Because command input and output shape is now possibly different to the ones exported from models/index.ts. So now SDK client uses the ones exported from commands to compose input/output type union, instead of those exported from models/index.ts. Although in most cases they should be the same types

Codegen: aws/aws-sdk-js-v3@ee37569

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@AllanZhengYP AllanZhengYP changed the title Fix streaming type required Fix streaming type types when they are required Mar 3, 2020
@AllanZhengYP AllanZhengYP requested a review from kstich March 3, 2020 17:38
@AllanZhengYP AllanZhengYP force-pushed the fix-streaming-type-required branch from da46fdd to 1956b16 Compare March 5, 2020 00:21
@AllanZhengYP AllanZhengYP force-pushed the fix-streaming-type-required branch from 1956b16 to df4da83 Compare March 5, 2020 00:21
@kstich kstich merged commit 0a21bf8 into smithy-lang:master Mar 5, 2020
AllanZhengYP added a commit to AllanZhengYP/aws-sdk-js-v3 that referenced this pull request Mar 5, 2020
* Update streaming member types(smithy-lang/smithy-typescript#138)
* Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
AllanZhengYP added a commit to AllanZhengYP/aws-sdk-js-v3 that referenced this pull request Mar 5, 2020
* Update streaming member types(smithy-lang/smithy-typescript#138)
* Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
AllanZhengYP added a commit to aws/aws-sdk-js-v3 that referenced this pull request Mar 5, 2020
* Update streaming member types(smithy-lang/smithy-typescript#138)
* Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
AllanZhengYP added a commit to AllanZhengYP/aws-sdk-js-v3 that referenced this pull request Mar 20, 2020
* Update streaming member types(smithy-lang/smithy-typescript#138)
* Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
trivikr pushed a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 20, 2020
* Update streaming member types(smithy-lang/smithy-typescript#138)
* Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
trivikr pushed a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 24, 2020
* Update streaming member types(smithy-lang/smithy-typescript#138)
* Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
trivikr pushed a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 24, 2020
* Update streaming member types(smithy-lang/smithy-typescript#138)
* Fix streaming type types when they are required(smithy-lang/smithy-typescript#140)
srchase pushed a commit to srchase/smithy-typescript that referenced this pull request Mar 17, 2023
* fix streaming member typing for required members

* use command input/output shape for public typing instead of shapes in protocol
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.

2 participants