Browse Source

Address low-code schema review feedback

pull/25601/head
SALİH ÖZKARA 4 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": [ "items": [
{ {
"name": "overview",
"type": "numberContainer", "type": "numberContainer",
"title": "Overview", "title": "Overview",
"numberContainer": { "numberContainer": {
"items": [ "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"], "required": ["name", "type", "title"],
"allOf": [ "allOf": [
{ {
"if": { "properties": { "type": { "const": "chart" } } }, "if": {
"then": { "required": ["chart", "entityName"] } "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" } } }, "if": {
"then": { "required": ["list", "entityName"] } "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" } } }, "if": {
"then": { "required": ["numberContainer"] } "required": ["type"],
"properties": {
"type": { "enum": ["numberContainer", "NumberContainer"] }
}
},
"then": {
"required": ["numberContainer"],
"properties": {
"numberContainer": { "$ref": "dashboard-number-container-descriptor.schema.json" }
}
}
} }
], ],
"additionalProperties": false, "additionalProperties": false,

10
schemas/low-code/definitions/endpoint-descriptor.schema.json

@ -12,11 +12,14 @@
}, },
"name": { "name": {
"type": "string", "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": { "route": {
"type": "string", "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": { "method": {
"type": "string", "type": "string",
@ -26,7 +29,8 @@
}, },
"javascript": { "javascript": {
"type": "string", "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": { "requireAuthentication": {
"type": "boolean", "type": "boolean",

2
schemas/low-code/definitions/form-layout-descriptor.schema.json

@ -75,7 +75,7 @@
"default": 4 "default": 4
}, },
"colStart": { "colStart": {
"type": "integer", "type": ["integer", "null"],
"description": "Starting grid column from 1 to 4. Omit or null to auto-place after the previous cell.", "description": "Starting grid column from 1 to 4. Omit or null to auto-place after the previous cell.",
"minimum": 1, "minimum": 1,
"maximum": 4 "maximum": 4

2
schemas/low-code/definitions/permission-descriptor.schema.json

@ -24,7 +24,7 @@
"type": "array", "type": "array",
"description": "Child permissions forming a hierarchy. Use for feature -> operation grouping.", "description": "Child permissions forming a hierarchy. Use for feature -> operation grouping.",
"items": { "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"], "required": ["name", "javascript"],
"anyOf": [ "anyOf": [
{ "required": ["period"] }, {
"required": ["period"],
"not": {
"required": ["cronExpression"],
"properties": {
"cronExpression": {
"type": "string",
"minLength": 1
}
}
}
},
{ {
"required": ["cronExpression"], "required": ["cronExpression"],
"not": { "required": ["period"] },
"properties": { "properties": {
"cronExpression": { "cronExpression": {
"type": "string", "type": "string",

Loading…
Cancel
Save