Eventbridge Toolbox Schema Generator is cli tool that automates the initial creation of a schema registry in your documentation of your event-driven architecture.
This is designed to work with the eventbridge-toolbox package.
Within event-driven architectures, events facilitate communication between loosely connected services in an application. EventBridge is AWS's tool for implementing asynchronous event-driven workflows.
Event emitters are responsible for broadcasting events to event channels, while event consumers are responsible for executing business logic whenever they encounter a relevant event.
EventBridge contracts ensure a stable and reliable interaction emitters and consumers. These contract acts as a guiding agreement which guarantees that emitters' published events will consistently trigger the corresponding business logic on the consumer side.
- Generate documentation skeletons for events
- Generate json schemas for events from contracts
With npm:
npm install --save-dev @aleios-cloud/eventbridge-toolbox-schema-generator
With yarn:
yarn add -D @aleios-cloud/eventbridge-toolbox-schema-generator
With pnpm:
pnpm add -D @aleios-cloud/eventbridge-toolbox-schema-generator
You can create a documentation website based on eventcatalog.dev and generate docs directly from your event contracts.
- Set up an event catalog site and give it a name:
npx @eventcatalog/create-eventcatalog@latest <name your event catalog>
-
Edit
eventcatalog.config.js
with your details -
Remove the example events from the
events
folder, as well as everything in theservices
anddomains
folders -
Run
eventbridge-toolbox-schema-generator
with the following arguments:
- The path from the root to your event contracts
- The path from the root to the event catalog events folder
npx schema-generator <path from root to your event contracts> <path from root to event catalog events>
- You can start a local development server by running:
npm run dev
- You can find out more about how to deploy your documentation site in the event catalog docs
Ryan Schuller |
Luke Yianni |
April Bates |