i 've this JSON schema
{
"title": "JSON Schema for revues subscribtion",
"type": "object",
"properties": {
"lab": {
"type": "string"
}
},
"patternProperties": {
"[A-Za-z][A-Za-z_]*[A-Za-z]": {
"type": "boolean"
}
},
"required": [
"lab"
]
}
i want to match a json data like
{
"SP": false,
"lab": "labri"
}
but it failed because "lab"
value is expected as boolean
. that's mean "lab"
is matched by the patternProperties.
Do someone have a solution for this ?
PS : Sorry i'm not good at english
One way is to use regexp that would match what you need but won't match 'lab'. At best it is not trivial.
Another is this schema:
It will require all properties but lab to be boolean. I don't think you can do any better.