lm-format-enforcer
lm-format-enforcer copied to clipboard
JsonParser Fails to Inherit Reference Object Type
trafficstars
Take the following JSON Schema
{
"$defs": {
"ParentObject": {
"properties": {
"child": {
"type": "string"
}
},
"type": "object"
}
},
"properties": {
"parent": {
"$ref": "#/$defs/ParentObject"
}
}
}
We would expect this to inherit the object type from ParentObject but instead on input
{"parent": {"child": "test"}}'
we get Exception: Unsupported type None. To fix we have to declare an an object type directly.