Table of Contents

Class RefitDocumentFilter

Namespace
Refitter.Core
Assembly
Refitter.Core.dll

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

document OpenApiDocument

The OpenAPI document to filter.

includePathMatches string[]

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

document OpenApiDocument

The OpenAPI document to filter.

includeTags string[]

Tags to include. When empty, all operations are kept.

Returns

OpenApiDocument

A new OpenAPI document with only matching operations.