Class SwaggerFilterService
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
OpenApiDocumentThe Swagger document being filtered.
context
DocumentFilterContextThe context of the document filter.
FilterEndpointsFromDiscovery(OpenApiDocument)
Filters out specified endpoints from the Swagger document.
private static void FilterEndpointsFromDiscovery(OpenApiDocument swaggerDoc)
Parameters
swaggerDoc
OpenApiDocumentThe Swagger document to be filtered.