UNPKG

@loopback/docs

Version:
35 lines (22 loc) 920 B
--- lang: en title: 'API docs: openapi-v3.get' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.openapi-v3.get.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/openapi-v3](./openapi-v3.md) &gt; [get](./openapi-v3.get.md) ## get() function Expose a Controller method as a REST API operation mapped to `GET` request method. <b>Signature:</b> ```typescript export declare function get(path: string, spec?: OperationObject): MethodDecorator; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | path | <code>string</code> | The URL path of this operation, e.g. <code>/product/{id}</code> | | spec | <code>OperationObject</code> | The OpenAPI specification describing parameters and responses of this operation. | <b>Returns:</b> `MethodDecorator`