Table of Contents

Class SchemaCleaner

Namespace
Refitter.Core
Assembly
Refitter.Core.dll

Cleans up OpenAPI schema by removing unreferenced schemas and handling inheritance hierarchies.

public class SchemaCleaner
Inheritance
SchemaCleaner
Inherited Members

Constructors

SchemaCleaner(OpenApiDocument, string[])

Initializes a new instance of the SchemaCleaner class.

public SchemaCleaner(OpenApiDocument document, string[] keepSchemaPatterns)

Parameters

document OpenApiDocument

The OpenAPI document to clean.

keepSchemaPatterns string[]

Regular expression patterns for schemas to keep.

Properties

IncludeInheritanceHierarchy

Gets or sets a value indicating whether to include inheritance hierarchy in the schema cleaning process.

public bool IncludeInheritanceHierarchy { get; set; }

Property Value

bool

Methods

RemoveUnreferencedSchema()

Removes unreferenced schemas from the OpenAPI document.

public void RemoveUnreferencedSchema()