View Source ExOpenAI.Codegen.PathModuleGenerator (ex_openai.ex v2.0.0-beta2)
Generates Elixir modules from parsed OpenAPI Path structs.
Groups paths by their first path segment and generates modules with functions for each operation.
Summary
Functions
Generates a single module from paths that share the same prefix.
Generates modules from a list of Path structs.
Functions
@spec generate_module(String.t() | nil, [ExOpenAI.Codegen.DocsParser.Path.t()], %{ required(String.t()) => ExOpenAI.Codegen.DocsParser.Schema.t() }) :: Macro.t()
Generates a single module from paths that share the same prefix.
@spec generate_modules([ExOpenAI.Codegen.DocsParser.Path.t()], %{ required(String.t()) => ExOpenAI.Codegen.DocsParser.Schema.t() }) :: [Macro.t()]
Generates modules from a list of Path structs.
Groups paths by their first path segment and returns a list of module ASTs.