schema-dsl 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/.eslintignore +10 -0
  2. package/.eslintrc.json +27 -0
  3. package/.github/CODE_OF_CONDUCT.md +45 -0
  4. package/.github/ISSUE_TEMPLATE/bug_report.md +57 -0
  5. package/.github/ISSUE_TEMPLATE/config.yml +11 -0
  6. package/.github/ISSUE_TEMPLATE/feature_request.md +45 -0
  7. package/.github/ISSUE_TEMPLATE/question.md +31 -0
  8. package/.github/PULL_REQUEST_TEMPLATE.md +70 -0
  9. package/.github/SECURITY.md +184 -0
  10. package/.github/workflows/ci.yml +35 -0
  11. package/CHANGELOG.md +633 -0
  12. package/CONTRIBUTING.md +368 -0
  13. package/LICENSE +21 -0
  14. package/README.md +1122 -0
  15. package/STATUS.md +273 -0
  16. package/docs/FEATURE-INDEX.md +521 -0
  17. package/docs/INDEX.md +224 -0
  18. package/docs/api-reference.md +1098 -0
  19. package/docs/best-practices.md +672 -0
  20. package/docs/cache-manager.md +336 -0
  21. package/docs/design-philosophy.md +602 -0
  22. package/docs/dsl-syntax.md +654 -0
  23. package/docs/dynamic-locale.md +552 -0
  24. package/docs/error-handling.md +703 -0
  25. package/docs/export-guide.md +459 -0
  26. package/docs/faq.md +576 -0
  27. package/docs/frontend-i18n-guide.md +290 -0
  28. package/docs/i18n-user-guide.md +488 -0
  29. package/docs/label-vs-description.md +262 -0
  30. package/docs/markdown-exporter.md +398 -0
  31. package/docs/mongodb-exporter.md +279 -0
  32. package/docs/multi-type-support.md +319 -0
  33. package/docs/mysql-exporter.md +257 -0
  34. package/docs/plugin-system.md +542 -0
  35. package/docs/postgresql-exporter.md +290 -0
  36. package/docs/quick-start.md +761 -0
  37. package/docs/schema-helper.md +340 -0
  38. package/docs/schema-utils.md +492 -0
  39. package/docs/string-extensions.md +480 -0
  40. package/docs/troubleshooting.md +471 -0
  41. package/docs/type-converter.md +319 -0
  42. package/docs/type-reference.md +219 -0
  43. package/docs/validate.md +486 -0
  44. package/docs/validation-guide.md +484 -0
  45. package/examples/array-dsl-example.js +227 -0
  46. package/examples/custom-extension.js +85 -0
  47. package/examples/dsl-match-example.js +74 -0
  48. package/examples/dsl-style.js +118 -0
  49. package/examples/dynamic-locale-configuration.js +348 -0
  50. package/examples/dynamic-locale-example.js +287 -0
  51. package/examples/export-demo.js +130 -0
  52. package/examples/i18n-full-demo.js +310 -0
  53. package/examples/i18n-memory-safety.examples.js +268 -0
  54. package/examples/markdown-export.js +71 -0
  55. package/examples/middleware-usage.js +93 -0
  56. package/examples/password-reset/README.md +153 -0
  57. package/examples/password-reset/schema.js +26 -0
  58. package/examples/password-reset/test.js +101 -0
  59. package/examples/plugin-system.examples.js +205 -0
  60. package/examples/simple-example.js +122 -0
  61. package/examples/string-extensions.js +297 -0
  62. package/examples/user-registration/README.md +156 -0
  63. package/examples/user-registration/routes.js +92 -0
  64. package/examples/user-registration/schema.js +150 -0
  65. package/examples/user-registration/server.js +74 -0
  66. package/index.d.ts +1999 -0
  67. package/index.js +270 -0
  68. package/index.mjs +30 -0
  69. package/lib/adapters/DslAdapter.js +653 -0
  70. package/lib/adapters/index.js +20 -0
  71. package/lib/config/constants.js +286 -0
  72. package/lib/config/patterns/creditCard.js +9 -0
  73. package/lib/config/patterns/idCard.js +9 -0
  74. package/lib/config/patterns/index.js +8 -0
  75. package/lib/config/patterns/licensePlate.js +4 -0
  76. package/lib/config/patterns/passport.js +4 -0
  77. package/lib/config/patterns/phone.js +9 -0
  78. package/lib/config/patterns/postalCode.js +5 -0
  79. package/lib/core/CacheManager.js +376 -0
  80. package/lib/core/DslBuilder.js +740 -0
  81. package/lib/core/ErrorCodes.js +233 -0
  82. package/lib/core/ErrorFormatter.js +342 -0
  83. package/lib/core/JSONSchemaCore.js +347 -0
  84. package/lib/core/Locale.js +119 -0
  85. package/lib/core/MessageTemplate.js +89 -0
  86. package/lib/core/PluginManager.js +448 -0
  87. package/lib/core/StringExtensions.js +209 -0
  88. package/lib/core/Validator.js +316 -0
  89. package/lib/exporters/MarkdownExporter.js +420 -0
  90. package/lib/exporters/MongoDBExporter.js +162 -0
  91. package/lib/exporters/MySQLExporter.js +212 -0
  92. package/lib/exporters/PostgreSQLExporter.js +289 -0
  93. package/lib/exporters/index.js +24 -0
  94. package/lib/locales/en-US.js +65 -0
  95. package/lib/locales/es-ES.js +66 -0
  96. package/lib/locales/fr-FR.js +66 -0
  97. package/lib/locales/index.js +8 -0
  98. package/lib/locales/ja-JP.js +66 -0
  99. package/lib/locales/zh-CN.js +93 -0
  100. package/lib/utils/LRUCache.js +174 -0
  101. package/lib/utils/SchemaHelper.js +240 -0
  102. package/lib/utils/SchemaUtils.js +313 -0
  103. package/lib/utils/TypeConverter.js +245 -0
  104. package/lib/utils/index.js +13 -0
  105. package/lib/validators/CustomKeywords.js +203 -0
  106. package/lib/validators/index.js +11 -0
  107. package/package.json +70 -0
  108. package/plugins/custom-format.js +101 -0
  109. package/plugins/custom-validator.js +200 -0
