Repository navigation
async_api_spex-v0.2.0
·
106 commits
to main
since this release
Added
use AsyncApiSpex.Schema, fields: [...]derives a schema from an existing
defstruct; 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 fails
validate/1andmix async_api_spex.gen.
Fixed
- A schema that references itself no longer makes the resolver loop forever.