Swagger Specs mapping to Base Path and Auto-Generate proxy

Hi 

I have come across target swaggers where different resources are bundled together in one spec. Even petstore sample swagger is an example of that where different resources pet, user and store are present.

https://petstore.swagger.io/

(Some times, these paths are also not consistent  e.g  /management, v1/profiles, v1.0/user etc...)

If we generate proxy from such as swagger then assuming base path is v2.0/ the subpaths would be v2.0/pet, v2.0/user, v2.0/store etc.

But, all these endpoints pet, user, store etc. will all house in same proxy. Is it ok from design point of view and from management, operation point of view or it should be that we break pet, user and store in to different respective swagger first and then  generate proxies and  map each proxy to appropriate base path of v2.0/pet, v2.0/user etc.

These big swagger files are pretty common (sometimes MB in size) just want to know how are they being managed when we are looking to auto-generate proxy from swagger. Any reasons why organizations are maintaing these big swaggers and not breaking it to smaller resources / services.

Is it ok if we break these swaggers at apigee level.

How to decide we should go for new proxy or keep same proxy even when resource is different.

 

Any specific guidelines or experience please share.

 

thanks,

Aakash

0 0 72
0 REPLIES 0