I recently asked this question about how to get rid of a name on a list, but I realized what I really want to do is get rid of the names of the dictionaries in the array.
I want to validate a structure like this (notice the dictionaries are not named):
{
"some list": [
{
"foo": "bar"
},
{
"bin": "baz"
}
]
}
The issue seems to be the ambiguity of trying to describe an array as "object with unnamed properties".
If you leave out the unnecessary object in between, you end up with a straightforward schema:
{
"type": "object",
"properties": {
"some list": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "a string"
},
{
"type": "integer",
"minimum": 0,
"description": "Default time to expose a single image layer for."
}
]
}
}
}
}