Repository navigation
Expand file tree
/
Copy pathrecord.schema.json
More file actions
138 lines (138 loc) · 3.74 KB
/
Copy pathrecord.schema.json
File metadata and controls
138 lines (138 loc) · 3.74 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://queryahub.github.io/extensions/schema/record.schema.json",
"title": "Extension registry record",
"description": "What an author writes in extensions/<id>.json. Everything else (name, type, engines, sandbox, ...) is read from manifest.json inside the archive, so it cannot disagree with the extension.",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"version"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*(\\.[a-z0-9]+(-[a-z0-9]+)*)+$",
"description": "Same as manifest.json id, for example acme.redis-driver. The file is named <id>.json."
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$",
"description": "Same as manifest.json version."
},
"downloadUrl": {
"type": "string",
"pattern": "^https://github\\.com/[^/]+/[^/]+/releases/download/[^/]+/[^/]+$",
"description": "A release asset on GitHub. Nothing else is accepted. With sha256: one archive for every platform; use platforms for per-platform builds."
},
"sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"description": "SHA-256 of the archive, lowercase hex."
},
"yanked": {
"type": "boolean",
"description": "Hides the extension from the Marketplace without deleting the record."
},
"testEnv": {
"type": "object",
"additionalProperties": false,
"required": [
"image",
"port"
],
"description": "The database the CI tests a database driver against.",
"properties": {
"image": {
"type": "string",
"pattern": "^ghcr\\.io/queryahub/querya-testdb-[a-z0-9-]+:[A-Za-z0-9._-]+$",
"description": "A Querya test database image."
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"connect": {
"type": "object",
"description": "Extra db.connect parameters; host and port are filled in."
},
"query": {
"type": "string"
},
"table": {
"type": "string"
},
"database": {
"type": "string"
}
}
},
"platforms": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"description": "One archive per build target, for an extension that ships a native binary. Use this or downloadUrl + sha256, not both. CI runs the linux-x64 build.",
"propertyNames": {
"enum": [
"linux-x64",
"macos-arm64",
"macos-x64",
"windows-x64"
]
},
"patternProperties": {
"^(linux-x64|macos-arm64|macos-x64|windows-x64)$": {
"type": "object",
"additionalProperties": false,
"required": [
"downloadUrl",
"sha256"
],
"properties": {
"downloadUrl": {
"type": "string",
"pattern": "^https://github\\.com/[^/]+/[^/]+/releases/download/[^/]+/[^/]+$"
},
"sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
}
}
}
}
}
},
"oneOf": [
{
"required": [
"downloadUrl",
"sha256"
],
"not": {
"required": [
"platforms"
]
}
},
{
"required": [
"platforms"
],
"not": {
"anyOf": [
{
"required": [
"downloadUrl"
]
},
{
"required": [
"sha256"
]
}
]
}
}
]
}