Browse Source

Address low-code schema review feedback

pull/25601/head
SALİH ÖZKARA 2 months ago
parent
commit
69cb0c1c97
  1. 3
      schemas/low-code/definitions/dashboard-row-descriptor.schema.json
  2. 50
      schemas/low-code/definitions/dashboard-visualization-descriptor.schema.json
  3. 10
      schemas/low-code/definitions/endpoint-descriptor.schema.json
  4. 2
      schemas/low-code/definitions/form-layout-descriptor.schema.json
  5. 2
      schemas/low-code/definitions/permission-descriptor.schema.json
  6. 14
      schemas/low-code/definitions/script-background-worker-descriptor.schema.json

3
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" }
]
}
}

50
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,

10
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",

2
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

2
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": "#"
}
}
},

14
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",

Loading…
Cancel
Save