Page Contents

Home > @loopback/rest > RestServer > addOpenApiSpecEndpoint

RestServer.addOpenApiSpecEndpoint() method

Add a new non-controller endpoint hosting a form of the OpenAPI spec.

Signature:

addOpenApiSpecEndpoint(path: string, form: OpenApiSpecForm, router?: express.Router): void;

Parameters

Parameter Type Description
path string Path at which to host the copy of the OpenAPI
form OpenApiSpecForm Form that should be rendered from that path
router express.Router (Optional)

Returns:

void