Skip to main content
New project sponsor πŸͺHookdeck: Serverless infrastructure for event-driven architecture. Learn more.

Event frontmatter API

Overview​

Events are just markdown files, with this comes the use of Content, MDX components and also front-matter.

Here is an example of the event frontmatter you will find in your /events folder.

/events/InventoryOutOfStock/index.md (example)
---
# id of your event, used for slugs and references in EventCatalog.
id: InventoryOutOfStock

# Display name of the event, rendered in EventCatalog
name: Out of stock

# Version of the event
version: 0.0.3

# Short summary of your event
summary: |
Event that is raised when an inventory item goes out of stock.

# Optional owners, references teams or users
owners:
- dboyne

# Optional badges, rendered to UI by EventCatalog
badges:
- content: New event
backgroundColor: blue
textColor: blue
---

## Overview

Event is published when the inventory is out of stock.

<NodeGraph />

Required fields​

id​

  • Type: string

Unqiue id of the event. EventCatalog uses this for references and slugs.

Example
---
id: InventoryOutOfStock
---

name​

  • Type: string

Name of the event this is used to display the name on the UI.

Example
---
name: Out of stock
---

version​

  • Type: string

Version of the event.

Example
---
version: 0.0.1
---

Optional fields​

summary​

Short summary of your event, shown on event summary pages.

Example
---
summary: |
Event that is raised when an inventory item goes out of stock.
---

owners​

An array of user ids that own the event.

Example
---
owners:
- dboyne
- mSmith
---

badges​

An array of badges that get rendered on the page.

Example
---
badges:
- content: My badge
backgroundColor: blue
textColor: blue
---

specifications​

Specifications to include on the page

Current supports AsyncAPI and OpenAPI files. When including the specifications the page will render badges and buttons for the specifications.

Example
---
specifications:
asyncapiPath: order-service-asyncapi.yaml
openapiPath: openapi.yml
---