Skip to content

Instantly share code, notes, and snippets.

@cer
Last active March 7, 2025 01:25
Show Gist options
  • Save cer/ca1f729dbbc40ee417616d9e3dcefd59 to your computer and use it in GitHub Desktop.
Save cer/ca1f729dbbc40ee417616d9e3dcefd59 to your computer and use it in GitHub Desktop.
springwolf.json
{
"asyncapi": "3.0.0",
"info": {
"title": "${spring.application.name}",
"version": "1.0.0",
"x-generator": "springwolf"
},
"defaultContentType": "application/json",
"servers": {
"eventuate-consumer": {
"host": "localhost:29092",
"protocol": "kafka"
},
"eventuate-producer": {
"host": "jdbc:mysql://localhost/example_db",
"protocol": "eventuate-outbox"
}
},
"channels": {
"io.eventuate.tram.spring.springwolf.events.Customer": {
"address": "io.eventuate.tram.spring.springwolf.events.Customer",
"messages": {
"io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent": {
"$ref": "#/components/messages/io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent"
}
}
},
"orderServiceEvents": {
"address": "orderServiceEvents",
"messages": {
"io.eventuate.tram.spring.springwolf.events.OrderCreatedEvent": {
"$ref": "#/components/messages/io.eventuate.tram.spring.springwolf.events.OrderCreatedEvent"
}
}
}
},
"components": {
"schemas": {
"HeadersNotDocumented": {
"title": "HeadersNotDocumented",
"type": "object",
"properties": {},
"description": "There can be headers, but they are not explicitly documented.",
"examples": [
{}
]
},
"io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent": {
"title": "CustomerCreatedEvent",
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"examples": [
{
"id": "string"
}
]
},
"io.eventuate.tram.spring.springwolf.events.OrderCreatedEvent": {
"title": "OrderCreatedEvent",
"type": "object",
"properties": {
"customerId": {
"type": "integer",
"format": "int64"
},
"orderId": {
"type": "integer",
"format": "int64"
}
},
"examples": [
{
"customerId": 0,
"orderId": 0
}
]
}
},
"messages": {
"io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent": {
"headers": {
"$ref": "#/components/schemas/HeadersNotDocumented"
},
"payload": {
"schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0",
"schema": {
"$ref": "#/components/schemas/io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent"
}
},
"name": "io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent",
"title": "io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent"
},
"io.eventuate.tram.spring.springwolf.events.OrderCreatedEvent": {
"headers": {
"$ref": "#/components/schemas/HeadersNotDocumented"
},
"payload": {
"schemaFormat": "application/vnd.aai.asyncapi+json;version=3.0.0",
"schema": {
"$ref": "#/components/schemas/io.eventuate.tram.spring.springwolf.events.OrderCreatedEvent"
}
},
"name": "io.eventuate.tram.spring.springwolf.events.OrderCreatedEvent",
"title": "io.eventuate.tram.spring.springwolf.events.OrderCreatedEvent"
}
}
},
"operations": {
"io.eventuate.tram.spring.springwolf.events.CustomerEventPublisherImpl": {
"action": "send",
"channel": {
"$ref": "#/channels/io.eventuate.tram.spring.springwolf.events.Customer"
},
"messages": [
{
"$ref": "#/channels/io.eventuate.tram.spring.springwolf.events.Customer/messages/io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent"
}
]
},
"io.eventuate.tram.spring.springwolf.events.OrderEventConsumer.handleOrderCreatedEvent": {
"action": "receive",
"channel": {
"$ref": "#/channels/orderServiceEvents"
},
"messages": [
{
"$ref": "#/channels/orderServiceEvents/messages/io.eventuate.tram.spring.springwolf.events.OrderCreatedEvent"
}
]
},
"receive-customerServiceEvents-io.eventuate.tram.spring.springwolf.events.Customer": {
"action": "receive",
"channel": {
"$ref": "#/channels/io.eventuate.tram.spring.springwolf.events.Customer"
},
"messages": [
{
"$ref": "#/channels/io.eventuate.tram.spring.springwolf.events.Customer/messages/io.eventuate.tram.spring.springwolf.events.CustomerCreatedEvent"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment