You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the 3 cases where the library treats references as circular. As far as I can tell only rule 1 pertains to local references and it makes sense. A/b -> B/c -> C/a is obviously circular but what I am confused about is references at the root level properties? A -> B -> A. Shouldn't these be treated as circular as well?
Here is a simple example to reproduce what I think is an error:
I have read the 3 cases where the library treats references as circular. As far as I can tell only rule 1 pertains to local references and it makes sense. A/b -> B/c -> C/a is obviously circular but what I am confused about is references at the root level properties? A -> B -> A. Shouldn't these be treated as circular as well?
Here is a simple example to reproduce what I think is an error:
{
"param1": {
"$ref": "#/param2"
},
"param2": {
"$ref": "#/param1"
}
}
Calling resolveRefs on the object above results in the following resolution result:
{
"refs": {
"#/param1": {
"def": { "$ref": "#/param2" },
"uri": "#/param2",
"uriDetails": { "path": "", "fragment": "/param2", "reference": "same-document" },
"type": "local",
"fqURI": "#/param2",
"value": { "$ref": "#/param1" }
},
"#/param2": {
"def": { "$ref": "#/param1" },
"uri": "#/param1",
"uriDetails": { "path": "", "fragment": "/param1", "reference": "same-document" },
"type": "local",
"fqURI": "#/param1",
"value": { "$ref": "#/param1" }
}
},
"resolved": {
"param1": {
"$ref": "#/param1"
},
"param2": {
"$ref": "#/param1"
}
}
}
Expected behavior: The circular flag for the two references should have been set to true.
The text was updated successfully, but these errors were encountered: