Do you know any formats/specifications for describing asynchronous interactions?
sobes.tech AI
Answer from AI
Asynchronous interactions are often described using several formats and specifications:
-
AsyncAPI — an open standard similar to OpenAPI but designed for event-driven and asynchronous APIs. It allows documenting message channels, protocols, data schemas, etc.
-
OpenAPI with Webhook support — although primarily for synchronous REST APIs, recent versions include the ability to describe webhooks, partially covering asynchronous scenarios.
-
WSDL with WS-Addressing and WS-Eventing support — for SOAP services that involve asynchronous calls and events.
-
Protocol Buffers with gRPC — gRPC supports streaming and asynchronous calls, although the specification itself does not describe interactions but rather the format and protocol.
-
BPMN (Business Process Model and Notation) — for modeling business processes, including asynchronous messages and events.
Example of using AsyncAPI (fragment):
asyncapi: '2.0.0'
info:
title: Example Async API
version: '1.0.0'
channels:
user/signedup:
subscribe:
message:
payload:
type: object
properties:
userId:
type: string