[Defect]: 2.0 linked elements - docs and type mismatch
for some linked types, the description and type don't match.
the description reads:
References using bom-link or
refId[...]
but the type is cyclonedx-common-2.0.schema.json#/$defs/refLinkType
either the description is wrong, or the type should be cyclonedx-common-2.0.schema.json#/$defs/elementLink.
example / findings
- https://github.com/CycloneDX/specification/blob/da93871d287b86a6bd71f85a88316629c2365872/schema/2.0/modules/cyclonedx-blueprint-2.0.schema.json#L163-L171
- https://github.com/CycloneDX/specification/blob/da93871d287b86a6bd71f85a88316629c2365872/schema/2.0/modules/cyclonedx-control-2.0.schema.json#L93-L102
- to be continues
context
- a
refLinkTypeis not a bom-link, but a value of arefId. - a
bomLinkElementTypeis a bom-link to an element - a
bomLinkDocumentTypeis a bom-link to an entire document - and a
bomLinkis abomLinkDocumentTypeorbomLinkElementType - and a
elementLinkis arefLinkTypeorbomLinkElementType
goal
revisit all the usages of the mentioned things, and check if they match their description text in the respective context.
I went through all of 2.0-dev: 98 properties across 13 modules say "bom-link or refId" but are typed refLinkType, almost all in blueprint, threat, risk, control, declaration, data and usecase. It also goes the other way in a few places, e.g. annotation subjects, component identity evidence tools and formulation resourceReferenceChoice are elementLink but described as refId only. Since 98 is a lot, which way do you want it? Switching them to elementLink allows cross-BOM references everywhere, fixing the wording keeps them document-local. I can send a PR for either once you pick.