AsyncApiSpex.Spec behaviour (async_api_spex v0.1.0)

Copy Markdown View Source

Behaviour for a module that returns a static AsyncAPI document.

AsyncApiSpex.Plug.RenderSpec and mix async_api_spex.gen both call spec/0. Applications whose channels are known only at runtime do not implement this behaviour; they build the AsyncApiSpex.Document themselves.

Summary

Callbacks

Returns the AsyncAPI document to serve or serialize.

Callbacks

spec()

@callback spec() :: AsyncApiSpex.Document.t()

Returns the AsyncAPI document to serve or serialize.