Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dereference nested refs #3

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

skyqrose
Copy link
Member

(blocked, not ready for review)

Asana Task: 🐞 In schemas/ fix dereferencing
As discussed in #2

There's a bug in how we resolve and dereference refs.

This switches to a new library, https://github.com/stoplightio/json-schema-ref-parser , which has resolving and dereferencing that work with sensible defaults, instead of having to define it ourselves.

Unfortunately, that library has a related bug, in that it also doesn't recurse to resolve nested refs if a parent extends a ref.

I filed a bug report stoplightio/json-schema-ref-parser#44 and also a partial fix stoplightio/json-schema-ref-parser#45 , but I didn't manage to fix it all the way.

This PR and bugfix is blocked until that library's maintainers finishes and merges that PR and releases a new version. Alternatively, we could write our own custom resolving and dereferencing, but that seems error prone.

I'm opening this draft PR to document where I am in the bugfix process and to make it easier to resume once the library is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant