-
Notifications
You must be signed in to change notification settings - Fork 235
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
modular approach #45
Comments
Give me some more details for your use case. It sounds like maybe you have different versions of your API in separate directories, like |
I haven't tried this, but it should work. |
My specific use case would be (company initiative #1) as a stand-alone npm module, and (company initiative #2) as a stand-alone npm module. Each of these modules would have a "routes" folder that conforms to the express-openapi format. There is a parent express project that is composed of all company initiatives (modules). Ultimately, I would like the parent api to behave exactly as though it had been built monolithically, with the rendered apiDocs, etc... |
I see. You should be able to run |
`var app = require('express')(); var modules = ['foo', 'bar'].map(function (module_name) {
}); results in only foo routes appearing in the generated api documentation |
I see. Yea. That would be an issue. How about if |
absolutely would work, that was what I was originally hoping for |
Sweet! I'll try to have this implemented tonight. |
@troymolsberry can you review #46? |
Smoke testing passed, I will now start digging in to building a modular api with this excellent framework. Thank you for the impressively rapid attention to this enhancement. Cheers |
published as |
Hello, thank you for the excellent framework. I have a question about using it to construct modular express applications, where multiple routes are defined in individual npm modules, and the final product is composed from these. Can I call openapi.initialize() multiple times in a single app, once for each module? This implies that instead of a single routes folder, I may have several...
The text was updated successfully, but these errors were encountered: