feat: P3 JSON Schema support — not, contains, propertyNames, metadata (#82) #88
Reference in New Issue
Block a user
Delete Branch "feat/82-schema-p3"
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
#82 Phase 3(最终阶段):新增 8 个 JSON Schema 关键字。
Changes
notcontainspropertyNamesexamplesreadOnlywriteOnlydeprecated$comment改动文件
schema.ts— 白名单 +8,isValidSchema()+8,collectRefs()+2 (not/contains)bootstrap.ts— meta-schema +8 propertiesschema.test.ts— 7 个新测试schema-validation.test.ts— meta-schema 结构断言更新collectRefs 修复
contains必须在 array 分支内处理(array 分支有 early return),不能放在外面。完成度
已支持 40 个关键字,覆盖 JSON Schema Draft 2020-12 常用子集。
仅
$ref/$defs/$id/$schema未支持(P4,复杂度高,暂缓)。Test
516 pass, 0 fail, build + lint clean
Ref
Closes #82