Table of Contents

Class SwaggerFilterService

Namespace
arolariu.Backend.Core.Domain.General.Services.Swagger
Assembly
arolariu.Backend.Core.dll

The swagger filter service represents the service that filters the swagger document. This service is used to filter the swagger document and remove the endpoints that are not needed. This service is also used to add external documentation to the swagger document.

internal sealed class SwaggerFilterService : IDocumentFilter
Inheritance
SwaggerFilterService
Implements
Inherited Members

Methods

AddExternalDocumentation(OpenApiDocument)

Adds the API external documentation to the Swagger document.

private static void AddExternalDocumentation(OpenApiDocument swaggerDoc)

Parameters

swaggerDoc OpenApiDocument

Apply(OpenApiDocument, DocumentFilterContext)

Applies the Swagger document filter by filtering endpoints from discovery.

public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)

Parameters

swaggerDoc OpenApiDocument

The Swagger document being filtered.

context DocumentFilterContext

The context of the document filter.

FilterEndpointsFromDiscovery(OpenApiDocument)

Filters out specified endpoints from the Swagger document.

private static void FilterEndpointsFromDiscovery(OpenApiDocument swaggerDoc)

Parameters

swaggerDoc OpenApiDocument

The Swagger document to be filtered.