I was a bit confused that VSCode was only providing auto-completion for the first element of a arrays with a json2object-generated schema. Turns out that instead of generating this:
"items": [
{
"$ref": "#/definitions/foo"
}
]
It should be generating this:
"items": {
"$ref": "#/definitions/foo"
}
Otherwise the $ref only applies to the first array element.
I was a bit confused that VSCode was only providing auto-completion for the first element of a arrays with a json2object-generated schema. Turns out that instead of generating this:
It should be generating this:
Otherwise the
$ref
only applies to the first array element.