class
CycloneDX::Metadata
- CycloneDX::Metadata
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
cyclonedx/metadata.crConstructors
- .new(pull : JSON::PullParser)
- .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)
Instance Method Summary
- #authors : Array(OrganizationalContact) | Nil
- #component : Component | Nil
- #licenses : Array(License | LicenseExpression) | Nil
- #lifecycles : Array(Lifecycle) | Nil
- #manufacture : OrganizationalEntity | Nil
-
#manufacturer : OrganizationalEntity | Nil
1.6+.
- #properties : Array(Property) | Nil
- #supplier : OrganizationalEntity | Nil
- #timestamp : String | Nil
- #to_xml(xml : XML::Builder)
- #tool_components : Array(Component) | Nil
- #tool_services : Array(Service) | Nil
-
#tools : Array(Tool) | Nil
#toolshas two mutually exclusive shapes in the schema (anxs:choicein XML, aoneOfin JSON), so it cannot be a single generated field:
Constructor Detail
def self.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)
#
Instance Method Detail
def manufacturer : OrganizationalEntity | Nil
#
1.6+. Distinct from the older, deprecated #manufacture below.
#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.