Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cyclonedx/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def deserialize(cls, o: Any) -> ExternalReferenceType:
return ExternalReferenceType(o)


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class XsUri(serializable.helpers.BaseHelper):
"""
Helper class that allows us to perform validation on data strings that are defined as xs:anyURI
Expand Down Expand Up @@ -802,7 +802,7 @@ def is_bom_link(self) -> bool:
return self._uri.startswith(_BOM_LINK_PREFIX)


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class ExternalReference:
"""
This is our internal representation of an ExternalReference complex type that can be used in multiple places within
Expand Down Expand Up @@ -914,7 +914,7 @@ def __repr__(self) -> str:
return f'<ExternalReference {self.type.name}, {self.url}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Property:
"""
This is our internal representation of `propertyType` complex type that can be used in multiple places within
Expand Down Expand Up @@ -989,7 +989,7 @@ def __repr__(self) -> str:
return f'<Property name={self.name}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class NoteText:
"""
This is our internal representation of the Note.text complex type that can be used in multiple places within
Expand Down Expand Up @@ -1081,7 +1081,7 @@ def __repr__(self) -> str:
return f'<NoteText content_type={self.content_type}, encoding={self.encoding}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Note:
"""
This is our internal representation of the Note complex type that can be used in multiple places within
Expand Down Expand Up @@ -1166,7 +1166,7 @@ def __repr__(self) -> str:
return f'<Note id={id(self)}, locale={self.locale}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class IdentifiableAction:
"""
This is our internal representation of the `identifiableActionType` complex type.
Expand Down Expand Up @@ -1252,7 +1252,7 @@ def __repr__(self) -> str:
return f'<IdentifiableAction name={self.name}, email={self.email}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Copyright:
"""
This is our internal representation of the `copyrightsType` complex type.
Expand Down
4 changes: 2 additions & 2 deletions cyclonedx/model/bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
from packageurl import PackageURL


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class BomMetaData:
"""
This is our internal representation of the metadata complex type within the CycloneDX standard.
Expand Down Expand Up @@ -314,7 +314,7 @@ def __repr__(self) -> str:
return f'<BomMetaData timestamp={self.timestamp}, component={self.component}>'


