Burgyn / MMLib.SwaggerForOcelot

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

Add fileName as a parameter to `.AddOcelotWithSwaggerSupport()` Extension method to support multiple instances of gateway #125

Closed pateljeel closed 4 years ago

pateljeel commented 4 years ago

Is your feature request related to a problem? Please describe. 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.

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.

Describe the solution you'd like Add fileName as a parameter so you can control the name of the autogenerated ocelot.json file.

Burgyn commented 4 years ago

Hi, thanks for your feature request.

This feature is implemented in release v2.6.0

You can call:

config..AddOcelotWithSwaggerSupport((o) => {
   o.Folder = "Configuration";
   o.PrimaryOcelotConfigFileName = "myOcelot.json";
})

Did this project help you? You can now buy me a beer 😎🍺.