CycloneDX::Metadata
Inherits JSON::Serializable / Reference / Object
Constructors
new(pull : JSON::PullParser)
Sourcenew(component : Component | Nil = nil, tools : Array(Tool) | Nil = nil, authors : Array(OrganizationalContact) | Nil = nil, timestamp : String | Nil = nil, properties : Array(Property) | Nil = nil, lifecycles : Array(Lifecycle) | Nil = nil, manufacture : OrganizationalEntity | Nil = nil, supplier : OrganizationalEntity | Nil = nil, manufacturer : OrganizationalEntity | Nil = nil, licenses : Array(License | LicenseExpression) | Nil = nil, tool_components : Array(Component) | Nil = nil, tool_services : Array(Service) | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
authors
Sourcecomponent
Sourcelicenses
Sourcelifecycles
Sourcemanufacture
Sourceproperties
Sourcesupplier
Sourcetimestamp
Sourceto_xml(xml : XML::Builder)
Sourcetool_components
Sourcetool_services
Sourcetools
tools has two mutually exclusive shapes in the schema (an xs:choice in
XML, a oneOf in JSON), so it cannot be a single generated field:
- the original flat list of
toolType— deprecated from 1.5 but still valid in every supported version, and what this library emits; - from 1.5 on, an object of full
components/services, which is what current third-party producers (syft, trivy, cdxgen, …) write.
All three are serialized by hand in on_to_json/to_xml and parsed in
on_unknown_json_attribute.