Skip to content

Commit 6b91494

Browse files
committed
refactor: explicitely ignore json-implementation's format hints
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 4842828 commit 6b91494

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cyclonedx/model/bom.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,12 @@ def __repr__(self) -> str:
314314
return f'<BomMetaData timestamp={self.timestamp}, component={self.component}>'
315315

316316

317-
@serializable.serializable_class(ignore_unknown_during_deserialization=True)
317+
@serializable.serializable_class(
318+
ignore_during_deserialization={
319+
'$schema', 'bom_format', 'spec_version', # JSON-implementation's format hints
320+
},
321+
ignore_unknown_during_deserialization=True
322+
)
318323
class Bom:
319324
"""
320325
This is our internal representation of a bill-of-materials (BOM).

0 commit comments

Comments
 (0)