All notable changes to async_api_spex will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.2.0 - 2026-10-14
Added
use AsyncApiSpex.Schema, fields: [...]derives a schema from an existingdefstruct; every struct key becomes a property andfields:refines it with a type,required, and adescription.title:anddescription:describe the schema.use AsyncApiSpex.Channeldeclares a channel, the server it lives on, and its operation on the module that publishes to it or consumes from it.use AsyncApiSpex.Specimplementsspec/0by assembling a document from channel modules, listed withchannels:or discovered withotp_app:.AsyncApiSpex.Plug.Viewerserves an HTML page that renders a document in the browser with the AsyncAPI React component (pinned to 3.2.1 on unpkg;:bundle_urland:stylesheet_urlpoint it at a self-hosted copy). Mount it next toAsyncApiSpex.Plug.RenderSpecwithpath:set to that mount.- CI scaffolds a fresh
mix newapp that depends on nothing but this library andplug, decorates a producer and a consumer, and serves, validates, and writes the document, so the library is proven outside the repository it lives in.
Changed
use AsyncApiSpex.Schemawithout:schemaor:fieldsnow raises "requires exactly one of :schema or :fields".AsyncApiSpex.validate/1is stricter. A document with a component schema that holds a module that does notuse AsyncApiSpex.Schemanow failsvalidate/1andmix async_api_spex.gen.
Fixed
- A schema that references itself no longer makes the resolver loop forever.
0.1.0 - 2026-10-02
Added
- Structs modelling the AsyncAPI 3.0 document:
AsyncApiSpex.Document,.Info,.Server,.Channel,.Parameter,.Operation,.Message,.CorrelationId,.Tag,.Reference, and.Components. use AsyncApiSpex.Schemaanduse AsyncApiSpex.Messagefor declaring reusable schemas and messages, compiled into components at resolve time.AsyncApiSpex.resolve/1,to_map/1,encode!/1, andvalidate/1, with component extraction, lowerCamel JSON encoding, and named validation errors.AsyncApiSpex.Plug.RenderSpec, a Plug that serves an encoded document with theapplication/asyncapi+jsoncontent type.mix async_api_spex.gento validate a spec module and write its document to a file.