forked from loafle/openapi-generator-original
bugfix: use the correct key when generating auth example in readme (#19492)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user