View Source ExOpenAI.Codegen.TypespecGenerator (ex_openai.ex v2.0.0-beta2)

Generates Elixir typespecs from OpenAPI Schema structs.

Summary

Functions

Converts a Schema struct into an Elixir typespec AST.

Functions

Link to this function

schema_to_typespec(schema, schemas \\ %{})

View Source
@spec schema_to_typespec(ExOpenAI.Codegen.DocsParser.Schema.t(), %{
  optional(String.t()) => ExOpenAI.Codegen.DocsParser.Schema.t()
}) :: Macro.t()

Converts a Schema struct into an Elixir typespec AST.