You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/developer-guide/worker/input-schema.md
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,14 @@
1
-
---
1
+
***
2
+
2
3
title: Worker Input Configuration (Input Schema)
3
4
description: A manual for Worker input configuration (Input Schema)
4
5
sidebar:
5
-
order: 3
6
-
---
6
+
order: 3
7
+
--------
7
8
8
-
This document explains how developers should configure the **input_schema.json** file. This file determines the **input form layout** presented to users in the web interface of an automation Worker.
9
+
This document explains how developers should configure the **input\_schema.json** file. This file determines the **input form layout** presented to users in the web interface of an automation Worker.
9
10
10
-
---
11
+
***
11
12
12
13
## 🛠️ Input Schema User Guide
13
14
@@ -60,7 +61,7 @@ A standard configuration file consists of the following three parts:
60
61
|**b**|**Yes**|**Task splitting key**. This must match the `name` of one element inside `properties`. The script uses this field for concurrent processing, for example, splitting tasks by the number of URLs. |
61
62
|**properties**|**Yes**|**Parameter configuration array**. This contains all input items, and each element represents one input field or selector on the page. |
62
63
63
-
---
64
+
***
64
65
65
66
## 3. Property Details Inside `properties`
66
67
@@ -69,17 +70,17 @@ Each input item can contain the following settings:
69
70
-**title**: The label displayed on the page, for example, "Search Keywords".
70
71
-**name**: The internal ID used by the program. It **must be unique** and cannot contain Chinese characters.
71
72
-**type**:
72
-
-`string`: text
73
-
-`integer`: number
74
-
-`boolean`: switch (`true` / `false`)
75
-
-`array`: list / multi-select
76
-
-`object`: object
73
+
-`string`: text
74
+
-`integer`: number
75
+
-`boolean`: switch (`true` / `false`)
76
+
-`array`: list / multi-select
77
+
-`object`: object
77
78
-**editor**: Determines which form control is used to render the input item in the web interface. See the table below.
78
79
-**description**: Helper text shown below the input field to guide the user.
79
80
-**default**: The initial displayed value or option.
80
81
-**required**: If set to `true`, the script cannot be started unless the user fills in this field.
81
82
82
-
---
83
+
***
83
84
84
85
## 4. Editor Type Guide
85
86
@@ -111,7 +112,7 @@ You can choose different `editor` types based on your needs to improve the user
|**stringList**| String list | Batch input for multiple keywords |
113
114
114
-
---
115
+
***
115
116
116
117
## 5. Common Component Examples
117
118
@@ -193,7 +194,7 @@ You can choose different `editor` types based on your needs to improve the user
193
194
"title": "🏢 Category",
194
195
"name": "radio",
195
196
"type": "integer",
196
-
"editor": "radioGroup",
197
+
"editor": "radio",
197
198
"options": [
198
199
{
199
200
"label": "hotel",
@@ -217,7 +218,7 @@ You can choose different `editor` types based on your needs to improve the user
217
218
"title": "Data Sections to Scrape",
218
219
"name": "data_sections",
219
220
"type": "array",
220
-
"editor": "checkboxGroup",
221
+
"editor": "checkbox",
221
222
"options": [
222
223
{
223
224
"label": "Reviews",
@@ -276,7 +277,7 @@ You can choose different `editor` types based on your needs to improve the user
276
277
"title": "⏩ Skip closed places",
277
278
"name": "skipClosed",
278
279
"type": "boolean",
279
-
"editor": "checkbox"
280
+
"editor": "switch"
280
281
}
281
282
```
282
283
@@ -384,7 +385,7 @@ You can choose different `editor` types based on your needs to improve the user
384
385
385
386

386
387
387
-
---
388
+
***
388
389
389
390
## 📚 Grouped Configuration
390
391
@@ -470,3 +471,4 @@ Developers can logically group multiple configuration items by using specific fi
470
471
1.**Write clear descriptions**: Make sure `description` is clear and accurate. This helps your script get discovered by more target users.
471
472
2.**Set sensible defaults**: A reasonable `default` value lets users run the script immediately and greatly lowers the barrier to entry.
472
473
3.**Validate required fields**: For parameters without which the script cannot run, such as login cookies or the main URL, be sure to set `"required": true`.
0 commit comments