-
Notifications
You must be signed in to change notification settings - Fork 48
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
Proposed extension classes to support CDX properties #672
Conversation
I haven't thought about it for very long, but my approach would be to define an extension explicitly named In the CDX properties definition (same link as above), both |
Agree with both points - I'll update the PR. For some reason, I thought CDX used Object rather than string. Thankfully, I was wrong. We can now use the same dicationaryEntry and simplify the spec. |
@zvr - I updated the PR consistent with your feedback plus a couple other errors I spotted. On the naming, I renamed both the class and property to be cdx specific - not sure if that is what you had in mind. Please take another look and let me know what you think. @puerco Quite interested to see if you think this will help in the tooling that you support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very much like what I was thinking.
@zvr - One more check and we should be good to go |
@goneall I don't think DictionaryEntry will work as the model states:
CycloneDX property names are not keys and are not required to be unique. |
Thanks @stevespringett for pointing this out. Perhaps we should go back to creating a separate class for the CDX property entry as in the original commit but add a separate property for @zvr thoughts? |
@puerco - will you please review and weigh in. From call, move discussion to Thursday serialization call. This isn't a blocking issue for 3.0 release, it's nice to have. |
Signed-off-by: Gary O'Neall <[email protected]>
Signed-off-by: Gary O'Neall <[email protected]>
Signed-off-by: Gary O'Neall <[email protected]>
Signed-off-by: Gary O'Neall <[email protected]>
Resolves feedback from Steve that the CDX properties are not key/value pairs but rather a mapping that allows duplication of property names with different values Signed-off-by: Gary O'Neall <[email protected]>
@stevespringett @zvr @puerco - I just updated the PR to have consistent definitions with CycloneDX. Note: I chose property in class names that are specific to CDX - one could argue we should make them more generic and part of core, but I thought if we wanted to go in that direction after the 3.0 release, we could make the CDX specific properties sub-properties in the RDF model. Steve - let me know if the documentation is sufficient or if you have any other suggestions. Adolfo - let me know if this eases the migration utilities Alexios - let me know if you agree with the approach |
@goneall I think the docs look good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and haven't seen feedback to the contrary.
Proposed extension classes to support CDX properties (spdx#672)
Following up on a discussion with @puerco I created this pull request to help in tools which translate between SPDX and CycloneDX.
There was a request to better support the CycloneDX
properties
property which is a keyword/keyvalue pair.Reference the CycloneDX spec properties section.
A few interesting design choices that deserve review and comment:
Extension
namespace - which I think is appropriate for this feature.DictionaryEntry
class since the value type isxsd:string
and CDX allows for any object, so I created a similar class.owl:Thing
which is appropriate for RDF object properties, but I don't know if it includes data / literals in the range. I'm also not sure if the spec parser supports this type.