From 9ba943318a8ff09de20ae5ed27f6cf413d941040 Mon Sep 17 00:00:00 2001 From: Hippolyte HENRY Date: Fri, 25 Sep 2020 08:45:18 +0200 Subject: [PATCH] [go][client] Fix API docs example generation (#7489) * [go][client] Fix API docs example * Generate samples --- .../src/main/resources/go/api_doc.mustache | 2 +- .../go/go-petstore/docs/AnotherFakeApi.md | 2 +- .../petstore/go/go-petstore/docs/FakeApi.md | 28 +++++++++---------- .../docs/FakeClassnameTags123Api.md | 2 +- .../petstore/go/go-petstore/docs/PetApi.md | 10 +++---- .../petstore/go/go-petstore/docs/StoreApi.md | 4 +-- .../petstore/go/go-petstore/docs/UserApi.md | 12 ++++---- .../go-experimental/docs/UsageApi.md | 8 +++--- .../go/go-petstore/docs/AnotherFakeApi.md | 2 +- .../go/go-petstore/docs/DefaultApi.md | 2 +- .../petstore/go/go-petstore/docs/FakeApi.md | 28 +++++++++---------- .../docs/FakeClassnameTags123Api.md | 2 +- .../petstore/go/go-petstore/docs/PetApi.md | 10 +++---- .../petstore/go/go-petstore/docs/StoreApi.md | 4 +-- .../petstore/go/go-petstore/docs/UserApi.md | 12 ++++---- 15 files changed, 64 insertions(+), 64 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go/api_doc.mustache b/modules/openapi-generator/src/main/resources/go/api_doc.mustache index 0ab0d27a346..2049cc3ec37 100644 --- a/modules/openapi-generator/src/main/resources/go/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go/api_doc.mustache @@ -39,7 +39,7 @@ func main() { configuration := {{goImportAlias}}.NewConfiguration() api_client := {{goImportAlias}}.NewAPIClient(configuration) - resp, r, err := api_client.{{classname}}.{{operationId}}(context.Background(), {{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}.{{{vendorExtensions.x-export-param-name}}}({{{paramName}}}){{/optionalParams}}.Execute() + resp, r, err := api_client.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index 669daa616b7..34b688fc734 100644 --- a/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -33,7 +33,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background(), body).Execute() + resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md index 93be8280eb6..6a627902f9b 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md @@ -46,7 +46,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.CreateXmlItem(context.Background(), xmlItem).Execute() + resp, r, err := api_client.FakeApi.CreateXmlItem(context.Background()).XmlItem(xmlItem).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.CreateXmlItem``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -110,7 +110,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background(), ).Body(body).Execute() + resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -176,7 +176,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background(), ).Body(body).Execute() + resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -242,7 +242,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background(), ).Body(body).Execute() + resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -308,7 +308,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background(), ).Body(body).Execute() + resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -374,7 +374,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background(), body).Execute() + resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -437,7 +437,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background(), query, body).Execute() + resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -502,7 +502,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestClientModel(context.Background(), body).Execute() + resp, r, err := api_client.FakeApi.TestClientModel(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -581,7 +581,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background(), number, double, patternWithoutDelimiter, byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() + resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -665,7 +665,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background(), ).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() + resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -741,7 +741,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background(), requiredStringGroup, requiredBooleanGroup, requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() + resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -808,7 +808,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background(), param).Execute() + resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background()).Param(param).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -871,7 +871,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background(), param, param2).Execute() + resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -940,7 +940,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background(), pipe, ioutil, http, url, context).Execute() + resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index 3f8d0a41de3..2bc39f0bcb6 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -33,7 +33,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background(), body).Execute() + resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/PetApi.md b/samples/client/petstore/go/go-petstore/docs/PetApi.md index c2559ac673a..e94f6bfa28a 100644 --- a/samples/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore/docs/PetApi.md @@ -39,7 +39,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.AddPet(context.Background(), body).Execute() + resp, r, err := api_client.PetApi.AddPet(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -171,7 +171,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background(), status).Execute() + resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -237,7 +237,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.FindPetsByTags(context.Background(), tags).Execute() + resp, r, err := api_client.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -371,7 +371,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UpdatePet(context.Background(), body).Execute() + resp, r, err := api_client.PetApi.UpdatePet(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -577,7 +577,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId, requiredFile).AdditionalMetadata(additionalMetadata).Execute() + resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/client/petstore/go/go-petstore/docs/StoreApi.md index 58a65c02215..bc0ac9b8029 100644 --- a/samples/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go/go-petstore/docs/StoreApi.md @@ -103,7 +103,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.GetInventory(context.Background(), ).Execute() + resp, r, err := api_client.StoreApi.GetInventory(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -233,7 +233,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.PlaceOrder(context.Background(), body).Execute() + resp, r, err := api_client.StoreApi.PlaceOrder(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/client/petstore/go/go-petstore/docs/UserApi.md b/samples/client/petstore/go/go-petstore/docs/UserApi.md index 761b86e84be..5df5e733589 100644 --- a/samples/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go/go-petstore/docs/UserApi.md @@ -40,7 +40,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUser(context.Background(), body).Execute() + resp, r, err := api_client.UserApi.CreateUser(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -102,7 +102,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background(), body).Execute() + resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -164,7 +164,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background(), body).Execute() + resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -363,7 +363,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.LoginUser(context.Background(), username, password).Execute() + resp, r, err := api_client.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -427,7 +427,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.LogoutUser(context.Background(), ).Execute() + resp, r, err := api_client.UserApi.LogoutUser(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -488,7 +488,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username, body).Execute() + resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/docs/UsageApi.md b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/docs/UsageApi.md index eb6a220249c..6322c976a68 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/docs/UsageApi.md +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/docs/UsageApi.md @@ -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) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md index 2c63feecd21..90e9fe7f08e 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/AnotherFakeApi.md @@ -33,7 +33,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background(), client).Execute() + resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Client(client).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md index 7a138d8df4a..9f60fbb4ec0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/DefaultApi.md @@ -30,7 +30,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.DefaultApi.FooGet(context.Background(), ).Execute() + resp, r, err := api_client.DefaultApi.FooGet(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.FooGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md index 6924101be1e..76e258a8da8 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md @@ -43,7 +43,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeHealthGet(context.Background(), ).Execute() + resp, r, err := api_client.FakeApi.FakeHealthGet(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeHealthGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -105,7 +105,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background(), ).Body(body).Execute() + resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -171,7 +171,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background(), ).OuterComposite(outerComposite).Execute() + resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background()).OuterComposite(outerComposite).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -237,7 +237,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background(), ).Body(body).Execute() + resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -303,7 +303,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background(), ).Body(body).Execute() + resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -369,7 +369,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background(), fileSchemaTestClass).Execute() + resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(fileSchemaTestClass).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -432,7 +432,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background(), query, user).Execute() + resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -497,7 +497,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestClientModel(context.Background(), client).Execute() + resp, r, err := api_client.FakeApi.TestClientModel(context.Background()).Client(client).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -576,7 +576,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background(), number, double, patternWithoutDelimiter, byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() + resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -660,7 +660,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background(), ).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() + resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -736,7 +736,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background(), requiredStringGroup, requiredBooleanGroup, requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() + resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -803,7 +803,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background(), requestBody).Execute() + resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background()).RequestBody(requestBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -866,7 +866,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background(), param, param2).Execute() + resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -935,7 +935,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background(), pipe, ioutil, http, url, context).Execute() + resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md index 1898cc7411b..aaadff4ad11 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeClassnameTags123Api.md @@ -33,7 +33,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background(), client).Execute() + resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background()).Client(client).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md index 6fdd89f81ba..b4ad71ad07c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md @@ -39,7 +39,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.AddPet(context.Background(), pet).Execute() + resp, r, err := api_client.PetApi.AddPet(context.Background()).Pet(pet).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -171,7 +171,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background(), status).Execute() + resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -237,7 +237,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.FindPetsByTags(context.Background(), tags).Execute() + resp, r, err := api_client.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -371,7 +371,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UpdatePet(context.Background(), pet).Execute() + resp, r, err := api_client.PetApi.UpdatePet(context.Background()).Pet(pet).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -577,7 +577,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId, requiredFile).AdditionalMetadata(additionalMetadata).Execute() + resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md index 80617c8683b..1702bf74223 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/StoreApi.md @@ -103,7 +103,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.GetInventory(context.Background(), ).Execute() + resp, r, err := api_client.StoreApi.GetInventory(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -233,7 +233,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.StoreApi.PlaceOrder(context.Background(), order).Execute() + resp, r, err := api_client.StoreApi.PlaceOrder(context.Background()).Order(order).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md index 71205efd786..8354066eab4 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/UserApi.md @@ -40,7 +40,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUser(context.Background(), user).Execute() + resp, r, err := api_client.UserApi.CreateUser(context.Background()).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -102,7 +102,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background(), user).Execute() + resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background()).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -164,7 +164,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background(), user).Execute() + resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background()).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -363,7 +363,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.LoginUser(context.Background(), username, password).Execute() + resp, r, err := api_client.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -427,7 +427,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.LogoutUser(context.Background(), ).Execute() + resp, r, err := api_client.UserApi.LogoutUser(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -488,7 +488,7 @@ func main() { configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) - resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username, user).Execute() + resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username).User(user).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)