Newer
Older
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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schemas/manifest.json",
"title": "JSON schema for Castopod Plugins's manifest.json files",
"description": "The Castopod plugin manifest defines both metadata and behavior of a plugin",
"type": "object",
"properties": {
"name": {
"description": "The plugin name, including 'vendor-name/' prefix",
"type": "string",
"pattern": "^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*$",
"examples": ["acme/hello-world"]
},
"version": {
"description": "The plugin's semantic version. See https://semver.org/",
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"examples": ["1.0.0"]
},
"description": {
"description": "This helps people discover your plugin as it's listed in repositories",
"type": "string"
},
"authors": {
"type": "array",
"items": {
"$ref": "#/$defs/person"
}
},
"homepage": {
"description": "The URL to the plugin homepage",
"type": "string",
"format": "uri"
},
"license": {
"description": "You should specify a license for your plugin so that people know how they are permitted to use it, and any restrictions you're placing on it.",
"default": "UNLICENSED",
"anyOf": [
{
"type": "string"
},
{
"enum": [
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"Apache-2.0",
"BSL-1.0",
"GPL-3.0-only",
"GPL-3.0-or-later",
"LGPL-3.0-only",
"LGPL-3.0-or-later",
"MIT",
"MPL-2.0",
"Unlicense",
"UNLICENSED"
]
}
]
},
"private": {
"type": "boolean",
"description": "If set to true, then repositories should refuse to publish it.",
"default": false
},
"submodule": {
"type": "boolean",
"description": "Set to `true` if the plugin is part of a monorepo (i.e., in the same Git repository as other plugins). Releases should be tagged as `<plugin-name>@<version>` to ensure proper version indexing by plugin repositories.",
"default": false
},
"keywords": {
"description": "This helps people discover your plugin as it's listed in repositories",
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"enum": [
"accessibility",
"analytics",
"monetization",
"podcasting2",
"privacy",

Yassine Doghri
committed
"productivity",
"seo"
]
}
]
},
"uniqueItems": true
},

