diff --git a/modules/openapi-generator/src/main/resources/go/README.mustache b/modules/openapi-generator/src/main/resources/go/README.mustache index 64a7c89f944..3568978b421 100644 --- a/modules/openapi-generator/src/main/resources/go/README.mustache +++ b/modules/openapi-generator/src/main/resources/go/README.mustache @@ -109,7 +109,7 @@ Class | Method | HTTP request | Description - **API key parameter name**: {{{keyParamName}}} - **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -Note, each API key must be added to a map of `map[string]APIKey` where the key is: {{keyParamName}} and passed in as the auth context for each request. +Note, each API key must be added to a map of `map[string]APIKey` where the key is: {{name}} and passed in as the auth context for each request. Example @@ -118,7 +118,7 @@ auth := context.WithValue( context.Background(), {{packageName}}.ContextAPIKeys, map[string]{{packageName}}.APIKey{ - "{{keyParamName}}": {Key: "API_KEY_STRING"}, + "{{name}}": {Key: "API_KEY_STRING"}, }, ) r, err := client.Service.Operation(auth, args) 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 cbfd2d5b853..6c7f4e1bcef 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 @@ -98,7 +98,7 @@ Authentication schemes defined for the API: - **API key parameter name**: X-Api-Key - **Location**: HTTP header -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. +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. Example @@ -107,7 +107,7 @@ auth := context.WithValue( context.Background(), x_auth_id_alias.ContextAPIKeys, map[string]x_auth_id_alias.APIKey{ - "X-Api-Key": {Key: "API_KEY_STRING"}, + "api_key": {Key: "API_KEY_STRING"}, }, ) r, err := client.Service.Operation(auth, args) @@ -119,7 +119,7 @@ r, err := client.Service.Operation(auth, args) - **API key parameter name**: api_key - **Location**: URL query string -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. +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. Example @@ -128,7 +128,7 @@ auth := context.WithValue( context.Background(), x_auth_id_alias.ContextAPIKeys, map[string]x_auth_id_alias.APIKey{ - "api_key": {Key: "API_KEY_STRING"}, + "api_key_query": {Key: "API_KEY_STRING"}, }, ) r, err := client.Service.Operation(auth, args)