compileScript

suspend fun compileScript(file: File, messageHandler: (String) -> Unit): ResultWithDiagnostics<OpenAPI>

Compiles a .openapi.kts script from a file into an OpenAPI object.

The result is wrapped in a ResultWithDiagnostics object, which contains a list of warnings, errors, etc. as well as the object itself.


suspend fun compileScript(path: Path, messageHandler: (String) -> Unit): ResultWithDiagnostics<OpenAPI>

Compiles a .openapi.kts script from a path into an OpenAPI object.

The result is wrapped in a ResultWithDiagnostics object, which contains a list of warnings, errors, etc. as well as the object itself.