From 452903873695a5a58db4e61e41ffa5c5463f2334 Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Mon, 5 Dec 2022 12:14:01 +0000 Subject: json: hide deprecated and non-spec fields Some non-spec defined fields and deprecated fields were being incorrectly exported as part of the v2_1 and v2_2 module, so they were out-of-sync with v2_3. Signed-off-by: Justin Chadwell --- spdx/v2_1/document.go | 2 +- spdx/v2_2/document.go | 2 +- spdx/v2_2/package.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'spdx') diff --git a/spdx/v2_1/document.go b/spdx/v2_1/document.go index 9721463..21533a0 100644 --- a/spdx/v2_1/document.go +++ b/spdx/v2_1/document.go @@ -61,5 +61,5 @@ type Document struct { Snippets []Snippet `json:"snippets"` // DEPRECATED in version 2.0 of spec - Reviews []*Review + Reviews []*Review `json:"-"` } diff --git a/spdx/v2_2/document.go b/spdx/v2_2/document.go index d4d4e50..b09e88f 100644 --- a/spdx/v2_2/document.go +++ b/spdx/v2_2/document.go @@ -61,5 +61,5 @@ type Document struct { Snippets []Snippet `json:"snippets"` // DEPRECATED in version 2.0 of spec - Reviews []*Review + Reviews []*Review `json:"-"` } diff --git a/spdx/v2_2/package.go b/spdx/v2_2/package.go index 53dd3a2..164dfd2 100644 --- a/spdx/v2_2/package.go +++ b/spdx/v2_2/package.go @@ -9,7 +9,7 @@ type Package struct { // NOT PART OF SPEC // flag: does this "package" contain files that were in fact "unpackaged", // e.g. included directly in the Document without being in a Package? - IsUnpackaged bool + IsUnpackaged bool `json:"-"` // 7.1: Package Name // Cardinality: mandatory, one @@ -45,7 +45,7 @@ type Package struct { // Cardinality: optional, one; default value is "true" if omitted FilesAnalyzed bool `json:"filesAnalyzed,omitempty"` // NOT PART OF SPEC: did FilesAnalyzed tag appear? - IsFilesAnalyzedTagPresent bool + IsFilesAnalyzedTagPresent bool `json:"-"` // 7.9: Package Verification Code PackageVerificationCode common.PackageVerificationCode `json:"packageVerificationCode"` -- cgit v1.2.3