feat(schema): add tool schema, demo and admin tool types
continuous-integration/drone/push Build is passing

This commit is contained in:
apairon committed 2026-10-20 22:56:04 +00:00
1 parent 439c8773e6
commit f26f8c7802
3 files changed
+92 -74

No files matched your search

+12
View File
@@ -4,6 +4,18 @@ namespace: myapi
meta:
# wird in der Admin-UI zum Projekt aufgegeben
imageUrl: https://source.unsplash.com/random/?internet
tools:
- name: demo-overview
label:
de: Demo-Übersicht
en: Demo overview
description:
de: Beispiel-Tool für die Projekt-Übersicht
en: Example project overview tool
icon: view-dashboard-outline
group: tools
module: _/assets/tools/demo-overview/index.js
capabilities: [db, ui, log]
# Liste aller möglichen Kollektionen (Listen, Seiten...) zum Projekt
collections:
+1 -74
View File
@@ -77,80 +77,7 @@
"tools": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"module"
],
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-_]*$"
},
"label": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/i18nText"
}
]
},
"description": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/i18nText"
}
]
},
"icon": {
"type": "string"
},
"group": {
"type": "string"
},
"module": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"capabilities": {
"type": "array",
"items": {
"enum": [
"db",
"files",
"xlsx",
"ui",
"log",
"progress",
"state"
]
}
},
"settings": {
"type": "object"
},
"hidden": {
"type": "boolean"
}
}
"$ref": "tool.schema.json"
}
},
"i18n": {
+79
View File
@@ -0,0 +1,79 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Custom Tool",
"description": "Project custom tool entry (meta.tools[]).",
"type": "object",
"additionalProperties": false,
"required": [
"name",
"module"
],
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-_]*$"
},
"label": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/i18nText"
}
]
},
"description": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/i18nText"
}
]
},
"icon": {
"type": "string"
},
"group": {
"type": "string"
},
"module": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"capabilities": {
"type": "array",
"items": {
"enum": [
"db",
"files",
"xlsx",
"ui",
"log",
"progress",
"state"
]
}
},
"settings": {
"type": "object"
},
"hidden": {
"type": "boolean"
}
}
}