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
json-schema-ref-parser's .bundle() method seems to have trouble with additional properties on $ref objects in certain cases where recursive schemas are used.
For example with a linked list schema, which references itself on the next property.
Note how the definition for the node schema isn't included in the bundle, and the $ref object references itself.
Caveats
Interestingly enough, the issue does not occur when the node schema's next$ref object also contains an additional property. It also does not occur when only the node schema's next$ref object contains an additional property.
@mnaumanali94 can we investigate to make sure this isn't still happening? As OpenAPI v3.1 supports $ref siblings we'll see more people using them soon.
Repro here: https://github.com/mickdekkers/json-schema-ref-parser-extra-ref-props-issue
Issue description
json-schema-ref-parser
's.bundle()
method seems to have trouble with additional properties on$ref
objects in certain cases where recursive schemas are used.For example with a linked list schema, which references itself on the
next
property.This is a schema for a linked list node:
If that schema is then referenced through a
$ref
object happens to contain an additional property, in this casetitle
:The resulting bundle that
json-schema-ref-parser
produces looks like this:Note how the definition for the node schema isn't included in the bundle, and the
$ref
object references itself.Caveats
Interestingly enough, the issue does not occur when the node schema's
next
$ref
object also contains an additional property. It also does not occur when only the node schema'snext
$ref
object contains an additional property.Here's a table of when the issue occurs:
The text was updated successfully, but these errors were encountered: