From cc4104b1a5fe88af5497a9edae60032db3c22333 Mon Sep 17 00:00:00 2001
From: William <william.aultman@spectralogic.com>
Date: Wed, 12 Jan 2022 08:01:00 -0700
Subject: [PATCH] add json tag

---
 .../src/main/resources/go/model_anyof.mustache                | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/go/model_anyof.mustache b/modules/openapi-generator/src/main/resources/go/model_anyof.mustache
index f1d8c57c85f..9aaf2e7b0b0 100644
--- a/modules/openapi-generator/src/main/resources/go/model_anyof.mustache
+++ b/modules/openapi-generator/src/main/resources/go/model_anyof.mustache
@@ -1,7 +1,7 @@
 // {{classname}} {{{description}}}{{^description}}struct for {{{classname}}}{{/description}}
 type {{classname}} struct {
 	{{#anyOf}}
-	{{{.}}} *{{{.}}}
+	{{{.}}} *{{{.}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"`
 	{{/anyOf}}
 }
 
@@ -18,7 +18,7 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
 	{{#discriminator}}
 	{{#mappedModels}}
 	{{#-first}}
-	// use discriminator value to speed up the lookup
+	// use discriminator value to speed up the lookup -- Just seeing if I can change a comment
 	var jsonDict map[string]interface{}
 	err = json.Unmarshal(data, &jsonDict)
 	if err != nil {
-- 
GitLab