UNPKG

@loopback/docs

Version:
49 lines (33 loc) 1.15 kB
--- lang: en title: 'API docs: openapi-v3.param' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.openapi-v3.param.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/openapi-v3](./openapi-v3.md) &gt; [param](./openapi-v3.param.md) ## param namespace Describe an input parameter of a Controller method. The `@param` decorator takes an argument of `ParameterObject` to define how to map the parameter to OpenAPI specification. `@param(paramSpec)` must be applied to parameters. <b>Signature:</b> ```typescript export declare namespace param ``` ## Variables | Variable | Description | | --- | --- | | [array](./openapi-v3.param.array.md) | Define a parameter of <code>array</code> type. | | [header](./openapi-v3.param.header.md) | | | [path](./openapi-v3.param.path.md) | | | [query](./openapi-v3.param.query.md) | | ## Example ```ts class MyController { @get('/') list( @param(offsetSpec) offset?: number, @param(pageSizeSpec) pageSize?: number, ) {} } ```