Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Burgyn committed Mar 25, 2022
1 parent 27d4bdc commit ac3f261
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ services.AddSwaggerForOcelot(Configuration,
app.UseSwagger();
```

![ocelot docs](./demo/ocelotdocs.png)
![ocelot docs](https://raw.githubusercontent.com/Burgyn/MMLib.SwaggerForOcelot/swaggerforocelot_v4.9.1/demo/ocelotdocs.png)

## Documentation of Ocelot Aggregates

Expand All @@ -313,7 +313,7 @@ services.AddSwaggerForOcelot(Configuration,
```

Documentations of your aggregates will be available on custom page **Aggregates**.
![aggregates docs](./demo/aggregates.png)
![aggregates docs](https://raw.githubusercontent.com/Burgyn/MMLib.SwaggerForOcelot/swaggerforocelot_v4.9.1/demo/aggregates.png)

The current implementation may not cover all scenarios *(I hope most of them)*, but there are several ways you can change the final documentation.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Kros.Utils;
using Microsoft.AspNetCore.Http;
using Ocelot.Multiplexer;
using System;
using System.Net.Mime;

Expand All @@ -14,7 +15,10 @@ namespace MMLib.SwaggerForOcelot.Aggregates
public class AggregateResponseAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="AggregateResponseAggregate"/> class.
/// Initializes a new instance of the <see>
/// <cref>AggregateResponseAggregate</cref>
/// </see>
/// class.
/// </summary>
/// <param name="description">The description.</param>
/// <param name="responseType">Type of the response.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ internal class AggregateRouteDocumentationGenerator : IAggregateRouteDocumentati
/// <param name="routes">Routes.</param>
/// <param name="routesDocumentationProvider">Routes documentation provider.</param>
/// <param name="definedAggregatorProvider">Aggregator provider.</param>
/// <param name="postProcess">Post process.</param>
/// <param name="schemaGenerator">Schema generator.</param>
public AggregateRouteDocumentationGenerator(
IOptions<List<RouteOptions>> routes,
IRoutesDocumentationProvider routesDocumentationProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ internal class RoutesDocumentationProvider : IRoutesDocumentationProvider
/// </summary>
/// <param name="downstreamSwaggerDocs">The downstream swagger docs.</param>
/// <param name="swaggerEndPointRepository">The swagger end point repository.</param>
/// <param name="memoryCache">Memory cache</param>
public RoutesDocumentationProvider(
IDownstreamSwaggerDocsRepository downstreamSwaggerDocs,
ISwaggerEndPointProvider swaggerEndPointRepository,
Expand Down
3 changes: 3 additions & 0 deletions src/MMLib.SwaggerForOcelot/Configuration/SwaggerFileRoute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ namespace MMLib.SwaggerForOcelot.Configuration
/// </summary>
public class SwaggerFileRoute : FileRoute
{
/// <summary>
/// Swagger key. (for swagger configuration match)
/// </summary>
public string SwaggerKey { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public static IConfigurationBuilder AddOcelotWithSwaggerSupport(
/// Get files of ocelot Configuration with a filter of envirotment.
/// </summary>
/// <param name="folder"></param>
/// <returns>A var of type List<FileInfo> with the list of files of configuration of ocelot.</returns>
/// <param name="nameEnvirotment"></param>
/// <returns>A var of type List[FileInfo] with the list of files of configuration of ocelot.</returns>
private static List<FileInfo> GetListOfOcelotFiles(string folder, string nameEnvirotment)
{
var reg = new Regex(OcelotFilePattern, RegexOptions.IgnoreCase | RegexOptions.Singleline);
Expand Down
2 changes: 1 addition & 1 deletion src/MMLib.SwaggerForOcelot/MMLib.SwaggerForOcelot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>5.0.2</Version>
<Version>5.0.3</Version>
<Authors>Milan Martiniak</Authors>
<Company>MMLib</Company>
<Description>Swagger generator for Ocelot downstream services.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ namespace MMLib.SwaggerForOcelot.Middleware
/// </summary>
public interface ISwaggerDownstreamInterceptor
{
/// <summary>
/// Do downstream swagger endopint
/// </summary>
/// <param name="httpContext"></param>
/// <param name="version"></param>
/// <param name="endPoint"></param>
/// <returns></returns>
bool DoDownstreamSwaggerEndpoint(HttpContext httpContext, string version, SwaggerEndPointOptions endPoint);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public class SwaggerForOcelotMiddleware
/// <param name="next">The next delegate.</param>
/// <param name="options">The options.</param>
/// <param name="routes">The Ocelot Routes configuration.</param>
/// <param name="swaggerEndPoints">The swagger end points.</param>
/// <param name="httpClientFactory">The HTTP client factory.</param>
/// <param name="transformer">The SwaggerJsonTransformer</param>
/// <param name="swaggerProvider">Swagger provider.</param>
/// <param name="downstreamInterceptor">Downstream interceptor.</param>
public SwaggerForOcelotMiddleware(
RequestDelegate next,
SwaggerForOcelotUIOptions options,
Expand All @@ -62,7 +62,6 @@ public SwaggerForOcelotMiddleware(
/// Invokes the specified context.
/// </summary>
/// <param name="context">The context.</param>
/// <param name="discoveryProvider">The discovery provider.</param>
/// <param name="swaggerEndPointRepository">Swagger endpoint repository.</param>
/// <param name="downstreamSwaggerDocs">Repository for obtaining downstream swagger docs.</param>
public async Task Invoke(HttpContext context,
Expand Down

0 comments on commit ac3f261

Please sign in to comment.