1

我想要一个包含许多定义的模式文件。

然后,我想根据该架构中的不同定义验证消息。

有没有办法用 JSON Schema 做到这一点?

我正在尝试两个 NodeJS 验证器,看看哪个效果最好: https ://github.com/geraintluff/tv4 和https://github.com/tdegrunt/jsonschema

抱歉,如果这在逻辑上是不可能的 - 我是 JSON Schema 的新手。

交叉发布到https://github.com/geraintluff/tv4/issues/170https://github.com/tdegrunt/jsonschema/issues/94

4

1 回答 1

0

我在 API 部分找到了我需要的东西。

tv4.addSchema()tv4.getSchema(...#subschema_id')

于 2014-11-21T15:46:01.887 回答