ajv-validator / ajv-validator/ajv-cli

Passing a JSON Pointer with a schema

未关闭
#31 7 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
feature
主要语言
TypeScript
星标
316
派生
77
PR 合并指标
30 天内没有已合并 PR

描述

I'm looking at using ajv-cli to help test Hyper-Schema requests and responses. This means that the schema I want to validate against is not always the entire schema file.

What would you think of allowing something like:

ajv validate -s "foo.json#/links/0/targetSchema" -d "data.json"
or with .json omitted:
ajv validate -s "foo#/links/0/targetSchema" -d "data"

It would, of course, not be too hard to write some other script to pull out the appropriate schema, and that might be better given that selecting a link by numeric index is pretty fragile. So I'm not sure this is the best solution but thought I'd float it .

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。