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

Allow customizing oas-resolver options #365

Open
medfreeman opened this issue Sep 18, 2019 · 0 comments
Open

Allow customizing oas-resolver options #365

medfreeman opened this issue Sep 18, 2019 · 0 comments

Comments

@medfreeman
Copy link

medfreeman commented Sep 18, 2019

In a project, i make use of a custom in-memory resolver to apply various transformations on json schema / openAPI files, specifically in processing pipelines.
To this effect, i need to use oas-resolver cache option, in order to feed it in-memory schema contents without having to write intermediary results to disk.

Detailed description

Enhancement: allow customizing oas-resolver options, specifically the cache option.

Context

It would be beneficial for everyone trying to use this library with custom resolvers, which i foresee will develop in the near future, with schema-first api design being more and more adopted.

Possible implementation

Move the cache option initialization just before the spread of the options object.

speccy/lib/loader.js

Lines 164 to 166 in a86b1a9

...options,
resolve: true,
cache: [],

I'll have a PR ready fast for a simple change as it is.

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

No branches or pull requests

1 participant