swagger-routes
swagger-routes copied to clipboard
Split apiSpecs into separate module
At the moment the src/apiSpecs
file is intended for testing only, yet it accounts for almost all of the dependencies of this module.
The upshot is we are pulling in modules like expect
which has a shed load of its own dependencies into our production builds.
Ideally we could split the apiSpecs out somehow so this is not the case. Cant think of a really elegant solution but some ideas:
- Set the dependencies only needed for this file as
optionalDependencies
- then consumers can chose not to install. Don't really like this one as I don't know how other modules would use optional dependencies - Move apiSpecs into a subdirectory with its own package.json - then somehow just do a local install on this dir if needed
- Move apiSpecs into a totally separate repo - bit of a hassle