diff --git a/modules/swagger-codegen/src/main/resources/go/api_client.mustache b/modules/swagger-codegen/src/main/resources/go/api_client.mustache index 2b8f6f57aed..c6fb8867158 100644 --- a/modules/swagger-codegen/src/main/resources/go/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/go/api_client.mustache @@ -50,6 +50,10 @@ func (c *ApiClient) CallApi(path string, method string, queryParams map[string]string, formParams map[string]string) (*resty.Response, error) { + //set debug flag + configuration := NewConfiguration() + resty.SetDebug(configuration.Debug) + request := prepareRequest(postBody, headerParams, queryParams, formParams) switch strings.ToUpper(method) { diff --git a/samples/client/petstore/go/go-petstore/api_client.go b/samples/client/petstore/go/go-petstore/api_client.go index d5cec88a330..97a6c9a8f02 100644 --- a/samples/client/petstore/go/go-petstore/api_client.go +++ b/samples/client/petstore/go/go-petstore/api_client.go @@ -50,6 +50,10 @@ func (c *ApiClient) CallApi(path string, method string, queryParams map[string]string, formParams map[string]string) (*resty.Response, error) { + //set debug flag + configuration := NewConfiguration() + resty.SetDebug(configuration.Debug) + request := prepareRequest(postBody, headerParams, queryParams, formParams) switch strings.ToUpper(method) {