I aim to create a condition for additional properties in JSONschema that handle any schema (all the types such as object|array|Boolean|string|number|null) and if the type is a string then it could be a normal string OR a regular expression as follows: (a|b(\\ \\<[a-z]|(-?\d+)\\,[09]\\> )
that denote the string ( "a|b(<anytype,number>)" )
. The following code shows errors of invalid schema:
{ "type" : "object",
"properties": { "firstname":{"type": "string},"lastname":{"type": "string} },
"required": ["firstname","lastname"],
"additionalproperties":{"type":["integer", "number", "null",
"boolean","object", "array"],"pattern":^(string|(a|b(\\ \\<[a-z]|(-?\d+)\\)$,
[09]\\>)))"}}}