Table of Contents

Class OpenApiValidator

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

Validates an OpenAPI specification file and collects statistics about its contents.

public static class OpenApiValidator
Inheritance
OpenApiValidator
Inherited Members

Methods

Validate(string, bool, CancellationToken)

Validates an OpenAPI specification file and returns validation diagnostics and statistics.

public static Task<OpenApiValidationResult> Validate(string openApiFile, bool allowRemoteReferences = false, CancellationToken cancellationToken = default)

Parameters

openApiFile 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 to cancel the operation.

Returns

Task<OpenApiValidationResult>

A OpenApiValidationResult containing diagnostics and element counts.