ajv-validator / ajv-validator/ajv-cli
Error using --spec=draft2020
- 主要言語
- TypeScript
- スター
- 316
- フォーク
- 77
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
`ajv migrate -s ./applicant-onboarding-schema_v02.json -o ./applicant-onboarding-schema_v02-draft2020.json --indent=4 --spec=draft2020`
```sh
C:\Users\fieljere\AppData\Roaming\npm\node_modules\ajv-cli\node_modules\ajv\dist\core.js:147
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 C:\Users\fieljere\AppData\Roaming\npm\node_modules\←[4majv-cli←[24m\node_modules\←[4majv←[24m\dist\core.js:147:23) at Ajv2020.validateSchema (C:\Users\fieljere\AppData\Roaming\npm\node_modules\←[4majv-cli←[24m\node_modules\←[4majv←[24m\dist\core.js:260:28)
at migrateSchema (C:\Users\fieljere\AppData\Roaming\npm\node_modules\←[4majv-cli←[24m\dist\commands\migrate.js:37:31)
at Array.map ()
at Object.execute (C:\Users\fieljere\AppData\Roaming\npm\node_modules\←[4majv-cli←[24m\dist\commands\migrate.js:29:24)
at Object. (C:\Users\fieljere\AppData\Roaming\npm\node_modules\←[4majv-cli←[24m\dist\index.js:19:24)
←[90m at Module._compile (node:internal/modules/cjs/loader:1103:14)←[39m
←[90m at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)←[39m
←[90m at Module.load (node:internal/modules/cjs/loader:981:32)←[39m
←[90m at Function.Module._load (node:internal/modules/cjs/loader:822:12)←[39m
```
I have draft-04 schemas I want to migrate to 2020 and I'm getting the error above.
If I change the command to use `--spec=draft2019`, everything works as expected
i noticed the stack trace indicates the error message referencing draft/2019-09 instead of 2020-12 in the Ajv2020.validate import
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。