Page Contents
Home > @loopback/rest > RestApplication > exportOpenApiSpec
RestApplication.exportOpenApiSpec() method
Export the OpenAPI spec to the given json or yaml file
Signature:
exportOpenApiSpec(outFile?: string, log?: (message?: any, ...optionalParams: any[]) => void): Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
|
outFile |
string |
(Optional) File name for the spec. The extension of the file determines the format of the file. - |
|
log |
(message?: any, …optionalParams: any[]) => void |
(Optional) Log function, default to |
Returns:
Promise<void>