Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package.PrimaryPackagePurpose should be []string #227

Closed
puerco opened this issue Oct 19, 2023 · 3 comments
Closed

package.PrimaryPackagePurpose should be []string #227

puerco opened this issue Oct 19, 2023 · 3 comments

Comments

@puerco
Copy link
Contributor

puerco commented Oct 19, 2023

The field to capture the PrimaryPurpose of packages should be a list of strings instead of a single string as it has a cardinality of many.

It is even een noted in the comments:

// 7.24: Primary Package Purpose
// Cardinality: optional, one or many
// Allowed values: APPLICATION, FRAMEWORK, LIBRARY, CONTAINER, OPERATING-SYSTEM, DEVICE, FIRMWARE, SOURCE, ARCHIVE, FILE, INSTALL, OTHER
PrimaryPackagePurpose string `json:"primaryPackagePurpose,omitempty"`

Since this is a breaking change I wonder what would be the best way to fix it 🤔

@goneall
Copy link
Member

goneall commented Oct 19, 2023

@puerco - I think this was an error in the spec - I believe the cardinality should be 0..1 not 0..*

@goneall
Copy link
Member

goneall commented Oct 19, 2023

Reference: spdx/spdx-spec#794 spdx/spdx-spec#797

@puerco
Copy link
Contributor Author

puerco commented Oct 20, 2023

Ooh I just noticed, it was weird to find out the 0..many cardinality, I think I've written more than one tool that accepts it.

I saw that Keith already fixed the spec for a future release, do you think we should correct the 2.3 published spec too?

(I'll close this issue)

@puerco puerco closed this as completed Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants