Skip to content

[BREAKING] Add datatype for Component.bom_ref /Service.bom_ref #170

Closed

Description

@jkowalleck

From @jkowalleck

The ref/bom-ref properties in CycloneDX are a special kind of string. They are intended to link elements together.
(in Spec 1.4 the ref/bom-ref became an own element-definition, to make this more clear.)
-> refs/bom-refs are used, instead of the actual linked elements.
Having special data types makes it easy to tell elements apart by the reference. and linking elements without memory-leaks is easy.

proposal:
have a data class BomRef. BomRef has a property value of type Optional[str].

  • Components, Services have a property _bom_ref: BomRef and have the the setter for bom_ref removed - as it is a read-only property.property.
  • all usages of ref/bom-ref adopt the use of new data type BomRef instead of str

The above will become critical when we look to implement #7 and doing this now will lower the risk of introducing another breaking change release at that point.

Activity

  1. jkowalleck commented on Feb 16, 2022

    @jkowalleck
    MemberAuthor

    is caused by #148 (comment)

  2. changed the title [-]own datatype for `Component.bom_ref `/`Service.bom_ref`[/-] [+][BREAKING] Add datatype for `Component.bom_ref `/`Service.bom_ref`[/+] on Feb 17, 2022
  3. self-assigned this
    on Feb 17, 2022
  4. added this to the 2.0.0 milestone on Feb 17, 2022
  5. added a commit that references this issue on Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions