Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions content/docs/references/ui/api/HttpMethod.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: HttpMethod
description: HttpMethod Schema Reference
---

## Allowed Values

* `GET`
* `POST`
* `PUT`
* `PATCH`
* `DELETE`
20 changes: 20 additions & 0 deletions content/docs/references/ui/view/FormField.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: FormField
description: FormField Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **field** | `string` | ✅ | Field name (snake_case) |
| **label** | `string` | optional | Display label override |
| **placeholder** | `string` | optional | Placeholder text |
| **helpText** | `string` | optional | Help/hint text |
| **readonly** | `boolean` | optional | Read-only override |
| **required** | `boolean` | optional | Required override |
| **hidden** | `boolean` | optional | Hidden override |
| **colSpan** | `integer` | optional | Column span in grid layout (1-4) |
| **widget** | `string` | optional | Custom widget/component name |
| **dependsOn** | `string` | optional | Parent field name for cascading |
| **visibleOn** | `string` | optional | Visibility condition expression |
2 changes: 1 addition & 1 deletion content/docs/references/ui/view/FormSection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ description: FormSection Schema Reference
| **collapsible** | `boolean` | optional | |
| **collapsed** | `boolean` | optional | |
| **columns** | `Enum<'1' \| '2' \| '3' \| '4'>` | optional | |
| **fields** | `string[]` | ✅ | |
| **fields** | `string \| object[]` | ✅ | |
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation error: The type for the 'fields' property is listed as "string | object[]" but should be "(string | object)[]" to correctly represent an array that can contain either strings or objects. The schema definition in view.zod.ts line 132-135 uses z.array(z.union([z.string(), FormFieldSchema])), which means an array of mixed string/object items, not a union of a string or an array of objects.

Suggested change
| **fields** | `string \| object[]` || |
| **fields** | `(string \| object)[]` || |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 84a6427. Changed from string | object[] to (string | object)[] to correctly represent an array of mixed string/object items.

1 change: 1 addition & 0 deletions content/docs/references/ui/view/FormView.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ description: FormView Schema Reference
| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **type** | `Enum<'simple' \| 'tabbed' \| 'wizard'>` | optional | |
| **data** | `object \| object \| object` | optional | Data source configuration (defaults to "object" provider) |
| **sections** | `object[]` | optional | |
| **groups** | `object[]` | optional | |
14 changes: 14 additions & 0 deletions content/docs/references/ui/view/HttpRequest.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: HttpRequest
description: HttpRequest Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **url** | `string` | ✅ | API endpoint URL |
| **method** | `Enum<'GET' \| 'POST' \| 'PUT' \| 'PATCH' \| 'DELETE'>` | optional | HTTP method |
| **headers** | `Record<string, string>` | optional | Custom HTTP headers |
| **params** | `Record<string, any>` | optional | Query parameters |
| **body** | `any` | optional | Request body for POST/PUT/PATCH |
18 changes: 18 additions & 0 deletions content/docs/references/ui/view/ListColumn.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: ListColumn
description: ListColumn Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **field** | `string` | ✅ | Field name (snake_case) |
| **label** | `string` | optional | Display label override |
| **width** | `number` | optional | Column width in pixels |
| **align** | `Enum<'left' \| 'center' \| 'right'>` | optional | Text alignment |
| **hidden** | `boolean` | optional | Hide column by default |
| **sortable** | `boolean` | optional | Allow sorting by this column |
| **resizable** | `boolean` | optional | Allow resizing this column |
| **wrap** | `boolean` | optional | Allow text wrapping |
| **type** | `string` | optional | Renderer type override (e.g., "currency", "date") |
8 changes: 7 additions & 1 deletion content/docs/references/ui/view/ListView.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ description: ListView Schema Reference
| **name** | `string` | optional | |
| **label** | `string` | optional | |
| **type** | `Enum<'grid' \| 'kanban' \| 'calendar' \| 'gantt' \| 'map'>` | optional | |
| **columns** | `string[]` | ✅ | Fields to display as columns |
| **data** | `object \| object \| object` | optional | Data source configuration (defaults to "object" provider) |
| **columns** | `string[] \| object[]` | ✅ | Fields to display as columns |
| **filter** | `any[]` | optional | Filter criteria (JSON Rules) |
| **sort** | `string \| object[]` | optional | |
| **searchableFields** | `string[]` | optional | Fields enabled for search |
| **resizable** | `boolean` | optional | Enable column resizing |
| **striped** | `boolean` | optional | Striped row styling |
| **bordered** | `boolean` | optional | Show borders |
| **selection** | `object` | optional | Row selection configuration |
| **pagination** | `object` | optional | Pagination configuration |
| **kanban** | `object` | optional | |
| **calendar** | `object` | optional | |
| **gantt** | `object` | optional | |
11 changes: 11 additions & 0 deletions content/docs/references/ui/view/PaginationConfig.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: PaginationConfig
description: PaginationConfig Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **pageSize** | `integer` | optional | Number of records per page |
| **pageSizeOptions** | `integer[]` | optional | Available page size options |
10 changes: 10 additions & 0 deletions content/docs/references/ui/view/SelectionConfig.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: SelectionConfig
description: SelectionConfig Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **type** | `Enum<'none' \| 'single' \| 'multiple'>` | optional | Selection mode |
5 changes: 5 additions & 0 deletions content/docs/references/ui/view/ViewData.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: ViewData
description: ViewData Schema Reference
---

61 changes: 61 additions & 0 deletions packages/spec/json-schema/ui/FormField.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"$ref": "#/definitions/FormField",
"definitions": {
"FormField": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Field name (snake_case)"
},
"label": {
"type": "string",
"description": "Display label override"
},
"placeholder": {
"type": "string",
"description": "Placeholder text"
},
"helpText": {
"type": "string",
"description": "Help/hint text"
},
"readonly": {
"type": "boolean",
"description": "Read-only override"
},
"required": {
"type": "boolean",
"description": "Required override"
},
"hidden": {
"type": "boolean",
"description": "Hidden override"
},
"colSpan": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "Column span in grid layout (1-4)"
},
"widget": {
"type": "string",
"description": "Custom widget/component name"
},
"dependsOn": {
"type": "string",
"description": "Parent field name for cascading"
},
"visibleOn": {
"type": "string",
"description": "Visibility condition expression"
}
},
"required": [
"field"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
61 changes: 60 additions & 1 deletion packages/spec/json-schema/ui/FormSection.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,66 @@
"fields": {
"type": "array",
"items": {
"type": "string"
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "Field name (snake_case)"
},
"label": {
"type": "string",
"description": "Display label override"
},
"placeholder": {
"type": "string",
"description": "Placeholder text"
},
"helpText": {
"type": "string",
"description": "Help/hint text"
},
"readonly": {
"type": "boolean",
"description": "Read-only override"
},
"required": {
"type": "boolean",
"description": "Required override"
},
"hidden": {
"type": "boolean",
"description": "Hidden override"
},
"colSpan": {
"type": "integer",
"minimum": 1,
"maximum": 4,
"description": "Column span in grid layout (1-4)"
},
"widget": {
"type": "string",
"description": "Custom widget/component name"
},
"dependsOn": {
"type": "string",
"description": "Parent field name for cascading"
},
"visibleOn": {
"type": "string",
"description": "Visibility condition expression"
}
},
"required": [
"field"
],
"additionalProperties": false
}
]
}
}
},
Expand Down
Loading
Loading