Table of Contents

Interface IValidator

Namespace
Refitter.Core
Assembly
Refitter.Core.dll

Validates an OpenAPI specification file and returns validation diagnostics and statistics. Each distribution form (CLI, MSBuild, Source Generator) can provide its own adapter.

public interface IValidator

Methods

ValidateAsync(string, bool, CancellationToken)

Validates the specified OpenAPI specification file.

Task<OpenApiValidationResult> ValidateAsync(string openApiPath, bool allowRemoteReferences = false, CancellationToken cancellationToken = default)

Parameters

openApiPath string

The path to the OpenAPI specification file.

allowRemoteReferences bool

When false, remote and out-of-tree $ref references are rejected.

cancellationToken CancellationToken

A cancellation token.

Returns

Task<OpenApiValidationResult>

An OpenApiValidationResult containing diagnostics and element counts.