I want to constrain my object values. In particular, only string and array (of string) types are allowed:
"myobject": {
"string": "foo",
"array": [
"bar",
"baz",
],
"bool": true, // invalid
"object": {}, // invalid
}
Object keys should be "free". I can't find a way to do this in JSON schema.
The following seems not working, it still allow bool and object value types:
"myobject": {
"type": "object",
"properties": {
"type": ["string", "array"]
}
}