ajv-validator / ajv-validator/ajv-keywords

ajv-keywords does not work with JTD

オープン
#357 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る
limitation
主要言語
TypeScript
スター
257
フォーク
51
PR マージ指標
30日以内にマージされた PR はありません

説明

**Description**
I want to use the "transform"-keyword to perform a trim on certain string fields. But as soon as I want to add the ajv-keywords library and call addKeyword, I get the following error:

>schema is invalid: data/type must NOT have additional properties, data must have property 'ref', data/type must be equal to one of the allowed values, data must have property 'enum', data must have property 'elements', data must have property 'properties', data must have property 'optionalProperties', data must have property 'discriminator', data must have property 'values', data must match a schema in union

Is there any documentation for this?

**What version of Ajv are you using? Does the issue happen if you use the latest version?**

8.11.2

**Your code**

```ts
import Ajv from 'ajv/dist/jtd';
import ajvKeywords from "ajv-keywords"

const ajv = new Ajv();
ajvKeywords(ajv, ["transform"]). // --> ERROR
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。