Relative base uri means references cannot be resolved
jazpearson opened this issue · comments
jazpearson commented
In this simple schema example, the $id is a relative URI.
However, when i try to use $defs within the schema to make things re-usable within the schema, there are issues trying to resolve the schema reference:
Could not resolve schema reference 'schemas/customer#/$defs/name'. Path 'properties.first_name', line 5, position 19.
{
"$id": "/schemas/customer",
"type": "object",
"properties": {
"first_name": { "$ref": "#/$defs/name" }
},
"required": [ "first_name" ],
"$defs": {
"name": { "type": "string" }
}
}
Are relative base URIs just a complete no-no or is there something wrong with the schema, or perhaps is the library missing something?
Any help would be most appreciated. We do have a license for this too.