plank
plank copied to clipboard
Support default values for non-enum types
We have a Plank schema where we have an integer property. We'd like to specify a default value for that property so that when any new models are initialized, they could have a default value set. In our instance, we'd like the integer property to be preset to -1 when the model is initialized.
Something like this would be ideal:
{
"id": "button.json",
"title": "button",
"description" : "Schema definition of Pinterest button",
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"id" : { "type": "string" },
"element_type" : {
"type": "integer",
"default": -1
},
},
"required": ["id"]
}
This would be great for Kotlin or Java as well!