Page Contents

Home > @loopback/openapi-v3 > getWhereSchemaFor

getWhereSchemaFor() function

Build a OpenAPI schema describing the format of the “where” object used to filter model instances to query, update or delete.

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 getWhereSchemaFor(modelCtor: typeof Model): SchemaObject;

Parameters

Parameter Type Description
modelCtor typeof Model The model constructor to build the filter schema for.

Returns:

SchemaObject