Skip to main content

Deprecating events

Any resource in EventCatalog can be deprecated or marked as deprecated.

This will show a banner on the page indicating that the resource is deprecated.

Deprecating events using frontmatter

To deprecate an event you need to add the deprecated field to the event frontmatter API.

This accepts a boolean or an object with the following properties:

  • date: Date the event will be or was deprecated (YYYY-MM-DD)
  • message: Reason the event is deprecated, supports markdown (optional)
/events/UpdateInventory/index.mdx (example)
---
id: UpdateInventory
... # other event frontmatter

# deprecated as an object (Recommended)
deprecated:
# Date the event will be or was deprecated (YYYY-MM-DD)
date: 2025-01-01
# Reason the event is deprecated, supports markdown (optional)
message: |
This event has been deprecated and replaced by the new event **UpdateInventoryV2**.
Please contact the [team for more information](mailto:inventory-team@example.com) or visit our [website](https://eventcatalog.dev).

# deprecated as a boolean
deprecated: true
---

Configuration:

  • deprecated: boolean or object

Deprecated as an object is recommended, as it gives your users more information to why the resource is deprecated and a date in the past or future.

  • deprecated.date: Date the event will be or was deprecated (YYYY-MM-DD)
  • deprecated.message: Reason the event is deprecated, supports markdown (optional)

Rendered output

Example of resource that will be deprecated:

Deprecating events

Example of resource that is deprecated:

Deprecating events

Demo

You can see a demo of deprecating resources in the EventCatalog demo site.