-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Hi,
I open this issue because deepProperties
doesn't work with keys that have numbers in them.
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.
if (/[0-9]+/.test(segment)) { |
This raises multiples questions to me:
- 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)
- 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)
Metadata
Metadata
Assignees
Labels
No labels