From 39228c7c94a529097ab44d7bb279bbddec921005 Mon Sep 17 00:00:00 2001 From: Neil O'Toole Date: Tue, 26 Jul 2016 15:07:57 -0600 Subject: [PATCH] #3459 removed check for required params --- modules/swagger-codegen/src/main/resources/go/api.mustache | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/go/api.mustache b/modules/swagger-codegen/src/main/resources/go/api.mustache index 9880c5b3b99..34990c680dd 100644 --- a/modules/swagger-codegen/src/main/resources/go/api.mustache +++ b/modules/swagger-codegen/src/main/resources/go/api.mustache @@ -45,11 +45,7 @@ func (a {{{classname}}}) {{{nickname}}}({{#allParams}}{{paramName}} {{{dataType} // create path and map variables path := a.Configuration.BasePath + "{{path}}"{{#pathParams}} path = strings.Replace(path, "{"+"{{baseName}}"+"}", fmt.Sprintf("%v", {{paramName}}), -1){{/pathParams}} -{{#allParams}}{{#required}} - // verify the required parameter '{{paramName}}' is set - if &{{paramName}} == nil { - return {{#returnType}}{{#isListContainer}}*{{/isListContainer}}new({{{returnType}}}), {{/returnType}}nil, errors.New("Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}") - }{{/required}}{{/allParams}} + headerParams := make(map[string]string) queryParams := url.Values{}