-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathtea-well-known.schema.json
More file actions
75 lines (75 loc) · 2.37 KB
/
tea-well-known.schema.json
File metadata and controls
75 lines (75 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://cyclonedx.github.io/transparency-exchange-api/discovery/tea-well-known.schema.json",
"title": "TEA .well-known discovery document",
"description": "JSON Schema for the TEA .well-known/tea discovery payload that lists available TEA API endpoints and supported versions.",
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "endpoints"],
"properties": {
"schemaVersion": {
"type": "integer",
"const": 1,
"description": "Schema version for the TEA .well-known discovery document. Currently always 1."
},
"endpoints": {
"type": "array",
"description": "List of available TEA service endpoints and their supported versions.",
"minItems": 1,
"items": { "$ref": "#/definitions/endpoint" }
}
},
"definitions": {
"endpoint": {
"type": "object",
"additionalProperties": false,
"required": ["url", "versions"],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "Base URL of the TEA API endpoint (no trailing slash)."
},
"versions": {
"type": "array",
"description": "Supported TEA API versions for this endpoint. Use with the /v{version} prefix when constructing requests.",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^\\d+\\.\\d+(?:\\.\\d+)?(?:-[0-9A-Za-z.-]+)?$",
"examples": [
"0.1.0-beta.1",
"0.2.0-beta.2",
"1.0.0"
],
"description": "TEA OpenAPI Spec Version identifier, conforms to SemVer 2.0 (https://semver.org/)."
}
},
"priority": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 1,
"description": "Optional priority for this endpoint. Higher values indicate higher priority. Range: 0 to 1."
}
}
}
},
"examples": [
{
"schemaVersion": 1,
"endpoints": [
{
"url": "https://api.teaexample.com",
"versions": ["0.1.0-beta.1", "0.2.0-beta.2", "1.0"],
"priority": 1
},
{
"url": "https://api2.teaexample.com/mytea",
"versions": ["1.0.0"],
"priority": 0.5
}
]
}
]
}