API Reference infusion v#0.1.0

Copy Markdown View Source

Modules

Generates Elixir SDKs from OpenAPI specs.

Generates one module per resource with one function per operation.

Works out how a list operation pages, from its parameters and response.

Generates the files around the API modules: the client module, mix.exs, .formatter.exs, .gitignore and a README.

Generates one module per named schema.

The intermediate representation: what the code generator reads, instead of the spec. Built from a document that went through Infusion.Ref and Infusion.Normalize.

A request body: its preferred content type and the others accepted.

A property of an object schema.

One API call.

A path, query, header or cookie parameter.

A response for one status (or :default). schema is the body's schema (JSON preferred); a response that can also stream (text/event-stream) has streaming? set and the schema of each event in stream_schema.

A schema, classified.

Turns OpenAPI names into Elixir module and function names.

Rewrites the schemas of a resolved document (see Infusion.Ref) into one canonical form, so the rest of the generator only ever sees one shape.

Resolves $refs in an OpenAPI document.

Loads an OpenAPI document from a file or a URL.

Mix Tasks

Generates an Elixir SDK, as a Mix project, from an OpenAPI 3.0 or 3.1 spec.