express-openapi-validator
express-openapi-validator copied to clipboard
feat: opt-in lazy loading of specs
Add a new option, lazyLoadApiSpecs, which causes Api Specs to be loaded on first use, instead of on startup.
In tests on our app, eagerly loading all of the possible sets of specs takes tens of seconds, and it is very annoying, so this would be very useful for testing.
Fixes #609.
This branch also currently contains some random changes that were necessary to get the tests to run properly on my machine, which I'm guessing you don't want. Also, please run prettier over the whole codebase.