ajv-validator / ajv-validator/ajv-keywords
Should the regex for deepProperties be improved?
- Vorherrschende Sprache
- TypeScript
- Sterne
- 257
- Forks
- 51
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi,
I open this issue because `deepProperties` doesn't work with keys that have numbers in them.
```js
const schema = {
type: 'object',
deepProperties: {
'/audio.2.0/requireForced': {
const: true,
},
},
};
```
this produces the following error:
```
Error: schema is invalid: data/allOf/0/items must be object,boolean, data/allOf/0/items must be object,boolean, data/allOf/0/items must be object,boolean, data/allOf/0/items must be object,boolean, data/allOf/0/items must be object,boolean, data/allOf/0/items must be object,boolean, data/allOf/0/items must be object,boolean, data/allOf/0/items must be object,boolean
```
After my research, I've seen that this is due to this line in the `deepProperties` getSchema function.
https://github.com/ajv-validator/ajv-keywords/blob/a11389b4d1934d360fb2a24dd920ec597295c8fc/src/definitions/deepProperties.ts#L33
This raises multiples questions to me:
1. is it compliant with the JSON Schema standard to have numbers part of string fields? (I wasn't able to properly find a answer for that)
2. Is this project maintained? (I've seen that the last commit was 2 years ago.)
2.1 if yes -> Is a PR welcome to update that?
2.2 if no -> If it's not maintained anymore I can probably fork it and modify it for ourselves. And not bother you more (sorry for the Issue)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.