Page Contents

Home > @loopback/repository > ModelMetadataHelper > getModelMetadata

ModelMetadataHelper.getModelMetadata() method

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


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


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.


ModelDefinition | {}