Burgyn / MMLib.SwaggerForOcelot

This repo contains swagger extension for ocelot.
MIT License
352 stars 94 forks source link

Support for multiple instances of gateways #123

Closed pateljeel closed 4 years ago

pateljeel commented 4 years ago

Currently, i have two instances of the same gateway with little differences. They both use multiple ocelot files (merging configuration files feature) and they are segregated into two separate folders each containing ocelot.SwaggerEndPoints.json file.

For instance, under a folder called Gateways I have two separate folders called Mobile and Web They both have multiple ocelot.[A-Za-z0-9].json files but I have two instances of the same service defined in my docker file. For this reason, when the second service spins up, since the fileName cant be controlled and the ocelot.json that gets generated by the first service gets overwritten by the second service.

It would be really helpful if you could pass in the fileName as a parameter for .AddOcelotWithSwaggerSupport() This way we can control the fileName output and ocelot.json doesn't get overwritten when the second instance of the gateway spins up because the name would be unique.

pateljeel commented 4 years ago

@Burgyn

raman-m commented 3 months ago

🤣