@serializable.serializable_class(ignore_during_deserialization=['$schema', 'bom_format', 'spec_version'])
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Bom:
"""
This is our internal representation of a bill-of-materials (BOM).
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/model/bom_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
_T_BR = TypeVar('_T_BR', bound='BomRef')


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class BomRef(serializable.helpers.BaseHelper):
"""
An identifier that can be used to reference objects elsewhere in the BOM.
Expand Down
16 changes: 8 additions & 8 deletions cyclonedx/model/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
from .release_note import ReleaseNotes


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Commit:
"""
Our internal representation of the `commitType` complex type.
Expand Down Expand Up @@ -326,7 +326,7 @@ def deserialize(cls, o: Any) -> ComponentType:
return ComponentType(o)


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Diff:
"""
Our internal representation of the `diffType` complex type.
Expand Down Expand Up @@ -408,7 +408,7 @@ class PatchClassification(str, Enum):
UNOFFICIAL = 'unofficial'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Patch:
"""
Our internal representation of the `patchType` complex type.
Expand Down Expand Up @@ -498,7 +498,7 @@ def __repr__(self) -> str:
return f'<Patch type={self.type}, id={id(self)}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Pedigree:
"""
Our internal representation of the `pedigreeType` complex type.
Expand Down Expand Up @@ -661,7 +661,7 @@ def __repr__(self) -> str:
return f'<Pedigree id={id(self)}, hash={hash(self)}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Swid:
"""
Our internal representation of the `swidType` complex type.
Expand Down Expand Up @@ -813,7 +813,7 @@ def __repr__(self) -> str:
return f'<Swid tagId={self.tag_id}, name={self.name}, version={self.version}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class OmniborId(serializable.helpers.BaseHelper):
"""
Helper class that allows us to perform validation on data strings that must conform to
Expand Down Expand Up @@ -872,7 +872,7 @@ def __str__(self) -> str:
return self._id


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Swhid(serializable.helpers.BaseHelper):
"""
Helper class that allows us to perform validation on data strings that must conform to
Expand Down Expand Up @@ -931,7 +931,7 @@ def __str__(self) -> str:
return self._id


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Component(Dependable):
"""
This is our internal representation of a Component within a Bom.
Expand Down
12 changes: 6 additions & 6 deletions cyclonedx/model/component_evidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class AnalysisTechnique(str, Enum):
OTHER = 'other'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Method:
"""
Represents a method used to extract and/or analyze evidence.
Expand Down Expand Up @@ -181,7 +181,7 @@ def xml_denormalize(cls, o: 'XmlElement', *,
return [BomRef(value=t.get('ref')) for t in o]


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Identity:
"""
Our internal representation of the `identityType` complex type.
Expand Down Expand Up @@ -288,7 +288,7 @@ def __repr__(self) -> str:
f' methods={self.methods}, tools={self.tools}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Occurrence:
"""
Our internal representation of the `occurrenceType` complex type.
Expand Down Expand Up @@ -423,7 +423,7 @@ def __repr__(self) -> str:
return f'<Occurrence location={self.location}, line={self.line}, symbol={self.symbol}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class CallStackFrame:
"""
Represents an individual frame in a call stack.
Expand Down Expand Up @@ -567,7 +567,7 @@ def __repr__(self) -> str:
f' line={self.line}, column={self.column}, full_filename={self.full_filename}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class CallStack:
"""
Our internal representation of the `callStackType` complex type.
Expand Down Expand Up @@ -622,7 +622,7 @@ def __repr__(self) -> str:
return f'<CallStack frames={len(self.frames)}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class ComponentEvidence:
"""
Our internal representation of the `componentEvidenceType` complex type.
Expand Down
6 changes: 3 additions & 3 deletions cyclonedx/model/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from .bom_ref import BomRef


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class PostalAddress:
"""
This is our internal representation of the `postalAddressType` complex type that can be used in multiple places
Expand Down Expand Up @@ -187,7 +187,7 @@ def __repr__(self) -> str:
return f'<PostalAddress bom-ref={self.bom_ref}, street_address={self.street_address}, country={self.country}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class OrganizationalContact:
"""
This is our internal representation of the `organizationalContact` complex type that can be used in multiple places
Expand Down Expand Up @@ -277,7 +277,7 @@ def __repr__(self) -> str:
return f'<OrganizationalContact name={self.name}, email={self.email}, phone={self.phone}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class OrganizationalEntity:
"""
This is our internal representation of the `organizationalEntity` complex type that can be used in multiple places
Expand Down
16 changes: 8 additions & 8 deletions cyclonedx/model/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class CryptoFunction(str, Enum):
UNKNOWN = 'unknown'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class AlgorithmProperties:
"""
This is our internal representation of the cryptoPropertiesType.algorithmProperties ENUM type within the CycloneDX
Expand Down Expand Up @@ -514,7 +514,7 @@ def __repr__(self) -> str:
return f'<AlgorithmProperties primitive={self.primitive}, execution_environment={self.execution_environment}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class CertificateProperties:
"""
This is our internal representation of the `cryptoPropertiesType.certificateProperties` complex type within
Expand Down Expand Up @@ -746,7 +746,7 @@ class RelatedCryptoMaterialState(str, Enum):
SUSPENDED = 'suspended'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class RelatedCryptoMaterialSecuredBy:
"""
This is our internal representation of the `cryptoPropertiesType.relatedCryptoMaterialProperties.securedBy` complex
Expand Down Expand Up @@ -817,7 +817,7 @@ def __repr__(self) -> str:
return f'<RelatedCryptoMaterialSecuredBy mechanism={self.mechanism}, algorithm_ref={self.algorithm_ref}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class RelatedCryptoMaterialProperties:
"""
This is our internal representation of the `cryptoPropertiesType.relatedCryptoMaterialProperties` complex type
Expand Down Expand Up @@ -1086,7 +1086,7 @@ class ProtocolPropertiesType(str, Enum):
UNKNOWN = 'unknown'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class ProtocolPropertiesCipherSuite:
"""
This is our internal representation of the `cryptoPropertiesType.protocolProperties.cipherSuites.cipherSuite`
Expand Down Expand Up @@ -1179,7 +1179,7 @@ def __repr__(self) -> str:
return f'<ProtocolPropertiesCipherSuite name={self.name}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Ikev2TransformTypes:
"""
This is our internal representation of the `cryptoPropertiesType.protocolProperties.ikev2TransformTypes`
Expand Down Expand Up @@ -1321,7 +1321,7 @@ def __repr__(self) -> str:
return f'<Ikev2TransformTypes esn={self.esn}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class ProtocolProperties:
"""
This is our internal representation of the `cryptoPropertiesType.protocolProperties` complex type within
Expand Down Expand Up @@ -1447,7 +1447,7 @@ def __repr__(self) -> str:
return f'<ProtocolProperties type={self.type}, version={self.version}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class CryptoProperties:
"""
This is our internal representation of the `cryptoPropertiesType` complex type within CycloneDX standard.
Expand Down
13 changes: 8 additions & 5 deletions cyclonedx/model/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
_T_CreId = TypeVar('_T_CreId', bound='CreId')


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class CreId(serializable.helpers.BaseHelper):
"""
Helper class that allows us to perform validation on data strings that must conform to
Expand Down Expand Up @@ -89,7 +89,7 @@ def __str__(self) -> str:
return self._id


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Requirement:
"""
A requirement comprising a standard.
Expand Down Expand Up @@ -282,7 +282,7 @@ def __repr__(self) -> str:
f'title={self.title}, text={self.text}, parent={self.parent}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Level:
"""
Level of compliance for a standard.
Expand Down Expand Up @@ -397,7 +397,7 @@ def __repr__(self) -> str:
f'title={self.title}, description={self.description}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Standard:
"""
A standard of regulations, industry or organizational-specific standards, maturity models, best practices,
Expand Down Expand Up @@ -574,7 +574,10 @@ def __repr__(self) -> str:
f'description={self.description}, owner={self.owner}>'


@serializable.serializable_class(name='definitions')
@serializable.serializable_class(
name='definitions',
ignore_unknown_during_deserialization=True
)
class Definitions:
"""
The repository for definitions
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/model/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def deserialize(cls, o: Any) -> set['Dependency']:
return dependencies


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class Dependency:
"""
Models a Dependency within a BOM.
Expand Down
4 changes: 2 additions & 2 deletions cyclonedx/model/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class IssueClassification(str, Enum):
SECURITY = 'security'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class IssueTypeSource:
"""
This is our internal representation ofa source within the IssueType complex type that can be used in multiple
Expand Down Expand Up @@ -108,7 +108,7 @@ def __repr__(self) -> str:
return f'<IssueTypeSource name={self._name}, url={self.url}>'


@serializable.serializable_class
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
class IssueType:
"""
This is our internal representation of an IssueType complex type that can be used in multiple places within
Expand Down
Loading
Loading