Closed jonaslagoni closed 2 years ago
So, I am not quite sure of the best cause of action to solve this issue, so might need some pointers from someone who knows the code more in-depth 😄
Trying to dereference the input in the tests the following happens:
name
. - https://github.com/APIDevTools/json-schema-ref-parser/blob/f6886ab9ee576754791f2a194b140a637dd98a87/lib/dereference.js#L133
pointer = {
...,
path: "/Users/lagoni/Documents/AsyncAPI/json-schema-ref-parser/test/specs/root-internal/root-internal.yaml#/definitions/name",
originalPath: "/Users/lagoni/Documents/AsyncAPI/json-schema-ref-parser/test/specs/root-internal/root-internal.yaml#/definitions/name",
value: {
definitions: {
name: {
title: "name",
type: "object",
required: [
"first",
"last",
],
properties: {
first: {
type: "string",
},
last: {
$ref: "#/definitions/name/properties/first",
},
},
},
},
$ref: "#/definitions/name",
},
circular: true,
indirections: 0,
}
$ref
within the definition is not iterated, which to me indicate that there are multiple places that need to change, but I might be wrong 😅 - https://github.com/APIDevTools/json-schema-ref-parser/blob/f6886ab9ee576754791f2a194b140a637dd98a87/lib/dereference.js#L151 But from this point on, I do not know where or what to try and poke at...
Any suggestions?
cc @philsturgeon (as you are the most recently pushed changed, feel free to re-tag someone else 😄)
With no interest, closing.
This PR addresses the issue where root level references to internal schema definitions are not resolved accurately.
Fixes https://github.com/APIDevTools/json-schema-ref-parser/issues/201