bugfix: use the correct key when generating auth example in readme (#19492)

This commit is contained in:
Chris McEvoy
2024-09-02 08:38:57 +01:00
committed by GitHub
parent 4ed8c70a92
commit 5b96e85fd5
2 changed files with 6 additions and 6 deletions

View File

@@ -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)