diff options
author | Keith Zantow <kzantow@gmail.com> | 2022-10-07 12:09:54 -0400 |
---|---|---|
committer | Keith Zantow <kzantow@gmail.com> | 2022-10-07 12:09:54 -0400 |
commit | edca4e815e896fe3f9a42befac2870ca97997cef (patch) | |
tree | 45c554149d4ccf94556ceb1c3b141732619cd57c /spdx/v2_3 | |
parent | 74a5f1d3abe5aba7ce171ff7e5ae720c181eb645 (diff) | |
download | spdx-tools-edca4e815e896fe3f9a42befac2870ca97997cef.tar.gz |
chore: Add YAML support for v2.3 data model
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Diffstat (limited to 'spdx/v2_3')
-rw-r--r-- | spdx/v2_3/annotation.go | 2 | ||||
-rw-r--r-- | spdx/v2_3/document.go | 2 | ||||
-rw-r--r-- | spdx/v2_3/file.go | 2 | ||||
-rw-r--r-- | spdx/v2_3/package.go | 4 | ||||
-rw-r--r-- | spdx/v2_3/snippet.go | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/spdx/v2_3/annotation.go b/spdx/v2_3/annotation.go index 756aea1..121e995 100644 --- a/spdx/v2_3/annotation.go +++ b/spdx/v2_3/annotation.go @@ -21,7 +21,7 @@ type Annotation struct { // 12.4: SPDX Identifier Reference // Cardinality: conditional (mandatory, one) if there is an Annotation // This field is not used in hierarchical data formats where the referenced element is clear, such as JSON or YAML. - AnnotationSPDXIdentifier common.DocElementID `json:"-"` + AnnotationSPDXIdentifier common.DocElementID `json:"-" yaml:"-"` // 12.5: Annotation Comment // Cardinality: conditional (mandatory, one) if there is an Annotation diff --git a/spdx/v2_3/document.go b/spdx/v2_3/document.go index f8b5e23..32fdb8d 100644 --- a/spdx/v2_3/document.go +++ b/spdx/v2_3/document.go @@ -61,5 +61,5 @@ type Document struct { Snippets []Snippet `json:"snippets,omitempty"` // DEPRECATED in version 2.0 of spec - Reviews []*Review `json:"reviews,omitempty"` + Reviews []*Review `json:"-" yaml:"-"` } diff --git a/spdx/v2_3/file.go b/spdx/v2_3/file.go index 3d6e71e..1dd59fa 100644 --- a/spdx/v2_3/file.go +++ b/spdx/v2_3/file.go @@ -68,7 +68,7 @@ type File struct { // Note that Snippets could be defined in a different Document! However, // the only ones that _THIS_ document can contain are this ones that are // defined here -- so this should just be an ElementID. - Snippets map[common.ElementID]*Snippet `json:"-"` + Snippets map[common.ElementID]*Snippet `json:"-" yaml:"-"` Annotations []Annotation `json:"annotations,omitempty"` } diff --git a/spdx/v2_3/package.go b/spdx/v2_3/package.go index a382268..7df331d 100644 --- a/spdx/v2_3/package.go +++ b/spdx/v2_3/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 `json:"-"` + IsUnpackaged bool `json:"-" yaml:"-"` // 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 `json:"-"` + IsFilesAnalyzedTagPresent bool `json:"-" yaml:"-"` // 7.9: Package Verification Code // Cardinality: if FilesAnalyzed == true must be present, if FilesAnalyzed == false must be omitted diff --git a/spdx/v2_3/snippet.go b/spdx/v2_3/snippet.go index 240f8c8..d55a1a9 100644 --- a/spdx/v2_3/snippet.go +++ b/spdx/v2_3/snippet.go @@ -44,5 +44,5 @@ type Snippet struct { // 9.11: Snippet Attribution Text // Cardinality: optional, one or many - SnippetAttributionTexts []string `json:"-"` + SnippetAttributionTexts []string `json:"-" yaml:"-"` } |