Page Contents

Home > @loopback/openapi-v3 > getFilterSchemaFor

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.

Signature:

export declare function getFilterSchemaFor(modelCtor: typeof Model, options?: FilterSchemaOptions): SchemaObject;

Parameters

Parameter Type Description
modelCtor typeof Model The model constructor to build the filter schema for.
options FilterSchemaOptions (Optional) Options to build the filter schema.

Returns:

SchemaObject