From 47614bb76555cc09b7b70a8250538c15d9812827 Mon Sep 17 00:00:00 2001 From: Andrew Z Allen Date: Sun, 18 Feb 2018 09:18:03 -0700 Subject: [PATCH] Properly capitalize exported go types (#7636) Previously if the type was "myEnum" it would be written as ``` type myEnum string const ( DEMO MyEnum = "DEMO" ) ``` which would fail because of the capitalization difference. This fixes that. --- modules/swagger-codegen/src/main/resources/go/model.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/go/model.mustache b/modules/swagger-codegen/src/main/resources/go/model.mustache index a4c6ce6b72b..65996a1a9fb 100644 --- a/modules/swagger-codegen/src/main/resources/go/model.mustache +++ b/modules/swagger-codegen/src/main/resources/go/model.mustache @@ -5,7 +5,7 @@ import ({{/imports}}{{#imports}} "{{import}}"{{/imports}}{{#imports}} ) {{/imports}}{{#model}}{{#isEnum}}{{#description}}// {{{classname}}} : {{{description}}}{{/description}} -type {{{name}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}} +type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}} // List of {{{name}}} const (