Skip to content

Specification models

from litestar_asyncapi.spec import AsyncAPI, Channel, Message, Operation, Schema

The generator builds a document from these dataclasses, and AsyncAPIConfig accepts them for servers, components and traits. Each model serializes to the AsyncAPI wire format through to_schema, which camel-cases field names and leaves out fields that were never set.