Table of Contents

Class OpenApiValidatorAdapter

Namespace
Refitter.Core.Validation
Assembly
Refitter.Core.dll

Adapts the static OpenApiValidator to the IValidator interface.

public sealed class OpenApiValidatorAdapter : IValidator
Inheritance
OpenApiValidatorAdapter
Implements
Inherited Members

Methods

ValidateAsync(string, bool, CancellationToken)

Validates the specified OpenAPI specification file.

public 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.