spdx-spec
spdx-spec copied to clipboard
Proposed 3.0 model change to Annotation
Current SPDX 3.0 model does not support the use case where an annotation is created which refers to an Element in a separate Document. This is due to the Annotation being a property of the element - so if you want to create a separate annotation for an element, you need to modify the element to add the annotation.
This can be solved by making the following changes:
- Remove the annotation property from Element
- Add a property to Annotation which references the Element it annotates
- Add a property Document which includes all Annotations defined within that document [this would be convenient for serializations, but not essential for the domain model]
The proposed changes are similar to how the Relationship is currently modeled.
Positives of the proposed change:
- Annotations can be created independent of the Element being annotated - useful for reviews, corrections, notes being added after an Element is originally created
- Matches the way tag/value serializes annotations in SPDX 2.2
Negatives of the proposed change:
- Harder to find annotations associated with an Element. If the Annotations are in the same Document, you need to re-associate the Annotations to the Element. If the Annotations are in a separate document, correlating the Annotation to the Element is even more difficult.
- Incompatible with the current SPDX 2.2 model which has Annotations as a property of Element