startup.cs
public void ConfigureServices(IServiceCollection services)
{
services.AddOcelot().AddAppConfiguration();
services.AddSwaggerForOcelot(Configuration);
services.AddControllers();
services.Configure(options =>
{
options.AutomaticAuthentication = false;
});
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
app.UseStaticFiles();
app.UseSwaggerForOcelotUI().UseOcelot().Wait();
}
Describe the bug I got error on publishing gateway on iis default port
my swagger json { "Routes": [ { "DownstreamPathTemplate": "/api/{everything}", "UpstreamPathTemplate": "/api/cinema.svc/{everything}", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 8100 } ], "SwaggerKey": "cinema.svc" } ] },{ "SwaggerEndPoints": [ { "Key": "cinema.svc", "Config": [ { "Name": "Cinema API", "Version": "v1", "Url": "http://localhost:8100/swagger/v1/swagger.json" } ] } ] } ] }
startup.cs public void ConfigureServices(IServiceCollection services) { services.AddOcelot().AddAppConfiguration(); services.AddSwaggerForOcelot(Configuration); services.AddControllers(); services.Configure(options =>
{
options.AutomaticAuthentication = false;
});
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
});
}
.
To Reproduce If it is a possible attache:
swagger.json
.