feat: support P1 leaf JSON Schema constraints (#82) #84
Reference in New Issue
Block a user
Delete Branch "feat/82-schema-p1-leaf-constraints"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
扩展 JSON Schema 支持,新增 10 个叶子约束关键字。
Changes
schema.ts—ALLOWED_SCHEMA_KEYS白名单 +10,isValidSchema()类型检查 +10bootstrap.ts— meta-schema 新增对应 property 定义schema.test.ts— 5 个新测试(numeric/string/array 约束、错误类型拒绝、嵌套属性约束)新增关键字
minimum,maximum,exclusiveMinimum,exclusiveMaximumminLength,maxLength,patternminItems,maxItems,uniqueItems这些都是纯叶子约束,不含子 schema,无
collectRefs()影响。Test
493 pass, 0 fail, build + lint clean
Ref
Refs #82