UNPKG

@loopback/docs

Version:
48 lines (31 loc) 1.16 kB
--- lang: en title: 'API docs: openapi-v3.param.where' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar editurl: https://github.com/strongloop/loopback-next/tree/master/packages/openapi-v3 permalink: /doc/en/lb4/apidocs.openapi-v3.param.where.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) &gt; [where](./openapi-v3.param.where.md) ## param.where() function Sugar decorator for `where` query parameter <b>Signature:</b> ```typescript function where(modelCtor: typeof Model, name?: string): (target: object, member: string, index: number) => void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | modelCtor | <code>typeof Model</code> | Model class | | name | <code>string</code> | Custom name for the parameter, default to <code>where</code> | <b>Returns:</b> `(target: object, member: string, index: number) => void` ## Example ```ts async count( @param.where(modelCtor)) where?: Where<T>, ): Promise<Count> { // ... } ```