ajv-validator / ajv-validator/ajv-cli

Passing a JSON Pointer with a schema

Abierto
#31 7 comentarios 3 reacciones 0 asignados Ver en GitHub
feature
Lenguaje dominante
TypeScript
Estrellas
316
Forks
77
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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 .

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.