Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 909 Bytes

README.md

File metadata and controls

43 lines (33 loc) · 909 Bytes

OcelotSwagger

NuGet

This library makes ocelot easy to integrate swagger

Installation

Install-Package OcelotSwagger

Usage

In method ConfigureServices

// Load options from code
services.AddOcelotSwagger(c =>
{
    c.Cache.Enabled = true;
    c.SwaggerEndPoints.Add(new SwaggerEndPoint { Name = "Api Name", Url = "/path/swagger.json" });
});

Or

// Load options from appsettings.json
services.Configure<OcelotSwaggerOptions>(this.configuration.GetSection(nameof(OcelotSwaggerOptions)));
services.AddOcelotSwagger();

In method Configure

app.UseOcelotSwagger();

TODO

  • Cache

Contributor

@Cyril MARTY (https://github.com/DotNetConcept)