Yassine Doghri
committed
"minCastopodVersion": {
"description": "The minimal version of Castopod for which the plugin is compatible with.",
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(\\.(0|[1-9]\\d*))?(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"examples": ["2.0"]
},
"hooks": {
"description": "The hooks used by the plugin.",
"type": "array",
"items": {

Yassine Doghri
committed
"enum": [
"rssBeforeChannel",
"rssAfterChannel",
"rssBeforeItem",
"rssAfterItem",
"siteHead"
]
},
"uniqueItems": true
},
"settings": {
"type": "object",
"properties": {
"general": {
"$ref": "#/$defs/fields"
},
"podcast": {
"$ref": "#/$defs/fields"
},
"episode": {
"$ref": "#/$defs/fields"
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
}
}
},
"files": {
"description": "List of files to include in your plugin package. If you include a folder in the array, all files inside it will also be included.",
"type": "array",
"items": {
"type": "string"
}
},
"repository": {
"description": "Specify the place where your plugin code lives. This is helpful for people who want to contribute.",
"type": ["object", "string"],
"properties": {
"type": {
"type": "string"
},
"url": {
"type": "string"
},
"directory": {
"type": "string"
}
}
}
},
"required": ["name", "version"],
"additionalProperties": false,
"$defs": {
"person": {
"description": "A person who has been involved in creating or maintaining this plugin.",
"type": ["object", "string"],
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"url": {
"type": "string",
"format": "uri"
}
}
},
"fields": {

Yassine Doghri
committed
"type": "object",
"patternProperties": {
"^[A-Za-z]+[\\w\\-\\:\\.]*$": { "$ref": "#/$defs/field" }
},
"additionalProperties": false

Yassine Doghri
committed
},
"field": {
"type": "object",
"properties": {
"type": {

Yassine Doghri
committed
"enum": [
"checkbox",
"datetime",
"email",

Yassine Doghri
committed
"group",

Yassine Doghri
committed
"html",

Yassine Doghri
committed
"markdown",
"number",
"radio-group",

Yassine Doghri
committed
"rss",

Yassine Doghri
committed
"select-multiple",
"select",
"text",
"textarea",
"toggler",
"url"
],
"default": "text"
},
"label": {
"type": "string"
},
"hint": {
"type": "string"
},
"helper": {
"type": "string"
},
"optional": {
"type": "boolean"

Yassine Doghri
committed
},

Yassine Doghri
committed
"validationRules": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]

Yassine Doghri
committed
},
"multiple": {
"type": "boolean"
"required": ["label"],

Yassine Doghri
committed
"unevaluatedProperties": false,

Yassine Doghri
committed
"allOf": [

Yassine Doghri
committed
{ "$ref": "#/$defs/field-multiple-implies-options-is-required" },

Yassine Doghri
committed
{ "$ref": "#/$defs/require-fields-for-group-type" },
{ "$ref": "#/$defs/default-value-based-on-type" }

Yassine Doghri
committed
]
},
"option": {
"type": "object",
"properties": {
"label": {
"type": "string"
},

Yassine Doghri
committed
"description": {

Yassine Doghri
committed
"type": "string"
}
},

Yassine Doghri
committed
"required": ["label"],
"additionalProperties": false

Yassine Doghri
committed
},
"field-multiple-implies-options-is-required": {

Yassine Doghri
committed
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
"if": {
"properties": {
"type": {
"enum": ["radio-group", "select", "select-multiple"]
}
}
},
"then": {
"properties": {
"options": {
"type": "object",
"patternProperties": {
"^[A-Za-z0-9]+[\\w\\-\\:\\.]*$": { "$ref": "#/$defs/option" }
},
"additionalProperties": false
}
},
"required": ["options"]
}
},
"require-fields-for-group-type": {
"if": {
"properties": {
"type": {
"const": "group"
}
}
},
"then": {
"properties": {
"fields": {
"type": "object",
"patternProperties": {
"^[A-Za-z]+[\\w\\-\\:\\.]*$": { "$ref": "#/$defs/field" }
},
"additionalProperties": false
}
},
"required": ["fields"]
}
},
"default-value-based-on-type": {
"allOf": [

Yassine Doghri
committed
{

Yassine Doghri
committed
"if": {

Yassine Doghri
committed
"properties": {
"type": {

Yassine Doghri
committed
"enum": [
"html",
"markdown",
"radio-group",
"rss",
"select",
"text",
"textarea"

Yassine Doghri
committed
]
}

Yassine Doghri
committed
}
},
"then": {
"properties": {
"defaultValue": { "type": "string" }
}

Yassine Doghri
committed
}
},

Yassine Doghri
committed
{

Yassine Doghri
committed
"if": {

Yassine Doghri
committed
"properties": {
"type": {

Yassine Doghri
committed
"enum": ["checkbox", "toggler"]

Yassine Doghri
committed
}

Yassine Doghri
committed
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
}
},
"then": {
"properties": {
"defaultValue": { "type": "boolean" }
}
}
},
{
"if": {
"properties": {
"type": {
"const": "datetime"
}
}
},
"then": {
"properties": {
"defaultValue": { "type": "string", "format": "date-time" }
}
}
},
{
"if": {
"properties": {
"type": {
"const": "email"
}
}
},
"then": {
"properties": {
"defaultValue": { "type": "string", "format": "email" }
}
}
},
{
"if": {
"properties": {
"type": {
"const": "number"
}
}
},
"then": {
"properties": {
"defaultValue": { "type": "number" }
}

Yassine Doghri
committed
}
},

Yassine Doghri
committed
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
{
"if": {
"properties": {
"type": {
"const": "select-multiple"
}
}
},
"then": {
"properties": {
"defaultValue": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "url"
}
}
},
"then": {
"properties": {
"defaultValue": { "type": "string", "format": "uri" }
}
}
}

Yassine Doghri
committed
]