Skip to content

Commit cc9816e

Browse files
committed
fixed: input-schema
1 parent c46c64f commit cc9816e

2 files changed

Lines changed: 22 additions & 20 deletions

File tree

src/content/docs/developer-guide/worker/input-schema.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
---
1+
***
2+
23
title: Worker Input Configuration (Input Schema)
34
description: A manual for Worker input configuration (Input Schema)
45
sidebar:
5-
order: 3
6-
---
6+
order: 3
7+
--------
78

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.
910

10-
---
11+
***
1112

1213
## 🛠️ Input Schema User Guide
1314

@@ -60,7 +61,7 @@ A standard configuration file consists of the following three parts:
6061
| **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. |
6162
| **properties** | **Yes** | **Parameter configuration array**. This contains all input items, and each element represents one input field or selector on the page. |
6263

63-
---
64+
***
6465

6566
## 3. Property Details Inside `properties`
6667

@@ -69,17 +70,17 @@ Each input item can contain the following settings:
6970
- **title**: The label displayed on the page, for example, "Search Keywords".
7071
- **name**: The internal ID used by the program. It **must be unique** and cannot contain Chinese characters.
7172
- **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
7778
- **editor**: Determines which form control is used to render the input item in the web interface. See the table below.
7879
- **description**: Helper text shown below the input field to guide the user.
7980
- **default**: The initial displayed value or option.
8081
- **required**: If set to `true`, the script cannot be started unless the user fills in this field.
8182

82-
---
83+
***
8384

8485
## 4. Editor Type Guide
8586

@@ -111,7 +112,7 @@ You can choose different `editor` types based on your needs to improve the user
111112
| **requestListSource** | URL request source | Allows additional custom parameters |
112113
| **stringList** | String list | Batch input for multiple keywords |
113114

114-
---
115+
***
115116

116117
## 5. Common Component Examples
117118

@@ -193,7 +194,7 @@ You can choose different `editor` types based on your needs to improve the user
193194
"title": "🏢 Category",
194195
"name": "radio",
195196
"type": "integer",
196-
"editor": "radioGroup",
197+
"editor": "radio",
197198
"options": [
198199
{
199200
"label": "hotel",
@@ -217,7 +218,7 @@ You can choose different `editor` types based on your needs to improve the user
217218
"title": "Data Sections to Scrape",
218219
"name": "data_sections",
219220
"type": "array",
220-
"editor": "checkboxGroup",
221+
"editor": "checkbox",
221222
"options": [
222223
{
223224
"label": "Reviews",
@@ -276,7 +277,7 @@ You can choose different `editor` types based on your needs to improve the user
276277
"title": "⏩ Skip closed places",
277278
"name": "skipClosed",
278279
"type": "boolean",
279-
"editor": "checkbox"
280+
"editor": "switch"
280281
}
281282
```
282283

@@ -384,7 +385,7 @@ You can choose different `editor` types based on your needs to improve the user
384385

385386
![String list example](@/assets/docs/img_47.jpg)
386387

387-
---
388+
***
388389

389390
## 📚 Grouped Configuration
390391

@@ -470,3 +471,4 @@ Developers can logically group multiple configuration items by using specific fi
470471
1. **Write clear descriptions**: Make sure `description` is clear and accurate. This helps your script get discovered by more target users.
471472
2. **Set sensible defaults**: A reasonable `default` value lets users run the script immediately and greatly lowers the barrier to entry.
472473
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`.
474+

src/content/docs/zh-cn/developer-guide/worker/input-schema.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ input_schema.json 是脚本的“面孔”。通过修改此文件,您可以
193193
"title": "🏢 Category",
194194
"name": "radio",
195195
"type": "integer",
196-
"editor": "radioGroup",
196+
"editor": "radio",
197197
"options": [
198198
{
199199
"label": "hotel",
@@ -217,7 +217,7 @@ input_schema.json 是脚本的“面孔”。通过修改此文件,您可以
217217
"title": "Data Sections to Scrape",
218218
"name": "data_sections",
219219
"type": "array",
220-
"editor": "checkboxGroup",
220+
"editor": "checkbox",
221221
"options": [
222222
{
223223
"label": "Reviews",
@@ -276,7 +276,7 @@ input_schema.json 是脚本的“面孔”。通过修改此文件,您可以
276276
"title": "⏩ Skip closed places",
277277
"name": "skipClosed",
278278
"type": "boolean",
279-
"editor": "checkbox"
279+
"editor": "switch"
280280
}
281281
```
282282

0 commit comments

Comments
 (0)