mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-18 20:07:07 +00:00
[go][client] Fix API docs example generation (#7489)
* [go][client] Fix API docs example * Generate samples
This commit is contained in:
@@ -35,7 +35,7 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UsageApi.AnyKey(context.Background(), ).Execute()
|
||||
resp, r, err := api_client.UsageApi.AnyKey(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.AnyKey``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -96,7 +96,7 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UsageApi.BothKeys(context.Background(), ).Execute()
|
||||
resp, r, err := api_client.UsageApi.BothKeys(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.BothKeys``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -157,7 +157,7 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UsageApi.KeyInHeader(context.Background(), ).Execute()
|
||||
resp, r, err := api_client.UsageApi.KeyInHeader(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.KeyInHeader``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -218,7 +218,7 @@ func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UsageApi.KeyInQuery(context.Background(), ).Execute()
|
||||
resp, r, err := api_client.UsageApi.KeyInQuery(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.KeyInQuery``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
|
||||
Reference in New Issue
Block a user