Page Contents
Home > @loopback/repository-json-schema > getFieldsJsonSchemaFor
getFieldsJsonSchemaFor() function
Build a JSON schema describing the format of the “fields” object used to include or exclude properties of model instances.
Signature:
export declare function getFieldsJsonSchemaFor(modelCtor: typeof Model, options?: FilterSchemaOptions): JsonSchema;
Parameters
Parameter | Type | Description |
---|---|---|
modelCtor | typeof Model | The model constructor to build the filter schema for. |
options | FilterSchemaOptions | (Optional) |
Returns:
JsonSchema