OpenAPI plugin: allow an operation to both be received and trigger an outbound message (e.g. a command published to a queue)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- openapi, typescript
Research direction
Start by locating the OpenAPI generator handling for x-eventcatalog-message-action and the existing consumers feature. Define how x-eventcatalog-sends resolves message id/version and handles missing messages, then verify that the operation retains its receives entry while adding outbound messages to the service's sends list.
Written by the indexing model from the issue text.
Description
Use Case
Today x-eventcatalog-message-action is an either/or choice: an operation is documented as either sends or receives. In a common async pattern neither option alone is correct.
Use case
Our API accepts a synchronous command (e.g. POST /orders → PlaceOrder). The HTTP handler does not do the actual work: it validates the request and sends a different command onto a queue (e.g. ProcessOrder), which is picked up by a worker that performs the real processing.
We want the catalog to show both hops:
Client → PlaceOrder (HTTP command, received by Orders API) → Orders API → ProcessOrder (command on queue) → Order Worker
Right now we can only document one side. Marking the operation sends hides that the API receives the HTTP command; leaving it as receives hides the queue hop entirely, so the visualiser stops at the API and the async part of the flow is invisible.
Proposed Solution
Allow an operation to declare outbound messages in addition to its own action, referencing messages that already exist in the catalog (typically generated by the AsyncAPI generator) by id and optional version:
paths:
/orders:
post:
summary: Place an order
operationId: placeOrder
x-eventcatalog-message-type: command
x-eventcatalog-message-action: receives # unchanged, still documented
# New: what handling this operation publishes
x-eventcatalog-sends:
- id: process-order
version: 1.0.0
The generator would add these messages to the service's sends list, leaving the existing receives entry intact. Semantics could mirror the existing consumers feature: look up the message by id/version, skip (with a warning) if it does not exist, and document the ordering requirement that the generator producing those messages must run first.
Implementation Notes
No response
Community Notes
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.
- If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out in the EventCatalog Discord.
- Dominant language
- TypeScript
- Stars
- 15
- Forks
- 16
- Avg merge
- 2m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from event-catalog/generators
-
Difficulty 4/5 3-5 days Newbie friendliness 56/100
event-catalog/generators#458 ·
-
generator-asyncapi: option to default message (and channel) versions to the document's info.versionOpen
Difficulty 4/5 3-5 days Newbie friendliness 55/100
event-catalog/generators#457 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
event-catalog/generators#451 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
event-catalog/generators#450 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
event-catalog/generators#444 ·
All issues in event-catalog/generators
Similar issues
-
Plugin: sheet music can't be scrolled by hand before playbackPossibly taken @snakajima claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
receptron/jinglescript#51 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 9 days
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openclaw/openclaw#186424 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
chore(worker): five module header comments describe the code from before later issues changed itOpenarea:dev U2-later
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bentleypark/aiwatch#1824 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Pal-AI-Lab/Coopanion#469 ·
Maintainers usually reply within 1 day