Skip to content

[F] convertOpenAPI3Document

function convertOpenAPI3Document(document, __namedParameters?): Promise<string>;

Converts a supported OpenAPI document to TypeSpec source text without writing files. References are dereferenced before transformation; external references can be rejected through disableExternalRefs.

ParameterType
documentSupportedOpenAPIDocuments
__namedParametersConvertOpenAPI3DocumentOptions

Promise<string>

Generated source, formatted when possible, or the unformatted source if formatting fails.

If dereferencing fails, including when a disabled external reference is encountered.