Page Contents

Home > @loopback/rest > RestServer > getApiSpec

RestServer.getApiSpec() method

Get the OpenAPI specification describing the REST API provided by this application.

This method merges operations (HTTP endpoints) from the following sources: - app.api(spec) - app.controller(MyController) - app.route(route) - app.route('get', '/greet', operationSpec, MyController, 'greet')

Signature:

getApiSpec(): OpenApiSpec;

Returns:

OpenApiSpec