Skip to content

Added support for conditional components and associated unit tests#929

Open
stevespringett wants to merge 1 commit into
2.0-devfrom
2.0-dev-conditional-components
Open

Added support for conditional components and associated unit tests#929
stevespringett wants to merge 1 commit into
2.0-devfrom
2.0-dev-conditional-components

Conversation

@stevespringett

@stevespringett stevespringett commented May 12, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Steve Springett <steve@springett.us>
@stevespringett stevespringett added this to the 2.0 milestone May 12, 2026
@stevespringett stevespringett self-assigned this May 12, 2026
@stevespringett stevespringett requested a review from a team as a code owner May 12, 2026 21:42
@stevespringett stevespringett linked an issue May 12, 2026 that may be closed by this pull request
@stevespringett stevespringett added request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration labels May 12, 2026
@jkowalleck

Copy link
Copy Markdown
Member

RFC notice sent on May 12, 2026

Public RFC period ends June 09, 2026

@jkowalleck jkowalleck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some test cases may be enhanced for documentation reasons.

"description": "A wrapper that expresses a conditional or alternate relationship between two or more components. Use to model approved alternates, multi-sourced parts, build variants, and required component groups in physical device bills of materials.",
"required": [
"type",
"name",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it really needed to havename a required field?
we could make it an optional one in a non-breaking change in the future.

"type": "component-choice",
"name": "Transistor Choice",
"operator": "XOR",
"supplier": { "name": "Should not be allowed on a choice wrapper" },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"supplier": { "name": "Should not be allowed on a choice wrapper" },
"supplier": { "name": "`supplier` is not allowed on a choice wrapper" },

"components": [
{
"type": "component-choice",
"name": "Transistor Choice",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a description, so dont need to guess why this data is invalid.

Suggested change
"name": "Transistor Choice",
"name": "Transistor Choice",
"description": "unexpected property `supplier`",

"components": [
{
"type": "component-choice",
"name": "Transistor Choice",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a description, so dont need to guess why this data is invalid.

Suggested change
"name": "Transistor Choice",
"name": "Transistor Choice",
"description": "unexpected value for `operator`",

},
"components": [
{
"type": "component-choice",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a description, so dont need to guess why this data is invalid.

Suggested change
"type": "component-choice",
"type": "component-choice",
"description": "missing property `name`",

"components": [
{
"type": "component-choice",
"name": "Transistor Choice",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a description, so dont need to guess why this data is invalid.

Suggested change
"name": "Transistor Choice",
"name": "Transistor Choice",
"description": "missing property `operator`",

"components": [
{
"type": "component-choice",
"name": "JP2 Debug Header",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a description, so dont need to guess why this data is invalid.

Suggested change
"name": "JP2 Debug Header",
"name": "JP2 Debug Header",
"description": "invalidvalue for `operator`",

"components": [
{
"type": "component-choice",
"name": "Transistor Choice",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a description, so dont need to guess why this data is invalid.

Suggested change
"name": "Transistor Choice",
"name": "Transistor Choice",
"description": "list `components` but have atleast two items",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cap: hardware Capability: HBOM proposed core enhancement request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add support for conditional components

2 participants