UNPKG

@loopback/docs

Version:
29 lines (18 loc) 862 B
--- lang: en title: 'API docs: rest.restserver.getapispec' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.rest.restserver.getapispec.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [RestServer](./rest.restserver.md) &gt; [getApiSpec](./rest.restserver.getapispec.md) ## 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')` <b>Signature:</b> ```typescript getApiSpec(): OpenApiSpec; ``` <b>Returns:</b> `OpenApiSpec`