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
openApiFilestringThe path to the OpenAPI specification file.
allowRemoteReferencesboolWhen false, remote and out-of-tree
$refreferences are rejected.cancellationTokenCancellationTokenA cancellation token to cancel the operation.
Returns
- Task<OpenApiValidationResult>
A OpenApiValidationResult containing diagnostics and element counts.