-
Notifications
You must be signed in to change notification settings - Fork 585
Change default location of swagger.yml and api controllers #373
Comments
You can override the location of the swaggerFile in your app.js for your swagger-express-mw
For swagger-node it's totally undocumented but digging in the code I found that you can use envvar
I created a task in package.json
You can override any config values, the 1st swagger_ is a prefix you must use to override, the second swagger is the node you want to start overriding. You can also use swagger_project_ Hope that help |
Oh, I wasted so much time to figure this out. @sylwit, thank you! I just moved my |
I still having issues with getting I tried setting I found this other issue and it looks like my problem might be that I am using a JSON swagger file, is that the case? |
This still doesn't answer how the default location of |
@stv8 thanks, but if I'm correct that's how you change the location of the swagger configuration file which by default is located in |
@sylwit's answer is correct but maybe a little confusing as the example has put the swagger yaml inside the config dir. updated examples for anyone in the future package.json
app.js
|
Hi guys, |
Thank you bro. That's extremely helpful! |
Hi, |
late response, but may be useful for the people someday or in the future, you can try it with cross-env. "swagger:edit": "cross-env swagger_swagger_fileName=./documentation/swagger/swagger.yaml swagger project edit", |
|
HI,
I have been banging my head against the wall with this. How can I change the default location of the swagger.yaml file for the "swagger project edit" and other swagger commands to work? The docs say that you can supply the directory as a parameter to the "swagger project edit" but it does not seem to work. Also it is not clear on how to configure these paths when running the app.
Thank you in advance for your help
The text was updated successfully, but these errors were encountered: