Now I have a large json schema like
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A example schema",
"definitions": {
"stringArray": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true,
"default": []
}
},
"properties": {
"time": {"type": "string", "minLength": 5},
"id": {"type": "integer"},
"members": {
"type": "array",
"items": {
"properties": {
"id": {"type": "string"},
"email": {"type": "string"}
}
}
}
}
}
and a new schema using it
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A example schema",
"$ref": "example 1"
}
I want to modify the second schema to let some filed support null type.
I am thinking to split the first schema into two parts, one for those don't support null, another for those need to support null. For those need to support null, I need to keep two copy, one support null type, one not, because they are all needed in different case.
I wonder if there's a easier way to achieve?