Skip to content

Commit f33d2bc

Browse files
committed
Clarify TEA product fields
Modifies the documentation of the TEA product and completes its JSON schema. Signed-off-by: Piotr P. Karwasz <[email protected]>
1 parent 49068b8 commit f33d2bc

File tree

2 files changed

+50
-6
lines changed

2 files changed

+50
-6
lines changed

spec/product.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ same vendor.
2929

3030
## TEA Product object
3131

32+
Schema: https://raw.githubusercontent.com/CycloneDX/transparency-exchange-api/refs/heads/main/spec/tea.schema.yaml#/$defs/product
33+
3234
- __uuid__: A unique identifier for this product
33-
- __name__: Product name in clear text (str)
34-
- __identifiers__: A list of TEIs that apply to this product
35-
- __type__: Type of identifier - one of "tei", "purl", or "cpe"
36-
- __id__: The complete identifier (str)
37-
- __leaves__: A list of product leaves
38-
- __uuid__: TEA LEAF UUID
35+
- __name__: Product name in clear text
36+
- __identifiers__: A list of identifiers that apply to this product
37+
- __type__: Type of identifier, e.g., `cpe`, `purl`, or `tei`
38+
- __id__: The complete identifier
39+
- __leaves__: A list of TEA Leaves
40+
- __uuid__: The unique identifier of the TEA Leaf
3941

4042
The TEA LEAF UUID is used in the LEAF API to find out which versions
4143
of the LEAF that exists.

spec/tea.schema.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,60 @@
44
title: Transparency Exchange API Schema
55
description: Schema for the domain objects of the Transparency Exchange API
66
"$defs":
7+
#
8+
# General types
9+
#
710
uuid:
811
type: string
912
description: A UUID
1013
pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
14+
identifier_type:
15+
type: string
16+
description: Enumeration of identifiers types
17+
enum:
18+
- cpe
19+
- tei
20+
- purl
21+
identifier:
22+
type: object
23+
description: An identifier with a specified type
24+
properties:
25+
type:
26+
"$ref": "#/$defs/identifier_type"
27+
description: Type of identifier, e.g., `cpe`, `purl`, or `tei`
28+
id:
29+
type: string
30+
id: The complete identifier
31+
#
32+
# Domain objects
33+
#
1134
product:
1235
type: object
36+
title: TEA Product
1337
description: A TEA product
1438
properties:
1539
uuid:
1640
"$ref": "#/$defs/uuid"
41+
description: A unique identifier for this product
42+
name:
43+
type: string
44+
description: Product name in clear text
45+
identifiers:
46+
type: array
47+
description: A list of identifiers that apply to this product
48+
items:
49+
"$ref": "#/$defs/identifier"
50+
leaves:
51+
type: array
52+
description: A list of TEA Leaves
53+
items:
54+
"$ref": "#/$defs/uuid"
55+
description: The unique identifier of the TEA Leaf
1756
required:
1857
- uuid
58+
- name
59+
- identifiers
60+
- leaves
1961
leaf:
2062
type: object
2163
description: A TEA leaf

0 commit comments

Comments
 (0)