---
lang: en
title: 'API docs: openapi-v3.getfilterschemafor'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/openapi-v3
permalink: /doc/en/lb4/apidocs.openapi-v3.getfilterschemafor.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/openapi-v3](./openapi-v3.md) &gt; [getFilterSchemaFor](./openapi-v3.getfilterschemafor.md)

## getFilterSchemaFor() function

Build an OpenAPI schema describing the format of the "filter" object used to query model instances.

Note we don't take the model properties into account yet and return a generic json schema allowing any "where" condition.

<b>Signature:</b>

```typescript
export declare function getFilterSchemaFor(modelCtor: typeof Model, options?: FilterSchemaOptions): SchemaObject;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  modelCtor | typeof [Model](./repository.model.md) | The model constructor to build the filter schema for. |
|  options | [FilterSchemaOptions](./repository-json-schema.filterschemaoptions.md) | Options to build the filter schema. |

<b>Returns:</b>

SchemaObject


