Generates one module per resource with one function per operation.
defmodule OpenAI.Models do
@retrieve_operation %{method: :get, path: "/models/{model}", ...}
@spec retrieve(String.t(), keyword()) :: {:ok, OpenAI.Schemas.Model.t()} | {:error, Infusion.Runtime.Error.t()}
def retrieve(model, opts \\ []), do: OpenAI.__request__(@retrieve_operation, [model], %{}, opts)
def retrieve!(model, opts \\ []), do: ...
endPath parameters are positional. Query, header and body parameters are one
map or keyword list, params; operations that take none have no params
argument. Call options (timeout:, max_retries:, raw:, ...) come last.
The operation itself is data handed to Infusion.Runtime.Request.
Summary
Functions
Renders the operations of ir under base ("OpenAI"), with modules
the schema-name-to-module mapping from Infusion.Gen.Schemas.render/2.
Functions
@spec render( %Infusion.IR{ auth: term(), operations: term(), schemas: term(), servers: term(), warnings: term() }, String.t(), %{required(String.t()) => String.t()} ) :: [Infusion.Gen.Schemas.file()]
Renders the operations of ir under base ("OpenAI"), with modules
the schema-name-to-module mapping from Infusion.Gen.Schemas.render/2.