Infusion.Gen.Project (infusion v0.1.0)

Copy Markdown View Source

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

Summary

Functions

render(ir, base, document, opts \\ [])

@spec render(
  %Infusion.IR{
    auth: term(),
    operations: term(),
    schemas: term(),
    servers: term(),
    warnings: term()
  },
  String.t(),
  map(),
  keyword()
) :: [Infusion.Gen.Schemas.file()]

Options:

  • :app: the OTP app (default: <name>_sdk, e.g. :openai_sdk)
  • :version: the SDK's version (default "0.1.0")
  • :license: the SDK's license for Hex (default "Apache-2.0")
  • :env_var: where the API key is read from (default OPENAI_API_KEY)
  • :runtime_dep: the infusion_runtime dependency as code (default {:infusion_runtime, "~> 0.1.0"}), e.g. a path: dependency