From ad6b2e28c440816d23e89397069b9c4fe04d969f Mon Sep 17 00:00:00 2001 From: David Ashby Date: Thu, 19 Mar 2026 10:34:28 -0400 Subject: [PATCH 1/2] Update go README to match modern module support Updated go client installation instructions to use go modules explicitly. --- .../src/main/resources/go/README.mustache | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go/README.mustache b/modules/openapi-generator/src/main/resources/go/README.mustache index 3568978b4211..aa305a15ec0e 100644 --- a/modules/openapi-generator/src/main/resources/go/README.mustache +++ b/modules/openapi-generator/src/main/resources/go/README.mustache @@ -20,17 +20,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -{{#hasOAuthMethods}} -go get golang.org/x/oauth2 -{{/hasOAuthMethods}} -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import {{packageName}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" From ff2458c94ca2aa574e35bd3fdcadc163f0742123 Mon Sep 17 00:00:00 2001 From: David Ashby Date: Thu, 19 Mar 2026 10:47:18 -0400 Subject: [PATCH 2/2] regenerate examples --- samples/client/echo_api/go-external-refs/README.md | 9 +-------- samples/client/echo_api/go/README.md | 9 +-------- .../go/allof_multiple_ref_and_discriminator/README.md | 9 +-------- .../client/others/go/oneof-anyof-required/README.md | 9 +-------- .../others/go/oneof-discriminator-lookup/README.md | 9 +-------- samples/client/petstore/go/go-petstore/README.md | 10 +--------- .../x-auth-id-alias/go-experimental/README.md | 9 +-------- .../go-petstore-generateMarshalJSON-false/README.md | 10 +--------- .../client/petstore/go-petstore-withXml/README.md | 10 +--------- .../petstore/go/go-petstore-aws-signature/README.md | 10 +--------- .../openapi3/client/petstore/go/go-petstore/README.md | 10 +--------- 11 files changed, 11 insertions(+), 93 deletions(-) diff --git a/samples/client/echo_api/go-external-refs/README.md b/samples/client/echo_api/go-external-refs/README.md index bc255997b309..135149ee5092 100644 --- a/samples/client/echo_api/go-external-refs/README.md +++ b/samples/client/echo_api/go-external-refs/README.md @@ -12,14 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/client/echo_api/go/README.md b/samples/client/echo_api/go/README.md index 5319be18d903..b63d1bab25e3 100644 --- a/samples/client/echo_api/go/README.md +++ b/samples/client/echo_api/go/README.md @@ -12,14 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/client/others/go/allof_multiple_ref_and_discriminator/README.md b/samples/client/others/go/allof_multiple_ref_and_discriminator/README.md index 1f244202b814..33d3b127e38b 100644 --- a/samples/client/others/go/allof_multiple_ref_and_discriminator/README.md +++ b/samples/client/others/go/allof_multiple_ref_and_discriminator/README.md @@ -12,14 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/client/others/go/oneof-anyof-required/README.md b/samples/client/others/go/oneof-anyof-required/README.md index 0cbe241afccf..2df576a884c3 100644 --- a/samples/client/others/go/oneof-anyof-required/README.md +++ b/samples/client/others/go/oneof-anyof-required/README.md @@ -12,14 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/client/others/go/oneof-discriminator-lookup/README.md b/samples/client/others/go/oneof-discriminator-lookup/README.md index c7413a65cfca..e77d0c98eeca 100644 --- a/samples/client/others/go/oneof-discriminator-lookup/README.md +++ b/samples/client/others/go/oneof-discriminator-lookup/README.md @@ -12,14 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index aa6fab74e940..df328cd9cacf 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -12,15 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import petstore "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/README.md b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/README.md index cca5a2f5b572..ba9d23390e70 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/README.md +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/README.md @@ -12,14 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import x_auth_id_alias "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/README.md b/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/README.md index 3361f4af387e..8031f36b49ef 100644 --- a/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/README.md +++ b/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/README.md @@ -12,15 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import petstore "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/openapi3/client/petstore/go-petstore-withXml/README.md b/samples/openapi3/client/petstore/go-petstore-withXml/README.md index 3361f4af387e..8031f36b49ef 100644 --- a/samples/openapi3/client/petstore/go-petstore-withXml/README.md +++ b/samples/openapi3/client/petstore/go-petstore-withXml/README.md @@ -12,15 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import petstore "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/openapi3/client/petstore/go/go-petstore-aws-signature/README.md b/samples/openapi3/client/petstore/go/go-petstore-aws-signature/README.md index 3361f4af387e..8031f36b49ef 100644 --- a/samples/openapi3/client/petstore/go/go-petstore-aws-signature/README.md +++ b/samples/openapi3/client/petstore/go/go-petstore-aws-signature/README.md @@ -12,15 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import petstore "github.com/GIT_USER_ID/GIT_REPO_ID" diff --git a/samples/openapi3/client/petstore/go/go-petstore/README.md b/samples/openapi3/client/petstore/go/go-petstore/README.md index 29f59594f7c8..d7c36a16dd31 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go/go-petstore/README.md @@ -12,15 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Install the following dependencies: - -```sh -go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: +Import the package in a go file in your project and run `go mod tidy`: ```go import petstore "github.com/GIT_USER_ID/GIT_REPO_ID"