Skip to content

Conversation

@dennismouwen-eye
Copy link
Contributor

@dennismouwen-eye dennismouwen-eye commented Jul 29, 2025

Update AWS Go SDK from v1 to v2, as v1 reaches end of support on July 31st.

Fixes #21347

@antihax @grokify @kemokemo @jirikuncar @ph4r5h4d @lwj5

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR solves a reported issue, reference it using GitHub's linking syntax (e.g., having "fixes #123" present in the PR description)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

* Initial plan

* Update AWS Go SDK from v1 to v2 in Go client templates

Co-authored-by: dennismouwen-eye <[email protected]>

* Final validation: AWS SDK v2 integration working correctly

Co-authored-by: dennismouwen-eye <[email protected]>

* Fix AWS v4 signature implementation: retrieve credentials properly from provider

Co-authored-by: dennismouwen-eye <[email protected]>

* Fix AWS v4 signature payload hash: properly compute SHA-256 hash for request body

Co-authored-by: dennismouwen-eye <[email protected]>

* Implement proper payload hashing

* Revert go.sum file to original state as requested

Co-authored-by: dennismouwen-eye <[email protected]>

* Revert go.mod and rename import alias from v4 back to awsv4

Co-authored-by: dennismouwen-eye <[email protected]>

* Revert go.mod file to original state removing all changes

Co-authored-by: dennismouwen-eye <[email protected]>

* Rename credentials import to awscredentials alias as requested

Co-authored-by: dennismouwen-eye <[email protected]>

* Fix spacing

* Fix credentials and imports

* Update aws sdk to latest version

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: dennismouwen-eye <[email protected]>
Co-authored-by: Dennis Mouwen <[email protected]>
awscredentials "github.com/aws/aws-sdk-go/aws/credentials"
awsv4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awscredentials "github.com/aws/aws-sdk-go-v2/credentials"
"crypto/sha256"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the pr but looks like this line is not indented correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@wing328
Copy link
Member

wing328 commented Jul 29, 2025

please follow step 3 to update the samples so that the ci can verify the change

@dennismouwen-eye
Copy link
Contributor Author

please follow step 3 to update the samples so that the ci can verify the change

I did but there were no changed files

@wing328
Copy link
Member

wing328 commented Jul 30, 2025

tested locally and the result is good.

will add some tests for the aws signature option in another PR instead.

thanks for the contribution

@wing328 wing328 merged commit fbb15fd into OpenAPITools:master Jul 30, 2025
14 checks passed
@wing328
Copy link
Member

wing328 commented Jul 30, 2025

update: merged #21657 to add a new sample covering the aws signature option

Goopher pushed a commit to Goopher/openapi-generator that referenced this pull request Sep 9, 2025
… (OpenAPITools#21653)

* Update AWS Go SDK from v1 to v2 in Go client templates (OpenAPITools#3)

* Initial plan

* Update AWS Go SDK from v1 to v2 in Go client templates

Co-authored-by: dennismouwen-eye <[email protected]>

* Final validation: AWS SDK v2 integration working correctly

Co-authored-by: dennismouwen-eye <[email protected]>

* Fix AWS v4 signature implementation: retrieve credentials properly from provider

Co-authored-by: dennismouwen-eye <[email protected]>

* Fix AWS v4 signature payload hash: properly compute SHA-256 hash for request body

Co-authored-by: dennismouwen-eye <[email protected]>

* Implement proper payload hashing

* Revert go.sum file to original state as requested

Co-authored-by: dennismouwen-eye <[email protected]>

* Revert go.mod and rename import alias from v4 back to awsv4

Co-authored-by: dennismouwen-eye <[email protected]>

* Revert go.mod file to original state removing all changes

Co-authored-by: dennismouwen-eye <[email protected]>

* Rename credentials import to awscredentials alias as requested

Co-authored-by: dennismouwen-eye <[email protected]>

* Fix spacing

* Fix credentials and imports

* Update aws sdk to latest version

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: dennismouwen-eye <[email protected]>
Co-authored-by: Dennis Mouwen <[email protected]>

* Update indenting

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REQ] Update Go client generator to us AWS SDK v2

2 participants