WARNING: undefined label
I'm getting a lot of WARNING: undefined label when loading this schema.json. For example, last warning is WARNING: undefined label: '#/$defs/choiceparams', and indeed, I only have #/$defs/ChoiceParams which has different case. Did I do something wrong?
The schema you provided seems ok to me. But it is probably not the whole story. Do you include it into another schema? Did you try to maintain uniform capitalization? Does the error disappear when you refer to it by ChoiceParams?
Does the schema load in an application and is the error only seen in Spinx?
This scheme was generated by pydantic and I used it in other application without problems. This is the train_configuration.rst that gave me the warnings:
Train Configuration
-------------------
.. jsonschema:: schema.json
Sphinx v7.3.7
Does the error disappear when you use lower case only, so in both definition as in references? Actually I'm stomped, as to why this is happening.
Given that the schema functions I guess it is somewhere in the sphinx extension. If you can reduce the schema to a small sample I'm willing to try to debug this, as it stands the schema is way to big and complex to even consider that.
Here's minimal example:
.. jsonschema::
{
"$defs": {
"Item": {
"properties": {
"name": {
"default": "What",
"title": "Name",
"type": "string"
}
},
"title": "Item",
"type": "object"
}
},
"properties": {
"id": {
"default": 0,
"title": "Id",
"type": "integer"
},
"items": {
"default": [],
"items": {
"$ref": "#/$defs/Item"
},
"title": "Items",
"type": "array"
}
},
"title": "MyCollection",
"type": "object"
}
I tried debugging, but I it's not easy to find out where 'undefined label' should be defined.