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
With switching to the Spectral, we found that we do not support all cases with circular references (or, more precisely, one particular case). Spectral has its own ref-resolver that does not resolve circular references like json-schema-ref-parser, but only leaves the $ref field intact at the point when such a reference is encountered. I described that problem in one of issue:
Circular references you can only have with Schema Objects, so '/components/channels/test'.includes('/channels/test') is not a good example.
You can create circular reference only when you point to the schema which is already used in parent path(s), so schema like:
but in this case the circular reference after dereferencing has $ref field still with '#/properties/deepProperty' value, so it means that if we will check path we will have '#/properties/deepProperty' from file pov, not from main file pov, like '#/properties/fileProperty/properties/deepProperty' and due to this fact we need to also check (by second if) the subpath. I hope it's clear now. Above logic is dictated by Spectral "problems".
it's resolved in our parser side, but one case is very hard to resolve like:
and we don't have any additional data (metadata?) to resolve such a reference. We should switch to the json-schema-ref-resolver in Spectral or fix that problem in Spectral's ref-resolver (but that resolver is deprecated). We can also wait for stoplightio/spectral#1054
The text was updated successfully, but these errors were encountered:
With switching to the Spectral, we found that we do not support all cases with circular references (or, more precisely, one particular case). Spectral has its own
ref-resolver
that does not resolve circular references likejson-schema-ref-parser
, but only leaves the$ref
field intact at the point when such a reference is encountered. I described that problem in one of issue:it's resolved in our parser side, but one case is very hard to resolve like:
and we don't have any additional data (metadata?) to resolve such a reference. We should switch to the
json-schema-ref-resolver
in Spectral or fix that problem in Spectral'sref-resolver
(but that resolver is deprecated). We can also wait for stoplightio/spectral#1054The text was updated successfully, but these errors were encountered: