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(codegen): generate idempotencyToken default for queryParams #4272

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:
smithy-lang/smithy-typescript#655
#4272

@kuhe
Copy link
Contributor Author

kuhe commented Dec 12, 2022

  • tested with ScheduleClient::deleteSchedule

@kuhe kuhe merged commit d99a65d into aws:main Dec 12, 2022
@kuhe kuhe deleted the fix/idempotencyToken branch December 12, 2022 21:47
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants