94 lines
3.1 KiB
JSON
94 lines
3.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://github.com/kdlbs/kandev/blob/main/plugin-registry/schema.json",
|
|
"title": "Kandev marketplace registry list",
|
|
"description": "Schema for plugin-registry/plugins.yaml, the curated pointer list of plugin and canvas repositories. Release metadata is read from the package at index-build time; preview images are registry-owned presentation metadata.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["plugins"],
|
|
"properties": {
|
|
"plugins": {
|
|
"type": "array",
|
|
"description": "The curated list of plugin repositories, one entry per plugin.",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "repo"],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Stable plugin identifier. MUST equal the plugin manifest `id` of the repo's latest release. Unique across the file.",
|
|
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
},
|
|
"repo": {
|
|
"type": "string",
|
|
"description": "GitHub repository in owner/name form; the release source for this plugin.",
|
|
"pattern": "^[^/]+/[^/]+$"
|
|
},
|
|
"featured": {
|
|
"type": "boolean",
|
|
"description": "When true, a maintainer has pinned this entry above star order in the catalog.",
|
|
"default": false
|
|
},
|
|
"categories": {
|
|
"type": "array",
|
|
"description": "Curation-only category tags used for filtering in the catalog.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": ["plugin", "canvas"],
|
|
"default": "plugin",
|
|
"description": "Omitted kind means plugin. Canvas entries are validated as portable canvas packages."
|
|
},
|
|
"previews": {
|
|
"type": "array",
|
|
"maxItems": 8,
|
|
"items": {
|
|
"$ref": "#/$defs/preview"
|
|
},
|
|
"description": "Ordered listing images. Optional for plugins and required for canvas entries."
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"required": ["kind"],
|
|
"properties": {"kind": {"const": "canvas"}}
|
|
},
|
|
"then": {
|
|
"required": ["previews"],
|
|
"properties": {"previews": {"minItems": 1}}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"preview": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["url", "alt"],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"pattern": "^https://",
|
|
"maxLength": 2048,
|
|
"description": "Direct HTTPS listing image URL without credentials or a fragment."
|
|
},
|
|
"alt": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 300,
|
|
"pattern": "\\S",
|
|
"description": "Accessible description of the listing image."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|