Skip to content

Commit 8c2305e

Browse files
committed
更新 DriverInterface 和 DriverOptions 的文档,修正描述并添加 DriverOptions 的 JSON Schema 定义
1 parent c1aea83 commit 8c2305e

File tree

5 files changed

+227
-131
lines changed

5 files changed

+227
-131
lines changed

content/docs/references/system/DriverInterface.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ description: DriverInterface Schema Reference
77

88
| Property | Type | Required | Description |
99
| :--- | :--- | :--- | :--- |
10-
| **name** | `string` || Driver name |
10+
| **name** | `string` || Driver unique name |
1111
| **version** | `string` || Driver version |
12-
| **supports** | `object` || Driver capabilities |
12+
| **supports** | `object` || |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: DriverOptions
3+
description: DriverOptions Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **transaction** | `any` | optional | Transaction handle |
11+
| **timeout** | `number` | optional | Timeout in ms |
12+
| **skipCache** | `boolean` | optional | Bypass cache |

packages/spec/json-schema/DriverInterface.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"properties": {
77
"name": {
88
"type": "string",
9-
"description": "Driver name"
9+
"description": "Driver unique name"
1010
},
1111
"version": {
1212
"type": "string",
@@ -43,8 +43,7 @@
4343
"jsonFields",
4444
"arrayFields"
4545
],
46-
"additionalProperties": false,
47-
"description": "Driver capabilities"
46+
"additionalProperties": false
4847
}
4948
},
5049
"required": [
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$ref": "#/definitions/DriverOptions",
3+
"definitions": {
4+
"DriverOptions": {
5+
"type": "object",
6+
"properties": {
7+
"transaction": {
8+
"description": "Transaction handle"
9+
},
10+
"timeout": {
11+
"type": "number",
12+
"description": "Timeout in ms"
13+
},
14+
"skipCache": {
15+
"type": "boolean",
16+
"description": "Bypass cache"
17+
}
18+
},
19+
"additionalProperties": false
20+
}
21+
},
22+
"$schema": "http://json-schema.org/draft-07/schema#"
23+
}

0 commit comments

Comments
 (0)