Skip to main content

Deprecating commands

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 commands using frontmatter

To deprecate a command you need to add the deprecated field to the command frontmatter API.

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

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


# deprecated as an object (Recommended)
deprecated:
# Date the command will be or was deprecated (YYYY-MM-DD)
date: 2025-01-01
# Reason the command is deprecated, supports markdown (optional)
message: |
This command has been deprecated and replaced by the new command **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 command will be or was deprecated (YYYY-MM-DD)
  • deprecated.message: Reason the command is deprecated, supports markdown (optional)

Rendered output

Example of resource that will be deprecated:

Deprecating commands

Example of resource that is deprecated:

Deprecating commands

Demo

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