From 4a5bd502024cbb7d003ae80f805a94e1306a9317 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 23 Aug 2018 15:23:49 +0800 Subject: [PATCH] add xml attr support in go client (#867) --- modules/openapi-generator/src/main/resources/go/model.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/go/model.mustache b/modules/openapi-generator/src/main/resources/go/model.mustache index f669ec2c2bb..4243daa4e2d 100644 --- a/modules/openapi-generator/src/main/resources/go/model.mustache +++ b/modules/openapi-generator/src/main/resources/go/model.mustache @@ -35,7 +35,7 @@ type {{classname}} struct { {{#description}} // {{{description}}} {{/description}} - {{name}} {{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}"{{/withXml}}` + {{name}} {{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}` {{/vars}} } {{/isEnum}}