Open
Description
const resolvedSchema = resolver.resolve(
{
"$id": "test",
"title": "Test",
"type": "object",
"properties": {
"TestString": { "$ref": "DefSchema#/$defs/Username" }
}
},
{
externalSchemas: [
{
"$id": "DefSchema",
"$defs": {
"Username": { "$ref": "#/$defs/string:10" },
"string:10": {
"type": "string",
"maxLength": 10
}
}
}
]
}
)
Produces the following incorrect reference:
{
"$id": "test",
"definitions": {
"def-0": {
"$defs": {
"Username": { "$ref": "#/$defs/string:10" }
}
}
}
}
As opposed to the expected:
{
"$id": "test",
"definitions": {
"def-0": {
"$defs": {
"Username": { "$ref": "#/definitions/def-0/$defs/string:10" }
}
}
}
}