Files
browser/plugins/schemas/create-form.schema.json
T
2026-07-11 14:56:10 +08:00

27 lines
871 B
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://browser.local/schemas/plugin-create-form.schema.json",
"title": "PluginCreateFormSchema",
"type": "object",
"required": ["fields"],
"additionalProperties": false,
"properties": {
"fields": {
"type": "array",
"items": {
"type": "object",
"required": ["key", "label", "type"],
"additionalProperties": false,
"properties": {
"key": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$" },
"label": { "type": "string", "minLength": 1, "maxLength": 60 },
"type": { "enum": ["text", "number", "boolean", "select", "path", "port"] },
"required": { "type": "boolean" },
"default": {},
"options": { "type": "array", "items": { "type": "string" } }
}
}
}
}
}