EXTEND

The @MetadataExtension decorator accepts an object with any key-value pairs you choose, depending on the needs of the consuming system.

  @MetadataExtension({
    render: 'image',
    x-render: 'example'// this is another example with prefix key
  })

There is an optional parameter prefixKey

prefixKey Option

  • Type: boolean

  • Default: true

  • When prefixKey is enabled, the metadata keys may be automatically prefixed (e.g., to avoid naming collisions or match framework naming conventions).

  • You can explicitly disable this behavior by setting prefixKey: false.

Overriding Metadata

You can override previously defined metadata by reapplying the @MetadataExtension decorator. The latest definition takes precedence and merges with or replaces earlier metadata as determined by your framework's logic.

Last updated