Class SchemaCleaner
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
OpenApiDocumentThe 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
Methods
RemoveUnreferencedSchema()
Removes unreferenced schemas from the OpenAPI document.
public void RemoveUnreferencedSchema()