-
-
Notifications
You must be signed in to change notification settings - Fork 16
Clarify TEA Product fields #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand why we have JSON schemas separate to the OpenAPI Spec, which can define everything in one place and save repetition @ppkarwasz ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #111 (comment) I still haven't updated the PR. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
"$schema": http://json-schema.org/draft-07/schema# | ||
"$id": https://raw.githubusercontent.com/CycloneDX/transparency-exchange-api/refs/heads/main/spec/tea.schema.yaml | ||
title: Transparency Exchange API Schema | ||
description: Schema for the domain objects of the Transparency Exchange API | ||
"$defs": | ||
# | ||
# General types | ||
# | ||
uuid: | ||
type: string | ||
description: A UUID | ||
pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" | ||
identifier_type: | ||
type: string | ||
description: Enumeration of identifiers types | ||
enum: | ||
- cpe | ||
- tei | ||
- purl | ||
identifier: | ||
type: object | ||
description: An identifier with a specified type | ||
properties: | ||
type: | ||
"$ref": "#/$defs/identifier_type" | ||
description: Type of identifier, e.g., `cpe`, `purl`, or `tei` | ||
id: | ||
type: string | ||
id: The complete identifier | ||
# | ||
# Domain objects | ||
# | ||
product: | ||
type: object | ||
title: TEA Product | ||
description: A TEA product | ||
properties: | ||
uuid: | ||
"$ref": "#/$defs/uuid" | ||
description: A unique identifier for this product | ||
name: | ||
type: string | ||
description: Product name in clear text | ||
identifiers: | ||
type: array | ||
description: A list of identifiers that apply to this product | ||
items: | ||
"$ref": "#/$defs/identifier" | ||
leaves: | ||
type: array | ||
description: A list of TEA Leaves | ||
items: | ||
"$ref": "#/$defs/uuid" | ||
description: The unique identifier of the TEA Leaf | ||
required: | ||
- uuid | ||
- name | ||
- identifiers | ||
- leaves | ||
leaf: | ||
type: object | ||
description: A TEA leaf | ||
properties: | ||
uuid: | ||
"$ref": "#/$defs/uuid" | ||
required: | ||
- uuid | ||
collection: | ||
type: object | ||
description: A TEA collection | ||
properties: | ||
uuid: | ||
"$ref": "#/$defs/uuid" | ||
version: | ||
type: integer | ||
default: 1 | ||
description: Collection version, incremented each time its content changes. | ||
required: | ||
- uuid | ||
artifact: | ||
type: object | ||
description: A security-related document | ||
properties: | ||
uuid: | ||
"$ref": "#/$defs/uuid" | ||
required: | ||
- uuid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.