Skip to content

Commit

Permalink
change packageVerification code for 2.1,2.2 to omitempty
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
  • Loading branch information
lumjjb committed May 17, 2023
1 parent 7029eaf commit a857218
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spdx/v2/v2_1/package.go
Expand Up @@ -45,7 +45,7 @@ type Package struct {
IsFilesAnalyzedTagPresent bool `json:"-"`

// 3.9: Package Verification Code
PackageVerificationCode common.PackageVerificationCode `json:"packageVerificationCode"`
PackageVerificationCode common.PackageVerificationCode `json:"packageVerificationCode,omitempty"`

// 3.10: Package Checksum: may have keys for SHA1, SHA256 and/or MD5
// Cardinality: optional, one or many
Expand Down
2 changes: 1 addition & 1 deletion spdx/v2/v2_2/package.go
Expand Up @@ -53,7 +53,7 @@ type Package struct {
IsFilesAnalyzedTagPresent bool `json:"-"`

// 7.9: Package Verification Code
PackageVerificationCode common.PackageVerificationCode `json:"packageVerificationCode"`
PackageVerificationCode common.PackageVerificationCode `json:"packageVerificationCode,omitempty"`

// 7.10: Package Checksum: may have keys for SHA1, SHA256, SHA512 and/or MD5
// Cardinality: optional, one or many
Expand Down

0 comments on commit a857218

Please sign in to comment.