@@ -62,7 +62,7 @@ class BomTargetVersionRange:
6262 `version` and `version_range` are mutually exclusive.
6363
6464 .. note::
65- See the CycloneDX schema: https://cyclonedx.org/docs/1.6/#type_vulnerabilityType
65+ See the CycloneDX schema: https://cyclonedx.org/docs/1.6/xml/ #type_vulnerabilityType
6666 """
6767
6868 def __init__ (
@@ -219,7 +219,7 @@ class VulnerabilityAnalysis:
219219 Class that models the `analysis` sub-element of the `vulnerabilityType` complex type.
220220
221221 .. note::
222- See the CycloneDX schema: https://cyclonedx.org/docs/1.6/#type_vulnerabilityType
222+ See the CycloneDX schema: https://cyclonedx.org/docs/1.6/xml/ #type_vulnerabilityType
223223 """
224224
225225 def __init__ (
@@ -229,11 +229,6 @@ def __init__(
229229 responses : Optional [Iterable [ImpactAnalysisResponse ]] = None ,
230230 detail : Optional [str ] = None ,
231231 ) -> None :
232- if not state and not justification and not responses and not detail :
233- raise NoPropertiesProvidedException (
234- 'At least one of state, justification, responses or detail must be provided for VulnerabilityAnalysis '
235- '- none supplied'
236- )
237232 self .state = state
238233 self .justification = justification
239234 self .responses = responses or [] # type:ignore[assignment]
@@ -408,18 +403,14 @@ class VulnerabilitySource:
408403 This type is used for multiple purposes in the CycloneDX schema.
409404
410405 .. note::
411- See the CycloneDX schema: https://cyclonedx.org/docs/1.6/#type_vulnerabilitySourceType
406+ See the CycloneDX schema: https://cyclonedx.org/docs/1.6/xml/ #type_vulnerabilitySourceType
412407 """
413408
414409 def __init__ (
415410 self , * ,
416411 name : Optional [str ] = None ,
417412 url : Optional [XsUri ] = None ,
418413 ) -> None :
419- if not name and not url :
420- raise NoPropertiesProvidedException (
421- 'Either name or url must be provided for a VulnerabilitySource - neither provided'
422- )
423414 self .name = name
424415 self .url = url
425416
@@ -480,7 +471,7 @@ class VulnerabilityReference:
480471 intelligence.
481472
482473 .. note::
483- See the CycloneDX schema: https://cyclonedx.org/docs/1.6/#type_vulnerabilityType
474+ See the CycloneDX schema: https://cyclonedx.org/docs/1.6/xml/ #type_vulnerabilityType
484475 """
485476
486477 def __init__ (
@@ -723,7 +714,7 @@ class VulnerabilityRating:
723714 1.4 - see https://github.com/CycloneDX/specification/blob/master/schema/ext/vulnerability-1.0.xsd.
724715
725716 .. note::
726- See `ratingType` in https://cyclonedx.org/docs/1.6/#ratingType
717+ See `ratingType` in https://cyclonedx.org/docs/1.6/xml/ #ratingType
727718
728719 .. warning::
729720 As part of implementing support for CycloneDX schema version 1.4, the three score types defined in the schema
@@ -741,11 +732,6 @@ def __init__(
741732 vector : Optional [str ] = None ,
742733 justification : Optional [str ] = None ,
743734 ) -> None :
744- if not source and not score and not severity and not method and not vector and not justification :
745- raise NoPropertiesProvidedException (
746- 'At least one property must be provided when creating a VulnerabilityRating - none supplied.'
747- )
748-
749735 self .source = source
750736 self .score = score
751737 self .severity = severity
@@ -861,18 +847,14 @@ class VulnerabilityCredits:
861847 extension (in XML only).
862848
863849 .. note::
864- See the CycloneDX schema: https://cyclonedx.org/docs/1.6/#type_vulnerabilityType
850+ See the CycloneDX schema: https://cyclonedx.org/docs/1.6/xml/ #type_vulnerabilityType
865851 """
866852
867853 def __init__ (
868854 self , * ,
869855 organizations : Optional [Iterable [OrganizationalEntity ]] = None ,
870856 individuals : Optional [Iterable [OrganizationalContact ]] = None ,
871857 ) -> None :
872- if not organizations and not individuals :
873- raise NoPropertiesProvidedException (
874- 'One of `organizations` or `individuals` must be populated - neither were'
875- )
876858 self .organizations = organizations or [] # type:ignore[assignment]
877859 self .individuals = individuals or [] # type:ignore[assignment]
878860
0 commit comments