apigee-127 / swagger-node-runner

The heart of Swagger-Node
MIT License
102 stars 124 forks source link

multiple swagger definition file? #13

Open yinso opened 9 years ago

yinso commented 9 years ago

Is there a way to load multiple swagger definition files?

This is needed for handling API versioning as swagger defines one API version per definition file.

Thanks.

theganyo commented 9 years ago

No. I'm not certain of what your looking for. Can you explain what you'd hope it would do?

yinso commented 9 years ago

Swagger defines one version number per file.

So if I have version 1, version 2, and version 3 of the API - it appears that I need to publish 3 files.

So in the api/swagger/ folder, I am looking to have

And I am thinking if node runner can load all the files, or perhaps via a config being passed in.

What do you think?

theganyo commented 9 years ago

I wonder if the best way to handle this would be through a front-end proxy that can route to the variations of your API based on path - or whatever criteria you choose?

GiladShoham commented 9 years ago

@yinso actually i did it with 3 different files and load them all successfully. i can help you with this if you want

vgoloviznin commented 8 years ago

@GiladShoham can you share the code regarding this? :)

kazaff commented 8 years ago

@GiladShoham how did you do?