Skip to main content

AsyncAPI

AsyncAPI - https://www.asyncapi.com- is an open-source initiative that provides both a specification to describe and document your asynchronous applications in a machine-readable format. |

In Mosaic, all commands and events are defined using AsyncAPI and underlying JSON Schemas, so that developers can enjoy strongly-typed development also for asynchronous communication.

By defining strongly typed messages, AsyncAPI enables automatic validation of message payloads, ensuring each message conforms to the defined schema before being processed. This validation is particularly useful for handling errors and ensuring data integrity.

AsyncAPI tools can generate code for multiple languages, creating client and server code that includes strongly typed message handling based on the AsyncAPI specification. This code generation ensures consistency between the message definitions and their implementations across different services.