mirror of https://github.com/abpframework/abp.git
Browse Source
Introduce page-type and page-descriptor JSON Schemas to describe UI pages (type enum: dataGrid, kanban, calendar). The PageDescriptor defines name, title, icon, type, entityName, order and a groupByProperty that is conditionally required when type is kanban. Update model.schema.json to add a pages array referencing the new page-descriptor schema so pages can be declared in the model.pull/25039/head
3 changed files with 64 additions and 0 deletions
@ -0,0 +1,49 @@ |
|||||
|
{ |
||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema", |
||||
|
"$id": "page-descriptor.schema.json", |
||||
|
"title": "PageDescriptor", |
||||
|
"description": "Describes a UI page bound to an entity", |
||||
|
"type": "object", |
||||
|
"properties": { |
||||
|
"name": { |
||||
|
"type": "string", |
||||
|
"description": "Unique URL-safe identifier for the page", |
||||
|
"minLength": 1 |
||||
|
}, |
||||
|
"title": { |
||||
|
"type": "string", |
||||
|
"description": "Display title for the menu item and page header", |
||||
|
"minLength": 1 |
||||
|
}, |
||||
|
"icon": { |
||||
|
"type": "string", |
||||
|
"description": "FontAwesome icon class (e.g., 'fa-solid fa-users')" |
||||
|
}, |
||||
|
"type": { |
||||
|
"$ref": "page-type.schema.json" |
||||
|
}, |
||||
|
"entityName": { |
||||
|
"type": "string", |
||||
|
"description": "Full name of the root entity this page displays (e.g., 'Namespace.EntityName')", |
||||
|
"minLength": 1 |
||||
|
}, |
||||
|
"groupByProperty": { |
||||
|
"type": "string", |
||||
|
"description": "Property name to group entities by (required for kanban). Must reference an enum property.", |
||||
|
"minLength": 1 |
||||
|
}, |
||||
|
"order": { |
||||
|
"type": "integer", |
||||
|
"description": "Menu sort order (lower values appear first)", |
||||
|
"default": 0 |
||||
|
} |
||||
|
}, |
||||
|
"required": ["name", "title", "type", "entityName"], |
||||
|
"if": { |
||||
|
"properties": { "type": { "const": "kanban" } } |
||||
|
}, |
||||
|
"then": { |
||||
|
"required": ["groupByProperty"] |
||||
|
}, |
||||
|
"additionalProperties": false |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
{ |
||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema", |
||||
|
"$id": "page-type.schema.json", |
||||
|
"title": "PageType", |
||||
|
"description": "The type of page to render", |
||||
|
"type": "string", |
||||
|
"enum": ["dataGrid", "kanban", "calendar"] |
||||
|
} |
||||
Loading…
Reference in new issue