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: add idempotencyToken generation if member is queryParam #655

Merged
merged 3 commits into from
Dec 12, 2022

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Dec 12, 2022

internal P75309097

Currently we provide a default idempotency token (uuid v4) if a request structure member has the smithy trait.
We do not provide one if the member is a query parameter.

  • This PR adds the idempotency default token (uuid.v4()) for query parameters.

from https://smithy.io/1.0/spec/core/behavior-traits.html#idempotencytoken-trait

A unique identifier (typically a UUID) SHOULD be used by the client when providing the value for the request token member. When the request token is present, the service MUST ensure that the request is not replayed within a service-defined period of time. This allows the client to safely retry operation invocations, including operations that are not read-only, that fail due to networking issues or internal server errors. The service uses the provided request token to identify and discard duplicate requests.

Client implementations MAY automatically provide a value for a request token member if and only if the member is not explicitly provided.

merge together:
#655
aws/aws-sdk-js-v3#4272

@kuhe kuhe merged commit 5a3e70c into smithy-lang:main Dec 12, 2022
@kuhe kuhe deleted the fix/idempotencyToken branch December 12, 2022 21:47
milesziemer pushed a commit to milesziemer/smithy-typescript that referenced this pull request Dec 14, 2022
…lang#655)

* fix: add idempotencyToken generation if member is queryParam

* fix(codegen): no default idempotencyToken for required members

* fix(codegen): code style fix for idempotencyToken
srchase pushed a commit to srchase/smithy-typescript that referenced this pull request Mar 17, 2023
…lang#655)

* fix: add idempotencyToken generation if member is queryParam

* fix(codegen): no default idempotencyToken for required members

* fix(codegen): code style fix for idempotencyToken
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.

None yet

2 participants