I'm currently working on crafting a JSON schema that supports a nullable attribute. I am aiming to have the ability for specific JSON structures like this one be considered valid:
{
"some_name" : null
}
This is how my schema looks like:
{
"type": "object",
"properties": {
"some_name": {
"type": [
"string",
null
],
"maxLength": 100
}
}
}
Unfortunately, it's marked as invalid due to the fact that it doesn't recognize that "null" can also have a maxLength property assigned. Is there a more effective way to achieve this? It would be ideal to have a "nullable" characteristic or something similar for cases like this!