class

CycloneDX::Metadata

Inherits JSON::Serializable / Reference / Object

Constructors

new(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)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

authors
Source
component
Source
licenses
Source
lifecycles
Source
manufacture
Source
manufacturer

1.6+. Distinct from the older, deprecated manufacture below.

Source
properties
Source
supplier
Source
timestamp
Source
to_xml(xml : XML::Builder)
Source
tool_components
Source
tool_services
Source
tools

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.

Source