v1.0.0
Happy to share with you all that 1.0.0 is now out
Breaking Changes
- The way event-metadata is stored and populated has changed, hopefully making it easier for people to get started. Rather than having an
data/event-metadata.json
file you can now runnpm run generate-eventmetadata
which will populate yourdata
directory with all the event meta data you need.
Features
Event Metadata in seconds
EventBridge Atlas will display your Schemas and Events for you, but requires you to fill in any descriptions or examples yourself. This used to quite a manual process, but now EventBridge Atlas has made this easier for you.
Getting Started
When you clone the project run npm run generate-eventmetadata
which will populate your event metata data for you.
Here is an example of the output
/data/my-event-source/MyEvent.json
{
"description": "My Event is raised when our system does something interested. Change this to what you want.",
"detail": {
"brand": {
"code": {
"type": "string",
"description": "The brand of the user", // Fill out the details for each description. The template is made for you
"example": ""
}
},
"data": {
"applicationProductIds": {
"type": "array",
"description": "",
"example": ""
},
"decision": {
"type": "string",
"description": "",
"example": ""
},
"decision_at": {
"type": "string",
"description": "",
"example": ""
},
"status": {
"type": "string",
"description": "",
"example": ""
}
},
"metadata": {
"correlationId": {
"type": "string",
"description": "",
"example": ""
},
"service": {
"type": "string",
"description": "",
"example": ""
}
},
"user": {
"id": {
"type": "number",
"description": "",
"example": ""
}
}
},
"example": { // This example is prepopulated for you. Just change the defaults.
"detail-type": "MyEvent",
"resources": [],
"detail": {
"metadata": {
"service": "ut",
"correlationId": "sed eiusmod"
},
"data": {
"decision": "sit deserunt officia incididunt sint",
"decision_at": "1999-04-13T23:00:00.0Z",
"brand": {
"code": "magna deserunt ex sit exercitation"
},
"user": {
"id": 1
},
"applicationProductIds": [1, 2, 3],
"status": "active"
}
},
"id": "29a3717a-3304-423e-9595-46c020ab33d8",
"source": "deadhappy.claims",
"time": "2021-07-13T06:51:53.741Z",
"region": "eu-west-1",
"version": "4",
"account": "YOUR_ACCOUNT"
}
}
The descriptions and examples will now be shown when you generate your docs.
Refacators & Fixes
- The parsers now use the Registry and Schema models.
- Simplified the parsers for Docuowl and Slate.