Skip to content

[F] getOpenAPI3

function getOpenAPI3(program, options?): Promise<OpenAPI3ServiceRecord[]>;

Generates OpenAPI document objects without writing files. Results are grouped by service and API version; requesting multiple OpenAPI specification versions appends the service records for each requested specification version in order. Inspect each document’s openapi field to distinguish those groups.

ParameterTypeDescription
programProgramThe program to emit to OpenAPI 3
optionsOmit<OpenAPI3EmitterOptions, IrrelevantOpenAPI3EmitterOptionsForObject>OpenAPI 3 emit options

Promise<OpenAPI3ServiceRecord[]>

Service records with per-document diagnostics; a document that cannot be produced may be omitted.