Class RefitDocumentFilter
Filters an OpenAPI document by tags and path patterns. Each filter operation returns a new document without mutating the input.
public static class RefitDocumentFilter
- Inheritance
-
RefitDocumentFilter
- Inherited Members
Methods
FilterByPath(OpenApiDocument, string[])
Removes paths from the document that do not match any of the specified regular expressions. Returns a new document; the original is not modified.
public static OpenApiDocument FilterByPath(OpenApiDocument document, string[] includePathMatches)
Parameters
documentOpenApiDocumentThe OpenAPI document to filter.
includePathMatchesstring[]Regular expressions to match paths against. When empty, all paths are kept.
Returns
- OpenApiDocument
A new OpenAPI document with only matching paths.
FilterByTags(OpenApiDocument, string[])
Removes operations from the document that do not match any of the specified tags. Returns a new document; the original is not modified.
public static OpenApiDocument FilterByTags(OpenApiDocument document, string[] includeTags)
Parameters
documentOpenApiDocumentThe OpenAPI document to filter.
includeTagsstring[]Tags to include. When empty, all operations are kept.
Returns
- OpenApiDocument
A new OpenAPI document with only matching operations.