Skip to main content

buildModelMetadata

@webda/content-mapper


Function: buildModelMetadata()

buildModelMetadata(objects, plural): Record<string, ModelMetadata>

Defined in: packages/content-mapper/src/module-discovery.ts:521

Build the structural half of each model's webda.module.json entry.

Ancestors and subclasses are resolved among the discovered models, so they carry namespaced names rather than raw class names.

Parameters​

objects​

DiscoveredObject[]

discovered objects

plural​

(name) => string

pluralisation function, supplied by the host

Returns​

Record<string, ModelMetadata>

metadata per model name