Page Contents

Home > @loopback/repository > ModelMetadataHelper > getModelMetadata

ModelMetadataHelper.getModelMetadata() method

A utility function to simplify retrieving metadata from a target model and its properties.

Signature:

static getModelMetadata(target: Function, options?: InspectionOptions): ModelDefinition | {};

Parameters

Parameter Type Description
target Function The class from which to retrieve metadata.
options InspectionOptions An options object for the MetadataInspector to customize the output of the metadata retrieval functions.

Returns:

ModelDefinition | {}