@@ -0,0 +1,521 @@
1
+ # schema-dsl 功能索引
2
+
3
+
4
+ > **更新时间**: 2025-12-25
5
+ > **用途**: 快速查找所有功能及其文档位置
6
+
7
+ ---
8
+
9
+ ## 📑 目录
10
+
11
+ - [核心API](#核心api)
12
+ - [验证功能](#验证功能)
13
+ - [导出器](#导出器)
14
+ - [工具函数](#工具函数)
15
+ - [错误处理](#错误处理)
16
+ - [配置管理](#配置管理)
17
+ - [示例代码](#示例代码)
18
+
19
+ ---
20
+
21
+ ## 核心API
22
+
23
+ ### dsl() 函数
24
+
25
+ **功能**: DSL主入口,支持字符串和对象定义
26
+
27
+ **使用示例**:
28
+ ```javascript
29
+ const { dsl } = require('schema-dsl');
30
+
31
+ // 字符串定义
32
+ const builder = dsl('email!');
33
+
34
+ // 对象定义
35
+ const schema = dsl({
36
+ username: 'string:3-32!',
37
+ email: 'email!'
38
+ });
39
+ ```
40
+
41
+ **文档位置**:
42
+ - 📖 [API参考 - dsl()函数](./api-reference.md#dsl-函数)
43
+ - 📖 [快速开始](./quick-start.md)
44
+ - 📖 [DSL语法指南](./dsl-syntax.md)
45
+
46
+ **代码位置**: `lib/adapters/DslAdapter.js`
47
+
48
+ ---
49
+
50
+ ### DslBuilder 类
51
+
52
+ **功能**: Schema构建器,支持链式调用
53
+
54
+ **可用方法**:
55
+ - ✅ `pattern(regex, message?)` - 正则验证
56
+ - ✅ `label(text)` - 字段标签
57
+ - ✅ `messages(obj)` - 自定义错误消息
58
+ - ✅ `description(text)` - 字段描述
59
+ - ✅ `custom(fn)` - 自定义验证器
60
+ - ✅ `when(field, opts)` - 条件验证
61
+ - ✅ `default(value)` - 默认值
62
+ - ✅ `toSchema()` - 转为JSON Schema
63
+ - ✅ `validate(data)` - 验证数据
64
+ - ✅ `validateNestingDepth(schema, maxDepth)` - 检测嵌套深度(静态方法)
65
+
66
+ **默认验证器方法**:
67
+ - ✅ `username(preset?)` - 用户名验证(preset: 'short'|'medium'|'long'|'5-20')
68
+ - ✅ `password(strength?)` - 密码强度验证(strength: 'weak'|'medium'|'strong'|'veryStrong')
69
+ - ✅ `phone(country?)` - 手机号验证(country: 'cn'|'us'|'uk'|'hk'|'tw'|'international')
70
+
71
+ **使用示例**:
72
+ ```javascript
73
+ // 基础链式调用
74
+ const schema = dsl('string:3-32!')
75
+ .pattern(/^[a-zA-Z0-9_]+$/)
76
+ .label('用户名')
77
+ .messages({ 'pattern': '只能包含字母、数字和下划线' });
78
+
79
+ // 使用默认验证器
80
+ const userSchema = dsl({
81
+ username: dsl('string!').username(), // 自动设置3-32长度+正则
82
+ password: dsl('string!').password('strong'), // 强密码验证
83
+ phone: dsl('string!').phone('cn') // 中国手机号验证
84
+ });
85
+ ```
86
+
87
+ **文档位置**:
88
+ - 📖 [API参考 - DslBuilder类](./api-reference.md#dslbuilder-类)
89
+ - 📖 [String扩展文档](./string-extensions.md)
90
+
91
+ **代码位置**: `lib/core/DslBuilder.js`
92
+
93
+ ---
94
+
95
+ ### String 扩展
96
+
97
+ **功能**: 字符串直接链式调用,无需 dsl() 包裹
98
+
99
+ **可用方法**: 与 DslBuilder 相同
100
+
101
+ **使用示例**:
102
+ ```javascript
103
+ const schema = dsl({
104
+ email: 'email!'.pattern(/custom/).label('邮箱'),
105
+ username: 'string:3-32!'.pattern(/^\w+$/).label('用户名')
106
+ });
107
+ ```
108
+
109
+ **文档位置**:
110
+ - 📖 [String扩展完整文档](./string-extensions.md)
111
+ - 📖 [README - v2.0.1新特性](../README.md#-v201-新特性)
112
+
113
+ **代码位置**: `lib/core/StringExtensions.js`
114
+
115
+ ---
116
+
117
+ ## 验证功能
118
+
119
+ ### Validator 类
120
+
121
+ **功能**: JSON Schema验证器(基于ajv)
122
+
123
+ **可用方法**:
124
+ - ✅ `validate(schema, data, options)` - 验证数据
125
+ - ✅ `compile(schema, cacheKey)` - 编译Schema
126
+ - ✅ `validateBatch(schema, dataArray, options)` - 批量验证
127
+ - ✅ `addKeyword(name, definition)` - 添加自定义关键字
128
+ - ✅ `addFormat(name, validator)` - 添加自定义格式
129
+ - ✅ `clearCache()` - 清空缓存
130
+ - ✅ `Validator.create(options)` - 创建实例(静态方法)
131
+ - ✅ `Validator.quickValidate(schema, data)` - 快速验证(静态方法)
132
+
133
+ **使用示例**:
134
+ ```javascript
135
+ const { Validator } = require('schema-dsl');
136
+
137
+ const validator = new Validator();
138
+ const result = validator.validate(schema, data);
139
+
140
+ console.log(result.valid); // true/false
141
+ console.log(result.errors); // 错误列表
142
+ ```
143
+
144
+ **文档位置**:
145
+ - 📖 [API参考 - Validator类](./api-reference.md#validator-类)
146
+ - 📖 [validate方法详解](./validate.md)
147
+ - 📖 [快速开始](./quick-start.md)
148
+
149
+ **代码位置**: `lib/core/Validator.js`
150
+
151
+ ---
152
+
153
+ ### validate() 便捷函数
154
+
155
+ **功能**: 单例验证,无需 new Validator()
156
+
157
+ **使用示例**:
158
+ ```javascript
159
+ const { dsl, validate } = require('schema-dsl');
160
+
161
+ const schema = dsl({ email: 'email!' });
162
+ const result = validate(schema, { email: 'test@example.com' });
163
+ ```
164
+
165
+ **文档位置**:
166
+ - 📖 [API参考 - validate()函数](./api-reference.md)
167
+ - 📖 [快速开始](./quick-start.md#1-hello-world30秒)
168
+
169
+ **代码位置**: `index.js` (单例实现)
170
+
171
+ ---
172
+
173
+ ## 导出器
174
+
175
+ ### MongoDBExporter
176
+
177
+ **功能**: 导出MongoDB $jsonSchema格式
178
+
179
+ **可用方法**:
180
+ - ✅ `export(schema)` - 导出Schema
181
+ - ✅ `generateCreateCommand(collectionName, schema)` - 生成createCollection命令
182
+ - ✅ `generateCommand(collectionName, schema)` - 生成可执行命令字符串
183
+ - ✅ `MongoDBExporter.export(schema)` - 快速导出(静态方法)
184
+
185
+ **使用示例**:
186
+ ```javascript
187
+ const { exporters } = require('schema-dsl');
188
+
189
+ const exporter = new exporters.MongoDBExporter();
190
+ const mongoSchema = exporter.export(jsonSchema);
191
+
192
+ // 生成命令
193
+ const command = exporter.generateCommand('users', jsonSchema);
194
+ console.log(command);
195
+ ```
196
+
197
+ **文档位置**:
198
+ - 📖 [README - 数据库导出](../README.md#️-数据库导出)
199
+ - 📖 [示例代码](../examples/export-demo.js)
200
+
201
+ **代码位置**: `lib/exporters/MongoDBExporter.js`
202
+
203
+ ---
204
+
205
+ ### MySQLExporter
206
+
207
+ **功能**: 导出MySQL CREATE TABLE DDL
208
+
209
+ **可用方法**:
210
+ - ✅ `export(tableName, schema, options)` - 导出DDL
211
+ - ✅ `MySQLExporter.export(tableName, schema)` - 快速导出(静态方法)
212
+
213
+ **使用示例**:
214
+ ```javascript
215
+ const { exporters } = require('schema-dsl');
216
+
217
+ const exporter = new exporters.MySQLExporter();
218
+ const ddl = exporter.export('users', jsonSchema);
219
+
220
+ console.log(ddl);
221
+ // CREATE TABLE `users` (
222
+ // `username` VARCHAR(32) NOT NULL,
223
+ // ...
224
+ // );
225
+ ```
226
+
227
+ **文档位置**:
228
+ - 📖 [README - 数据库导出](../README.md#mysql-ddl)
229
+ - 📖 [示例代码](../examples/export-demo.js)
230
+
231
+ **代码位置**: `lib/exporters/MySQLExporter.js`
232
+
233
+ ---
234
+
235
+ ### PostgreSQLExporter
236
+
237
+ **功能**: 导出PostgreSQL CREATE TABLE DDL
238
+
239
+ **可用方法**:
240
+ - ✅ `export(tableName, schema, options)` - 导出DDL
241
+ - ✅ `PostgreSQLExporter.export(tableName, schema)` - 快速导出(静态方法)
242
+
243
+ **使用示例**:
244
+ ```javascript
245
+ const { exporters } = require('schema-dsl');
246
+
247
+ const exporter = new exporters.PostgreSQLExporter();
248
+ const ddl = exporter.export('users', jsonSchema);
249
+
250
+ console.log(ddl);
251
+ // CREATE TABLE public.users (
252
+ // username VARCHAR(32) NOT NULL,
253
+ // ...
254
+ // );
255
+ ```
256
+
257
+ **文档位置**:
258
+ - 📖 [README - 数据库导出](../README.md#postgresql-ddl)
259
+ - 📖 [示例代码](../examples/export-demo.js)
260
+
261
+ **代码位置**: `lib/exporters/PostgreSQLExporter.js`
262
+
263
+ ---
264
+
265
+ ## 工具函数
266
+
267
+ ### SchemaUtils
268
+
269
+ **功能**: Schema复用、合并、操作工具
270
+
271
+ **可用方法**:
272
+ - ✅ `reusable(factory)` - 创建可复用片段
273
+ - ✅ `createLibrary(fragments)` - 创建片段库
274
+ - ✅ `merge(...schemas)` - 合并多个Schema
275
+ - ✅ `extend(baseSchema, extensions)` - 扩展Schema
276
+ - ✅ `pick(schema, fields)` - 筛选字段
277
+ - ✅ `omit(schema, fields)` - 排除字段
278
+ - ✅ `toMarkdown(schema)` - 导出为Markdown
279
+ - ✅ `toHTML(schema)` - 导出为HTML
280
+ - ✅ `clone(schema)` - 深度克隆
281
+
282
+ **使用示例**:
283
+ ```javascript
284
+ const { SchemaUtils, dsl } = require('schema-dsl');
285
+
286
+ // Schema复用
287
+ const emailField = SchemaUtils.reusable(() => dsl('email!'));
288
+
289
+ const schema1 = dsl({ email: emailField() });
290
+ const schema2 = dsl({ contactEmail: emailField() });
291
+
292
+ // Schema合并
293
+ const merged = SchemaUtils.merge(schema1, schema2);
294
+ ```
295
+
296
+ **文档位置**:
297
+ - 📖 [API参考 - SchemaUtils](./api-reference.md#工具函数)
298
+ - 📖 [示例代码](../examples/v2.0.1-features.js)
299
+
300
+ **代码位置**: `lib/utils/SchemaUtils.js`
301
+
302
+ ---
303
+
304
+ ### TypeConverter
305
+
306
+ **功能**: 类型转换工具(JSON Schema ↔ 数据库类型)
307
+
308
+ **可用方法**:
309
+ - ✅ `toMongoType(jsonSchemaType)` - 转为MongoDB BSON类型
310
+ - ✅ `toMySQLType(jsonSchemaProperty)` - 转为MySQL数据类型
311
+ - ✅ `toPostgreSQLType(jsonSchemaProperty)` - 转为PostgreSQL数据类型
312
+ - ✅ `formatToRegex(format)` - 格式验证转正则
313
+
314
+ **文档位置**:
315
+ - 📖 [API参考 - TypeConverter](./api-reference.md#typeconverter)
316
+
317
+ **代码位置**: `lib/utils/TypeConverter.js`
318
+
319
+ ---
320
+
321
+ ### SchemaHelper
322
+
323
+ **功能**: Schema分析和辅助工具
324
+
325
+ **可用方法**:
326
+ - ✅ `validate(schema)` - 验证Schema有效性
327
+ - ✅ `getFieldPaths(schema)` - 提取字段路径
328
+ - ✅ `flatten(schema)` - 扁平化Schema
329
+ - ✅ `clone(schema)` - 克隆Schema
330
+ - ✅ `getComplexity(schema)` - 评估复杂度
331
+
332
+ **文档位置**:
333
+ - 📖 [API参考 - SchemaHelper](./api-reference.md#schemahelper)
334
+
335
+ **代码位置**: `lib/utils/SchemaHelper.js`
336
+
337
+ ---
338
+
339
+ ## 错误处理
340
+
341
+ ### ErrorFormatter
342
+
343
+ **功能**: 格式化验证错误信息
344
+
345
+ **可用方法**:
346
+ - ✅ `format(errors, options)` - 格式化错误列表
347
+ - ✅ `formatSingle(error, options)` - 格式化单个错误
348
+ - ✅ `toJSON(errors)` - 转为JSON格式
349
+ - ✅ `toText(errors)` - 转为文本格式
350
+
351
+ **文档位置**:
352
+ - 📖 [API参考 - ErrorFormatter](./api-reference.md)
353
+ - 📖 [错误处理文档](./error-handling.md)
354
+
355
+ **代码位置**: `lib/core/ErrorFormatter.js`
356
+
357
+ ---
358
+
359
+ ### ErrorCodes
360
+
361
+ **功能**: 错误码定义
362
+
363
+ **代码位置**: `lib/core/ErrorCodes.js`
364
+
365
+ ---
366
+
367
+ ### MessageTemplate
368
+
369
+ **功能**: 错误消息模板
370
+
371
+ **可用方法**:
372
+ - ✅ `render(template, vars)` - 渲染模板
373
+ - ✅ `MessageTemplate.render(template, vars)` - 快速渲染(静态方法)
374
+ - ✅ `MessageTemplate.renderBatch(templates, vars)` - 批量渲染(静态方法)
375
+
376
+ **文档位置**:
377
+ - 📖 [API参考 - MessageTemplate](./api-reference.md)
378
+
379
+ **代码位置**: `lib/core/MessageTemplate.js`
380
+
381
+ ---
382
+
383
+ ### Locale
384
+
385
+ **功能**: 国际化支持
386
+
387
+ **可用方法**:
388
+ - ✅ `setLocale(locale)` - 设置语言
389
+ - ✅ `getLocale()` - 获取当前语言
390
+ - ✅ `addLocale(locale, messages)` - 添加语言包
391
+ - ✅ `setMessages(messages)` - 设置全局消息
392
+ - ✅ `getMessage(code, customMessages)` - 获取消息
393
+ - ✅ `getAvailableLocales()` - 获取可用语言
394
+ - ✅ `reset()` - 重置
395
+
396
+ **支持语言**:
397
+ - ✅ en-US(英语)
398
+ - ✅ zh-CN(中文)
399
+
400
+ **文档位置**:
401
+ - 📖 [API参考 - Locale](./api-reference.md)
402
+
403
+ **代码位置**: `lib/core/Locale.js`
404
+
405
+ ---
406
+
407
+ ## 配置管理
408
+
409
+ ### CacheManager
410
+
411
+ **功能**: Schema编译缓存管理
412
+
413
+ **可用方法**:
414
+ - ✅ `get(key)` - 获取缓存
415
+ - ✅ `set(key, value)` - 设置缓存
416
+ - ✅ `has(key)` - 检查缓存
417
+ - ✅ `delete(key)` - 删除缓存
418
+ - ✅ `clear()` - 清空缓存
419
+ - ✅ `size()` - 缓存大小
420
+
421
+ **文档位置**:
422
+ - 📖 [API参考 - CacheManager](./api-reference.md)
423
+
424
+ **代码位置**: `lib/core/CacheManager.js`
425
+
426
+ ---
427
+
428
+ ### CustomKeywords
429
+
430
+ **功能**: 自定义验证关键字
431
+
432
+ **可用关键字**:
433
+ - ✅ `regex` - 正则验证
434
+ - ✅ `validate` - 函数验证
435
+ - ✅ `range` - 数值范围
436
+
437
+ **使用示例**:
438
+ ```javascript
439
+ const { Validator, CustomKeywords } = require('schema-dsl');
440
+
441
+ const validator = new Validator();
442
+ CustomKeywords.registerAll(validator.getAjv());
443
+
444
+ const schema = {
445
+ type: 'string',
446
+ regex: '^[a-z]+$'
447
+ };
448
+ ```
449
+
450
+ **文档位置**:
451
+ - 📖 [README - 自定义验证](../README.md#-自定义验证)
452
+
453
+ **代码位置**: `lib/validators/CustomKeywords.js`
454
+
455
+ ---
456
+
457
+ ## 示例代码
458
+
459
+ ### 完整示例目录
460
+
461
+ **基础示例**:
462
+ - 📄 [dsl-style.js](../examples/dsl-style.js) - DSL基础用法
463
+ - 📄 [string-extensions.js](../examples/string-extensions.js) - String扩展示例
464
+ - 📄 [v2.0.1-features.js](../examples/v2.0.1-features.js) - v2.0.1新功能完整示例
465
+ - 📄 [v2.0.1-simple.js](../examples/v2.0.1-simple.js) - v2.0.1简单示例
466
+
467
+ **场景示例**:
468
+ - 📁 [user-registration/](../examples/user-registration/) - 用户注册表单验证
469
+ - 📁 [password-reset/](../examples/password-reset/) - 密码重置流程
470
+
471
+ **导出示例**:
472
+ - 📄 [export-demo.js](../examples/export-demo.js) - 数据库导出示例
473
+
474
+ ---
475
+
476
+ ## 功能覆盖检查
477
+
478
+ ### ✅ 已完整文档化
479
+
480
+ 1. ✅ DSL语法 - `docs/dsl-syntax.md` (2815行)
481
+ 2. ✅ String扩展 - `docs/string-extensions.md`
482
+ 3. ✅ Validator类 - `docs/validate.md`
483
+ 4. ✅ API参考 - `docs/api-reference.md`
484
+ 5. ✅ 快速开始 - `docs/quick-start.md`
485
+ 6. ✅ 数据库导出 - `README.md` + `examples/export-demo.js`
486
+ 7. ✅ 自定义验证 - `README.md`
487
+ 8. ✅ Schema工具 - `examples/v2.0.1-features.js`
488
+
489
+ ### ⚠️ 文档需要补充
490
+
491
+ 1. ⚠️ ErrorFormatter - 缺少独立文档
492
+ 2. ⚠️ CacheManager - 缺少独立文档
493
+ 3. ⚠️ TypeConverter - 缺少独立文档
494
+ 4. ⚠️ SchemaHelper - 缺少独立文档
495
+ 5. ⚠️ 错误处理 - 需要完整文档
496
+
497
+ ### 📝 计划补充
498
+
499
+ - [ ] 创建 `docs/error-handling.md` - 错误处理完整指南
500
+ - [ ] 创建 `docs/utilities.md` - 工具函数完整文档
501
+ - [ ] 创建 `docs/advanced.md` - 高级用法指南
502
+ - [ ] 创建 `docs/performance.md` - 性能优化指南
503
+
504
+ ---
505
+
506
+ ## 相关文档
507
+
508
+ - 📖 [README.md](../README.md) - 项目介绍
509
+ - 📖 [快速开始](./quick-start.md) - 5分钟入门
510
+ - 📖 [DSL语法指南](./dsl-syntax.md) - 完整语法(2815行)
511
+ - 📖 [String扩展](./string-extensions.md) - v2.0.1新特性
512
+ - 📖 [API参考](./api-reference.md) - 完整API
513
+ - 📖 [CHANGELOG](../CHANGELOG.md) - 更新日志
514
+ - 📖 [STATUS](../STATUS.md) - 项目状态
515
+
516
+ ---
517
+
518
+ **最后更新**: 2025-12-25
519
+ **维护者**: SchemaIO Team
520
+
521
+