Skip to content

Commit dc7e478

Browse files
authored
Merge pull request #128 from ppkarwasz/feat/clarify-component
Clarify TEA Component fields
2 parents 6c05e69 + aaa0bcb commit dc7e478

File tree

2 files changed

+63
-13
lines changed

2 files changed

+63
-13
lines changed

spec/openapi.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ paths:
103103
application/json:
104104
schema:
105105
type: array
106-
items:
106+
items:
107107
"$ref": "#/components/schemas/release"
108108
'400':
109109
$ref: "#/components/responses/400-invalid-request"
@@ -128,7 +128,7 @@ paths:
128128
description: Requested TEA Collection found and returned
129129
content:
130130
application/json:
131-
schema:
131+
schema:
132132
"$ref": "#/components/schemas/collection"
133133
'400':
134134
$ref: "#/components/responses/400-invalid-request"
@@ -155,7 +155,7 @@ paths:
155155
application/json:
156156
schema:
157157
type: array
158-
items:
158+
items:
159159
"$ref": "#/components/schemas/collection"
160160
'400':
161161
$ref: "#/components/responses/400-invalid-request"
@@ -304,6 +304,7 @@ components:
304304
description: A TEA component
305305
properties:
306306
uuid:
307+
description: A unique identifier for the TEA component
307308
"$ref": "#/components/schemas/uuid"
308309
name:
309310
type: string
@@ -318,6 +319,20 @@ components:
318319
- name
319320
- identifiers
320321
- versions
322+
examples:
323+
- uuid: 3910e0fd-aff4-48d6-b75f-8bf6b84687f0
324+
name: Apache Log4j API
325+
identifiers:
326+
- idType: purl
327+
idValue: pkg:maven/org.apache.logging.log4j/log4j-api
328+
- uuid: b844c9bd-55d6-478c-af59-954a932b6ad3
329+
name: Apache Log4j Core
330+
identifiers:
331+
- idType: cpe
332+
idValue: cpe:2.3:a:apache:log4j
333+
- idType: purl
334+
idValue: pkg:maven/org.apache.logging.log4j/log4j-core
335+
321336
#
322337
# TEA Release and related objects
323338
#
@@ -342,7 +357,7 @@ components:
342357
required:
343358
- uuid
344359
- version
345-
- release_date
360+
- release_date
346361
#
347362
# TEA Collection and related objects
348363
#

tea-component/tea-component.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# The TEA Component Index Object (TCO)
1+
# The TEA Component API
22

3-
The TEA COMPONENT INDEX is the object that indicates a product component. The product may
3+
The TEA Component object is the object that indicates a product component. The product may
44
be constructed with one or multiple Tea Components, each with their own set of
55
related artefacts.
66

@@ -19,18 +19,53 @@ product object has one or multiple TEI URNs.
1919
For the API to be able to present a list of versions in a cronological order,
2020
a timestamp for a release is required.
2121

22-
## The Tea Component Object
22+
## TEA Component Object
2323

24-
- __Uuid__ unique for this object
25-
- __Product name__: A text field
26-
- __Product version__: A text field, no required syntax
27-
- __Release date__: A unix timestamp
28-
- __Pre-release__: A boolean flag indicating a pre-release (beta, rc)
29-
- __Tco_uuid__: A reference to the TEA Collection objet for this release
24+
A TEA Component object has the following parts:
25+
26+
- __uuid__: A unique identifier for the TEA component
27+
- __name__: Component name
28+
- __identifiers__: List of identifiers for the component
29+
- __idType__: Type of identifier, e.g. `tei`, `purl`, `cpe`
30+
- __idValue__: Identifier value
3031

3132
Note: In coming versions, there may be a flag indicating lifecycle status
3233
for a component.
3334

35+
### Examples
36+
37+
Some examples of Maven artifacts as TEA Components:
38+
39+
```json
40+
{
41+
"uuid": "3910e0fd-aff4-48d6-b75f-8bf6b84687f0",
42+
"name": "Apache Log4j API",
43+
"identifiers": [
44+
{
45+
"idType": "purl",
46+
"idValue": "pkg:maven/org.apache.logging.log4j/log4j-api"
47+
}
48+
]
49+
}
50+
```
51+
52+
```json
53+
{
54+
"uuid": "b844c9bd-55d6-478c-af59-954a932b6ad3",
55+
"name": "Apache Log4j Core",
56+
"identifiers": [
57+
{
58+
"idType": "cpe",
59+
"idValue": "cpe:2.3:a:apache:log4j"
60+
},
61+
{
62+
"idType": "purl",
63+
"idValue": "pkg:maven/org.apache.logging.log4j/log4j-core"
64+
}
65+
]
66+
}
67+
```
68+
3469
## Handling the Pre-Release flag
3570

3671
The "Pre-release" flag is used to indicate that this is not a final release.

0 commit comments

Comments
 (0)