diff --git a/modules/openapi-generator/src/main/resources/go/README.mustache b/modules/openapi-generator/src/main/resources/go/README.mustache index cf9c353f010..fe14ae86d84 100644 --- a/modules/openapi-generator/src/main/resources/go/README.mustache +++ b/modules/openapi-generator/src/main/resources/go/README.mustache @@ -98,10 +98,9 @@ Class | Method | HTTP request | Description ## Documentation For Authorization -{{^authMethods}} Endpoints do not require authorization. -{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} {{#authMethods}} - ### {{{name}}} {{#isApiKey}} diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index 96fe3403a66..696d3810465 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -172,7 +172,7 @@ Class | Method | HTTP request | Description ## Documentation For Authorization - +Authentication schemes defined for the API: ### petstore_auth @@ -202,7 +202,6 @@ auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) r, err := client.Service.Operation(auth, args) ``` - ### api_key - **Type**: API key @@ -211,7 +210,6 @@ r, err := client.Service.Operation(auth, args) Note, each API key must be added to a map of `map[string]APIKey` where the key is: api_key and passed in as the auth context for each request. - ### api_key_query - **Type**: API key @@ -220,7 +218,6 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Note, each API key must be added to a map of `map[string]APIKey` where the key is: api_key_query and passed in as the auth context for each request. - ### http_basic_test - **Type**: HTTP basic authentication 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 fa8c6b06f27..c0f1c897247 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 @@ -90,7 +90,7 @@ Class | Method | HTTP request | Description ## Documentation For Authorization - +Authentication schemes defined for the API: ### api_key - **Type**: API key @@ -99,7 +99,6 @@ Class | Method | HTTP request | Description Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Api-Key and passed in as the auth context for each request. - ### api_key_query - **Type**: API key diff --git a/samples/openapi3/client/petstore/go/go-petstore/README.md b/samples/openapi3/client/petstore/go/go-petstore/README.md index 5110c56c9e2..67f2f450e83 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go/go-petstore/README.md @@ -192,7 +192,7 @@ Class | Method | HTTP request | Description ## Documentation For Authorization - +Authentication schemes defined for the API: ### petstore_auth @@ -222,7 +222,6 @@ auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) r, err := client.Service.Operation(auth, args) ``` - ### api_key - **Type**: API key @@ -231,7 +230,6 @@ r, err := client.Service.Operation(auth, args) Note, each API key must be added to a map of `map[string]APIKey` where the key is: api_key and passed in as the auth context for each request. - ### api_key_query - **Type**: API key @@ -240,7 +238,6 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i Note, each API key must be added to a map of `map[string]APIKey` where the key is: api_key_query and passed in as the auth context for each request. - ### http_basic_test - **Type**: HTTP basic authentication @@ -255,7 +252,6 @@ auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAut r, err := client.Service.Operation(auth, args) ``` - ### bearer_test - **Type**: HTTP Bearer token authentication @@ -267,7 +263,6 @@ auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_T r, err := client.Service.Operation(auth, args) ``` - ### http_signature_test - **Type**: HTTP signature authentication