Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Rwing/OcelotSwagger
This library makes ocelot easy to integrate swagger
https://github.com/Rwing/OcelotSwagger
Last synced: about 2 months ago
JSON representation
This library makes ocelot easy to integrate swagger
- Host: GitHub
- URL: https://github.com/Rwing/OcelotSwagger
- Owner: Rwing
- License: mit
- Created: 2018-07-02T08:44:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-07T07:59:15.000Z (over 5 years ago)
- Last Synced: 2024-10-08T11:10:28.640Z (2 months ago)
- Language: C#
- Size: 32.2 KB
- Stars: 16
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ocelot - This library makes ocelot easy to integrate swagger
README
# OcelotSwagger
[![NuGet][main-nuget-badge]][main-nuget]
[main-nuget]: https://www.nuget.org/packages/OcelotSwagger/
[main-nuget-badge]: https://img.shields.io/nuget/v/OcelotSwagger.svg?style=flat-square&label=nugetThis library makes ocelot easy to integrate swagger
## Installation
```bash
Install-Package OcelotSwagger
```## Usage
In method `ConfigureServices`
```csharp
// Load options from code
services.AddOcelotSwagger(c =>
{
c.Cache.Enabled = true;
c.SwaggerEndPoints.Add(new SwaggerEndPoint { Name = "Api Name", Url = "/path/swagger.json" });
});
```
Or
```csharp
// Load options from appsettings.json
services.Configure(this.configuration.GetSection(nameof(OcelotSwaggerOptions)));
services.AddOcelotSwagger();
```In method `Configure`
```csharp
app.UseOcelotSwagger();
```## TODO
* [x] Cache## Contributor
@Cyril MARTY (https://github.com/DotNetConcept)