swagger-express-ts icon indicating copy to clipboard operation
swagger-express-ts copied to clipboard

Develop

Open ariel-compie opened this issue 6 years ago • 1 comments

Added support for creating multiple swagger json for api versioning

ariel-compie avatar Aug 26 '18 10:08 ariel-compie

Hi, can i ask you about the purpose of this pull request? (as you can see i already created fork of this project and added tag support from @moosi in it, but really do not understand the meaning of yours.

I will try to explain how i understand it. You wanna have more then one versions of API deployed in parallel and defined it only by different decorators?

So my question is, how will you solve the problem of the interface changes? For example you will need to change whole model (do it more complex or remove some currently required property - do not say you will make it optional it is balast!)? How will you solve the need of different path configuration for each version?

If you need it just for generating another swagger definition it is not worth your time i think.

After all. Why did you add apiVersion to ISwaggerExpressOptions? You have information about the api version from ISwaggerBuildDefinition.info, when you creating router no need to extend ISwaggerExpressOptions.

And what is really missing are tests! Without it i can just hope i can imagine what is the real purpose of this pull request. If you send me more information i would like to change my mind if am wrong and be glad to add it to my fork.

pesoklp13 avatar Sep 03 '18 19:09 pesoklp13