Repository navigation
feat: add support for Component data and modelParameters.datasets - #1083
Open
wiebe-vandendriessche wants to merge 1 commit into
Open
wiebe-vandendriessche wants to merge 1 commit into
wiebe-vandendriessche wants to merge 1 commit into
Conversation
Signed-off-by: Wiebe Vandendriessche <wiebe.vandendriessche@gmail.com>
Documentation build overview
7 files changed ·
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 147 |
| Duplication | 12 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the CycloneDX
componentDatatype (1.5+) and connects it toComponent.dataandModelParameters.datasets. Until nowModelParameters(datasets=...)raisedNotImplementedError(#913) andComponent.datawas a TODO.cyclonedx.model.datawithComponentData,ComponentDataKind,DataContents,DataGovernance,DataGovernanceResponsiblePartyandDatasetReference(abom-refor a BOM-Link).Component.dataandModelParameters.datasets, which accepts inlineComponentDataandDatasetReferenceentries.GraphicandGraphicsCollectionmoved tocyclonedx.model.graphicsto avoid a circular import. They are still importable fromcyclonedx.model.model_card.DataGovernanceResponsiblePartyrequires exactly one oforganizationorcontact, andDatasetReferencerejects an emptyref. Both follow the schemas, as the JSONoneOfandrefTypeminLength=1otherwise let invalid output through.Graphic.nameandGraphicsCollection.descriptionno longer useNORMALIZED_STRING. The schema types them asxs:string, and XML lost newlines that JSON kept.Known limitations, not changed here: the XML schema of 1.5 allows only one
component/dataelement (JSON 1.5 allows many), a spec defect fixed for 1.6.1+ in specification#518, so several entries give invalid XML 1.5.BomRefDiscriminatordoes not coverComponentDatabom-refs, which I plan to fix separately for all missing bom-refs.Tests: unit tests for all new classes, plus two new fixtures and enum tests with 18 new snapshots (1.5 to 1.7, JSON and XML). No existing snapshot changed.
Resolves or fixes issue: #913
AI Tool Disclosure
Claude CodeClaude Sonnet 5.5General instructions to plan, implement, test and schema-check the feature. All output was reviewed and run by me and I take full responsibility.Affirmation