-
Notifications
You must be signed in to change notification settings - Fork 218
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
Add transform to mark required idempotency tokens client optional #2466
Conversation
bc2be87
to
10afc97
Compare
10afc97
to
38cde40
Compare
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.
Looks good, but I have a question for my knowledge: Has this been causing issues for customers?
This is not a concern for existing customers but opens up the ability to easily inject these tokens in newer code-generated clients. |
...c/main/java/software/amazon/smithy/build/transforms/MakeIdempotencyTokensClientOptional.java
Outdated
Show resolved
Hide resolved
...codegen-core/src/main/java/software/amazon/smithy/codegen/core/directed/CodegenDirector.java
Outdated
Show resolved
Hide resolved
...codegen-core/src/main/java/software/amazon/smithy/codegen/core/directed/CodegenDirector.java
Outdated
Show resolved
Hide resolved
...src/main/java/software/amazon/smithy/model/transform/MakeIdempotencyTokenClientOptional.java
Outdated
Show resolved
Hide resolved
smithy-model/src/main/java/software/amazon/smithy/model/transform/ModelTransformer.java
Outdated
Show resolved
Hide resolved
…en/core/directed/CodegenDirector.java Co-authored-by: Kevin Stich <kevin@kstich.com>
…en/core/directed/CodegenDirector.java Co-authored-by: Kevin Stich <kevin@kstich.com>
Co-authored-by: Kevin Stich <kevin@kstich.com>
...codegen-core/src/main/java/software/amazon/smithy/codegen/core/directed/CodegenDirector.java
Outdated
Show resolved
Hide resolved
…en/core/directed/CodegenDirector.java Co-authored-by: Michael Dowling <michael@mtdowling.com>
…ithy-lang#2466) Add transform to make required `@idempotencyToken` members `@clientOptional` so that they can be left empty and injected. --------- Co-authored-by: Kevin Stich <kevin@kstich.com> Co-authored-by: Michael Dowling <michael@mtdowling.com>
Description
Adds a transform that marks required Idempotency tokens
@clientOptional
. This is important because it changes the nullability of idempotency tokens for code generators, allow customers to leave the field unset and have their client inject the value.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.