ajv-validator / ajv-validator/ajv-cli
Error migrating from draft2019 to draft2020
- Lenguaje dominante
- TypeScript
- Estrellas
- 316
- Forks
- 77
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Using version 5.0.0, there is an error migration from draft2019 to draft2020.
my-schema.json
```
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://schema.com/my-schema.json",
"type": "object",
"required": [
"number"
],
"properties": {
"number": {
"type": "number"
}
}
}
```
command
```
> ajv migrate -s "my-schema.json" --spec=draft2020 --indent=4
npm\node_modules\ajv-cli\node_modules\ajv\dist\core.js:133
throw new Error(`no schema with key or ref "${schemaKeyRef}"`);
^
Error: no schema with key or ref "https://json-schema.org/draft/2019-09/schema"
at Ajv2020.validate (node_modules\ajv-cli\node_modules\ajv\dist\core.js:133:23)
at Ajv2020.validateSchema (node_modules\ajv-cli\node_modules\ajv\dist\core.js:244:28)
at migrateSchema (node_modules\ajv-cli\dist\commands\migrate.js:37:31)
at Array.map ()
at Object.execute (node_modules\ajv-cli\dist\commands\migrate.js:29:24)
at Object. (node_modules\ajv-cli\dist\index.js:19:24)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
```
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.