跳至正文
Wener Notes

json-schema-ref-parser

约 1 分钟阅读
标签:JSON Schema
    • MIT, JS
  • $RefParser
    • schema
      • parsed/bundled/dereferenced JSON Schema object
      • 当前操作 schema
    • $refs
    • dereference
      • 处理所有 $ref
      • 会 包含循环引用
    • bundle
      • $ref 会处理为 pointer
      • 合并 schema
      • 不会 包含循环引用
    • parse
      • 不处理 $ref
    • resolve
      • 内部实现使用
  • 需要 browserfiy
    • url, buffer
    • http, https - 禁用内置 http resolver
    • fs - 禁用内置 file resolver
    • js-yaml - 禁用 yaml parser

关联信息

反向链接、本文链接的其他页面和外部资料。

反向链接

  • json-schema-faker
    笔记 · json-schema-ref-parser

    generate - 同步生成,不 处理 ref · resolve - 异步生成 · 依赖 json-schema-ref-parser, jsonpath-plus · schema 包含 circular 生成有问题 · 内部是使用 bundle,因此提供的 schema 也得是 bundle 或者直接提供 resolved kv 列表

参考资料

GitHub1 条
最近更新commit 3ea0f19编辑