Skip to content

Commit

Permalink
Merge pull request #215 from spdx/optional-params
Browse files Browse the repository at this point in the history
Fixing some optional params: copyrightText, licenseListVersion, packageVerificationCode
  • Loading branch information
lumjjb committed May 18, 2023
2 parents 564d598 + a857218 commit 944e8cb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion spdx/v2/v2_1/creation_info.go
Expand Up @@ -11,7 +11,7 @@ import (
type CreationInfo struct {
// 2.7: License List Version
// Cardinality: optional, one
LicenseListVersion string `json:"licenseListVersion"`
LicenseListVersion string `json:"licenseListVersion,omitempty"`

// 2.8: Creators: may have multiple keys for Person, Organization
// and/or Tool
Expand Down
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/creation_info.go
Expand Up @@ -11,7 +11,7 @@ import (
type CreationInfo struct {
// 6.7: License List Version
// Cardinality: optional, one
LicenseListVersion string `json:"licenseListVersion"`
LicenseListVersion string `json:"licenseListVersion,omitempty"`

// 6.8: Creators: may have multiple keys for Person, Organization
// and/or Tool
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
2 changes: 1 addition & 1 deletion spdx/v2/v2_3/creation_info.go
Expand Up @@ -10,7 +10,7 @@ import (
type CreationInfo struct {
// 6.7: License List Version
// Cardinality: optional, one
LicenseListVersion string `json:"licenseListVersion"`
LicenseListVersion string `json:"licenseListVersion,omitempty"`

// 6.8: Creators: may have multiple keys for Person, Organization
// and/or Tool
Expand Down
4 changes: 2 additions & 2 deletions spdx/v2/v2_3/package.go
Expand Up @@ -86,8 +86,8 @@ type Package struct {
PackageLicenseComments string `json:"licenseComments,omitempty"`

// 7.17: Copyright Text: copyright notice(s) text, "NONE" or "NOASSERTION"
// Cardinality: mandatory, one
PackageCopyrightText string `json:"copyrightText"`
// Cardinality: optional, zero or one
PackageCopyrightText string `json:"copyrightText,omitempty"`

// 7.18: Package Summary Description
// Cardinality: optional, one
Expand Down

0 comments on commit 944e8cb

Please sign in to comment.