Initial checkin of perspective model.#745
Conversation
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
Signed-off-by: Steve Springett <steve@springett.us>
There was a problem hiding this comment.
Pull request overview
This PR implements a new "perspective" model for CycloneDX 2.0, which enables domain-specific views into BOM documents. This allows different audiences to interpret and navigate data through their own conceptual lens using JSON path expressions and terminology mappings.
Changes:
- Added comprehensive JSON schema for perspective model with support for predefined and custom domains
- Integrated perspectives into main CycloneDX 2.0 schema
- Added "perspective" as a new external reference type
- Included test data demonstrating NTIA Minimum Elements perspective
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| schema/2.0/model/cyclonedx-perspective-2.0.schema.json | Complete JSON schema definition for the perspective model with domains, mappings, and relevance |
| schema/2.0/cyclonedx-2.0.schema.json | Integration of perspective schema into main CycloneDX schema |
| schema/2.0/model/cyclonedx-common-2.0.schema.json | Addition of "perspective" external reference type |
| tools/src/test/resources/2.0/valid-perspective-2.0.json | Test data showing NTIA Minimum Elements perspective with mappings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://cyclonedx.org/schema/2.0/model/cyclonedx-perspective-2.0.schema.json", | ||
| "type": "null", |
There was a problem hiding this comment.
The root schema has "type": "null" which is incorrect. This schema defines object types (perspectives, perspective, etc.) in $defs, but the root type should not be "null". This should either be removed or changed to "type": "object" if the schema is intended to be used standalone. Given that this is a model schema meant to be referenced from other schemas, the type field at the root level should likely be omitted entirely.
| "type": "null", |
Implements perspective model. Closes #736