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

Sync versions of dereference, bundle, etc...? #82

Closed
jwalton opened this issue Apr 16, 2018 · 3 comments
Closed

Sync versions of dereference, bundle, etc...? #82

jwalton opened this issue Apr 16, 2018 · 3 comments

Comments

@jwalton
Copy link

jwalton commented Apr 16, 2018

Would you be interested in a PR that added synchronous versions of dereference, bundle, and friends? Something along the lines of:

$ref = $RefParser.resolveSync(schema, {
  files: {
    'https://foo.com/file.yaml': {type: 'object', ...},
    './foo.yaml': {definitions: {User: {type: 'object'}}}
  }
});

So you can supply all the file contents ahead of time?

@MikeTaylor
Copy link

YES YES YES YES YES!!!

@MikeTaylor
Copy link

In the mean time, I made this: https://github.com/MikeTaylor/json-schema-ref-parser-sync

I'm not proud of it, but it works. I hope it's of use to someone else.

@JamesMessinger
Copy link
Member

Closing as a duplicate of Issue #14

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

No branches or pull requests

3 participants