From cb547c113a635185d491d71dcd06ddd231d09c8c Mon Sep 17 00:00:00 2001 From: keithballdotnet Date: Fri, 15 Jul 2016 14:55:11 +0200 Subject: [PATCH] ParameterToString can panic Let the fmt package help convert the obj to a string. Previously this could panic if the obj was an int. --- .../swagger-codegen/src/main/resources/go/api_client.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 be0f60673d8..e11f4eaba8b 100644 --- a/modules/swagger-codegen/src/main/resources/go/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/go/api_client.mustache @@ -94,7 +94,7 @@ func (c *APIClient) ParameterToString(obj interface{},collectionFormat string) s } } - return obj.(string) + return fmt.Sprintf("%v", obj) } func prepareRequest(postBody interface{},