From 69cb0c1c9724decc8467cc2bbed09c016abebf25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SAL=C4=B0H=20=C3=96ZKARA?= Date: Tue, 9 Jun 2026 14:54:04 +0300 Subject: [PATCH] Address low-code schema review feedback --- .../dashboard-row-descriptor.schema.json | 3 +- ...board-visualization-descriptor.schema.json | 50 ++++++++++++++++--- .../endpoint-descriptor.schema.json | 10 ++-- .../form-layout-descriptor.schema.json | 2 +- .../permission-descriptor.schema.json | 2 +- ...t-background-worker-descriptor.schema.json | 14 +++++- 6 files changed, 68 insertions(+), 13 deletions(-) diff --git a/schemas/low-code/definitions/dashboard-row-descriptor.schema.json b/schemas/low-code/definitions/dashboard-row-descriptor.schema.json index bd1abbc591..909048ec29 100644 --- a/schemas/low-code/definitions/dashboard-row-descriptor.schema.json +++ b/schemas/low-code/definitions/dashboard-row-descriptor.schema.json @@ -22,11 +22,12 @@ { "items": [ { + "name": "overview", "type": "numberContainer", "title": "Overview", "numberContainer": { "items": [ - { "title": "Total Records", "entity": "Acme.Events.Event", "aggregation": "count" } + { "name": "total-records", "title": "Total Records", "entityName": "Acme.Events.Event", "aggregation": "count" } ] } } diff --git a/schemas/low-code/definitions/dashboard-visualization-descriptor.schema.json b/schemas/low-code/definitions/dashboard-visualization-descriptor.schema.json index 0a958fa9a1..6fd6e91f31 100644 --- a/schemas/low-code/definitions/dashboard-visualization-descriptor.schema.json +++ b/schemas/low-code/definitions/dashboard-visualization-descriptor.schema.json @@ -90,16 +90,54 @@ "required": ["name", "type", "title"], "allOf": [ { - "if": { "properties": { "type": { "const": "chart" } } }, - "then": { "required": ["chart", "entityName"] } + "if": { + "required": ["type"], + "properties": { + "type": { "enum": ["chart", "Chart"] } + } + }, + "then": { + "required": ["chart", "entityName"], + "properties": { + "chart": { "$ref": "dashboard-chart-descriptor.schema.json" }, + "entityName": { + "type": "string", + "minLength": 1 + } + } + } }, { - "if": { "properties": { "type": { "const": "list" } } }, - "then": { "required": ["list", "entityName"] } + "if": { + "required": ["type"], + "properties": { + "type": { "enum": ["list", "List"] } + } + }, + "then": { + "required": ["list", "entityName"], + "properties": { + "list": { "$ref": "dashboard-list-descriptor.schema.json" }, + "entityName": { + "type": "string", + "minLength": 1 + } + } + } }, { - "if": { "properties": { "type": { "const": "numberContainer" } } }, - "then": { "required": ["numberContainer"] } + "if": { + "required": ["type"], + "properties": { + "type": { "enum": ["numberContainer", "NumberContainer"] } + } + }, + "then": { + "required": ["numberContainer"], + "properties": { + "numberContainer": { "$ref": "dashboard-number-container-descriptor.schema.json" } + } + } } ], "additionalProperties": false, diff --git a/schemas/low-code/definitions/endpoint-descriptor.schema.json b/schemas/low-code/definitions/endpoint-descriptor.schema.json index 4990fb8b89..cdbfaa18fb 100644 --- a/schemas/low-code/definitions/endpoint-descriptor.schema.json +++ b/schemas/low-code/definitions/endpoint-descriptor.schema.json @@ -12,11 +12,14 @@ }, "name": { "type": "string", - "description": "Unique endpoint identifier used by designer/model health. Prefer PascalCase or kebab-case, for example 'SearchCustomers'." + "description": "Unique endpoint identifier used by designer/model health. Prefer PascalCase or kebab-case, for example 'SearchCustomers'.", + "minLength": 1 }, "route": { "type": "string", - "description": "URL route pattern. Must start with '/' and should use an application-specific prefix such as '/api/low-code/events/{id}'. Route parameters use ASP.NET style braces, for example '{id}'." + "description": "URL route pattern. Must start with '/' and should use an application-specific prefix such as '/api/low-code/events/{id}'. Route parameters use ASP.NET style braces, for example '{id}'.", + "minLength": 1, + "pattern": "^/" }, "method": { "type": "string", @@ -26,7 +29,8 @@ }, "javascript": { "type": "string", - "description": "JavaScript code to execute. Use context request/response helpers and services exposed by the host, such as db, currentUser/currentTenant, authorization, emailSender, config, http, event bus, background jobs, and logging helpers." + "description": "JavaScript code to execute. Use context request/response helpers and services exposed by the host, such as db, currentUser/currentTenant, authorization, emailSender, config, http, event bus, background jobs, and logging helpers.", + "minLength": 1 }, "requireAuthentication": { "type": "boolean", diff --git a/schemas/low-code/definitions/form-layout-descriptor.schema.json b/schemas/low-code/definitions/form-layout-descriptor.schema.json index 6d3eb42dc0..abadb86e21 100644 --- a/schemas/low-code/definitions/form-layout-descriptor.schema.json +++ b/schemas/low-code/definitions/form-layout-descriptor.schema.json @@ -75,7 +75,7 @@ "default": 4 }, "colStart": { - "type": "integer", + "type": ["integer", "null"], "description": "Starting grid column from 1 to 4. Omit or null to auto-place after the previous cell.", "minimum": 1, "maximum": 4 diff --git a/schemas/low-code/definitions/permission-descriptor.schema.json b/schemas/low-code/definitions/permission-descriptor.schema.json index f6391be449..1abeb49841 100644 --- a/schemas/low-code/definitions/permission-descriptor.schema.json +++ b/schemas/low-code/definitions/permission-descriptor.schema.json @@ -24,7 +24,7 @@ "type": "array", "description": "Child permissions forming a hierarchy. Use for feature -> operation grouping.", "items": { - "$ref": "permission-descriptor.schema.json" + "$ref": "#" } } }, diff --git a/schemas/low-code/definitions/script-background-worker-descriptor.schema.json b/schemas/low-code/definitions/script-background-worker-descriptor.schema.json index 8e670bd129..2c0ba07eb8 100644 --- a/schemas/low-code/definitions/script-background-worker-descriptor.schema.json +++ b/schemas/low-code/definitions/script-background-worker-descriptor.schema.json @@ -36,9 +36,21 @@ }, "required": ["name", "javascript"], "anyOf": [ - { "required": ["period"] }, + { + "required": ["period"], + "not": { + "required": ["cronExpression"], + "properties": { + "cronExpression": { + "type": "string", + "minLength": 1 + } + } + } + }, { "required": ["cronExpression"], + "not": { "required": ["period"] }, "properties": { "cronExpression": { "type": "string",