Table of Contents

Class RefitterRunner

Namespace
Refitter.Core
Assembly
Refitter.Core.dll

Encapsulates the shared generation workflow across all distribution forms (CLI, MSBuild, Source Generator). Handles generator creation, code generation, output planning, validation, warning detection, and file writing.

public class RefitterRunner
Inheritance
RefitterRunner
Inherited Members

Methods

RunAsync(RefitGeneratorSettings, IFileWriter?, IValidator?, string?, string?, CancellationToken)

Runs the complete generation workflow.

public Task<RunResult> RunAsync(RefitGeneratorSettings settings, IFileWriter? writer = null, IValidator? validator = null, string? settingsFilePath = null, string? outputPath = null, CancellationToken cancellationToken = default)

Parameters

settings RefitGeneratorSettings

The generator settings.

writer IFileWriter

Optional file writer for writing output files. When null, files are not written.

validator IValidator

Optional validator for OpenAPI spec validation. When null, validation is skipped.

settingsFilePath string

Optional path to the .refitter settings file, used for resolving relative output paths.

outputPath string

Optional CLI output path override.

cancellationToken CancellationToken

A cancellation token.

Returns

Task<RunResult>

A RunResult containing generated files, warnings, diagnostics, and the exit code.