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

Add transform to mark required idempotency tokens client optional #2466

Merged
merged 10 commits into from
Nov 15, 2024

Conversation

hpmellema
Copy link
Contributor

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.

@hpmellema hpmellema requested a review from a team as a code owner November 15, 2024 18:53
Copy link
Contributor

@yasmewad yasmewad left a 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?

@hpmellema
Copy link
Contributor Author

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.

hpmellema and others added 3 commits November 15, 2024 12:25
…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>
hpmellema and others added 2 commits November 15, 2024 12:42
…en/core/directed/CodegenDirector.java

Co-authored-by: Michael Dowling <michael@mtdowling.com>
@hpmellema hpmellema merged commit 06750df into smithy-lang:main Nov 15, 2024
13 checks passed
@hpmellema hpmellema deleted the token-transform branch November 15, 2024 20:53
MYoung25 pushed a commit to MYoung25/smithy that referenced this pull request Nov 29, 2024
…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>
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.

5 participants