From 10c7c41e82e90a868720d5375b7e20da1f34a6ef Mon Sep 17 00:00:00 2001 From: Guo Huang Date: Wed, 20 Apr 2016 12:54:05 -0700 Subject: [PATCH] added config to allow client to see debug log --- .../swagger-codegen/src/main/resources/go/api_client.mustache | 4 ++++ samples/client/petstore/go/go-petstore/api_client.go | 4 ++++ 2 files changed, 8 insertions(+) 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) {