forked from loafle/openapi-generator-original
update go samples
This commit is contained in:
parent
5fae4f5d93
commit
63a311a2e6
@ -210,6 +210,19 @@ 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.
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(
|
||||
context.Background(),
|
||||
sw.ContextAPIKeys,
|
||||
map[string]sw.APIKey{
|
||||
"api_key": {Key: "API_KEY_STRING"},
|
||||
},
|
||||
)
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
### api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
@ -218,6 +231,19 @@ 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.
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(
|
||||
context.Background(),
|
||||
sw.ContextAPIKeys,
|
||||
map[string]sw.APIKey{
|
||||
"api_key_query": {Key: "API_KEY_STRING"},
|
||||
},
|
||||
)
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
@ -99,6 +99,19 @@ Authentication schemes defined for the API:
|
||||
|
||||
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.
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(
|
||||
context.Background(),
|
||||
sw.ContextAPIKeys,
|
||||
map[string]sw.APIKey{
|
||||
"X-Api-Key": {Key: "API_KEY_STRING"},
|
||||
},
|
||||
)
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
### api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
@ -107,6 +120,19 @@ 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 and passed in as the auth context for each request.
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(
|
||||
context.Background(),
|
||||
sw.ContextAPIKeys,
|
||||
map[string]sw.APIKey{
|
||||
"api_key": {Key: "API_KEY_STRING"},
|
||||
},
|
||||
)
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
|
||||
## Documentation for Utility Methods
|
||||
|
||||
|
@ -230,6 +230,19 @@ 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.
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(
|
||||
context.Background(),
|
||||
sw.ContextAPIKeys,
|
||||
map[string]sw.APIKey{
|
||||
"api_key": {Key: "API_KEY_STRING"},
|
||||
},
|
||||
)
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
### api_key_query
|
||||
|
||||
- **Type**: API key
|
||||
@ -238,6 +251,19 @@ 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.
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(
|
||||
context.Background(),
|
||||
sw.ContextAPIKeys,
|
||||
map[string]sw.APIKey{
|
||||
"api_key_query": {Key: "API_KEY_STRING"},
|
||||
},
|
||||
)
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
Loading…
x
Reference in New Issue
Block a user