@@ -398,14 +398,12 @@ def __init__(
398398 self , value : str , * ,
399399 bom_ref : Optional [Union [str , BomRef ]] = None ,
400400 acknowledgement : Optional [LicenseAcknowledgement ] = None ,
401- expression_details : Optional [Iterable [ExpressionDetails ]] = None ,
402- properties : Optional [Iterable [Property ]] = None ,
401+ details : Optional [Iterable [ExpressionDetails ]] = None ,
403402 ) -> None :
404403 self ._bom_ref = _bom_ref_from_str (bom_ref )
405404 self ._value = value
406405 self ._acknowledgement = acknowledgement
407- self .expression_details = expression_details or []
408- self .properties = properties or []
406+ self .details = details or []
409407
410408 @property
411409 @serializable .view (SchemaVersion1Dot5 )
@@ -469,6 +467,7 @@ def acknowledgement(self, acknowledgement: Optional[LicenseAcknowledgement]) ->
469467 self ._acknowledgement = acknowledgement
470468
471469 @property
470+ @serializable .json_name ('expressionDetails' )
472471 @serializable .view (SchemaVersion1Dot7 )
473472 @serializable .xml_array (serializable .XmlArraySerializationType .FLAT , child_name = 'details' )
474473 @serializable .xml_sequence (1 )
@@ -479,49 +478,18 @@ def details(self) -> 'SortedSet[ExpressionDetails]':
479478 Returns:
480479 `Iterable[ExpressionDetails]` if set else `None`
481480 """
482- return self ._expression_details
481+ return self ._details
483482
484- @expression_details .setter
485- def details (self , expression_details : Iterable [ExpressionDetails ]) -> None :
486- self ._expression_details = SortedSet (expression_details )
487-
488- # @property
489- # @serializable.view(SchemaVersion1Dot7)
490- # ...
491- # @serializable.xml_array(serializable.XmlArraySerializationType.FLAT, child_name='licensing')
492- # @serializable.xml_sequence(2)
493- # def licensing(self) -> ...:
494- # ... # TODO
495- #
496-
497- @property
498- @serializable .view (SchemaVersion1Dot7 )
499- @serializable .xml_array (serializable .XmlArraySerializationType .NESTED , 'property' )
500- @serializable .xml_sequence (3 )
501- def properties (self ) -> 'SortedSet[Property]' :
502- """
503- Provides the ability to document properties in a key/value store. This provides flexibility to include data not
504- officially supported in the standard without having to use additional namespaces or create extensions.
505-
506- Property names of interest to the general public are encouraged to be registered in the CycloneDX Property
507- Taxonomy - https://github.com/CycloneDX/cyclonedx-property-taxonomy. Formal registration is OPTIONAL.
508-
509- Return:
510- Set of `Property`
511- """
512- return self ._properties
513-
514- @properties .setter
515- def properties (self , properties : Iterable [Property ]) -> None :
516- self ._properties = SortedSet (properties )
483+ @details .setter
484+ def details (self , details : Iterable [ExpressionDetails ]) -> None :
485+ self ._details = SortedSet (details )
517486
518487 def __comparable_tuple (self ) -> _ComparableTuple :
519488 return _ComparableTuple ((
520489 self ._acknowledgement ,
521490 self ._value ,
522491 self ._bom_ref .value ,
523- _ComparableTuple (self .expression_details ),
524- _ComparableTuple (self .properties ),
492+ _ComparableTuple (self .details ),
525493 ))
526494
527495 def __hash__ (self ) -> int :
@@ -671,10 +639,10 @@ def xml_normalize(cls, o: LicenseRepository, *,
671639 # mixed license expression and license? this is an invalid constellation according to schema!
672640 # see https://github.com/CycloneDX/specification/pull/205
673641 # but models need to allow it for backwards compatibility with JSON CDX < 1.5
674- if expression .expression_details and cls .__supports_expression_details (view ):
642+ if expression .details and cls .__supports_expression_details (view ):
675643 elem .append (cls .__serialize_license_expression_details_xml (expression , view , xmlns ))
676644 else :
677- if expression .expression_details :
645+ if expression .details :
678646 warn ('LicenseExpression details are not supported in schema versions < 1.7; skipping serialization' )
679647 elem .append (expression .as_xml ( # type:ignore[attr-defined]
680648 view_ = view , as_string = False , element_name = 'expression' , xmlns = xmlns ))
0 commit comments