From 726dcc0c871d35d7dd837d6b4f46abad99f177e9 Mon Sep 17 00:00:00 2001 From: David Elie-Dit-Cosaque Date: Thu, 23 Sep 2021 17:12:03 -0500 Subject: [PATCH] run make --- pkg/claim/schema.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pkg/claim/schema.go b/pkg/claim/schema.go index f07cd04..1d8dd91 100644 --- a/pkg/claim/schema.go +++ b/pkg/claim/schema.go @@ -11,7 +11,7 @@ // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -// Code generated by `test-network-function-claim/cmd/generate/generate.go` on: 2021-09-23 13:50:30.28035066 -0500 CDT m=+0.000652182 +// Code generated by `test-network-function-claim/cmd/generate/generate.go` on: 2021-09-23 17:11:38.283597393 -0500 CDT m=+0.000602903 // // `https://github.com/a-h/generate` provides a generic set of interfaces to convert JSON schema into // workable GoLang struct implementations. However, the code generator is limited and does not allow @@ -116,6 +116,9 @@ type Versions struct { // The test-network-function (tnf) release version. Tnf string `json:"tnf"` + + // The test-network-function (tnf) Git Commit. + TnfGitCommit string `json:"tnfGitCommit,omitempty"` } func (strct *Claim) MarshalJSON() ([]byte, error) { @@ -697,6 +700,17 @@ func (strct *Versions) MarshalJSON() ([]byte, error) { buf.Write(tmp) } comma = true + // Marshal the "tnfGitCommit" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"tnfGitCommit\": ") + if tmp, err := json.Marshal(strct.TnfGitCommit); err != nil { + return nil, err + } else { + buf.Write(tmp) + } + comma = true buf.WriteString("}") rv := buf.Bytes() @@ -729,6 +743,10 @@ func (strct *Versions) UnmarshalJSON(b []byte) error { return err } tnfReceived = true + case "tnfGitCommit": + if err := json.Unmarshal([]byte(v), &strct.TnfGitCommit); err != nil { + return err + } default: return fmt.Errorf("additional property not allowed: \"" + k + "\"") }