pub struct ElixirGenerator { /* private fields */ }Implementations§
Source§impl ElixirGenerator
impl ElixirGenerator
pub fn new(spec: OpenAPI, style: ElixirDtoStyle) -> Self
Trait Implementations§
Source§impl OpenApiGenerator for ElixirGenerator
impl OpenApiGenerator for ElixirGenerator
Source§fn registry(&self) -> &SchemaRegistry
fn registry(&self) -> &SchemaRegistry
Get the schema registry for reference resolution
Source§fn generate_header(&self) -> String
fn generate_header(&self) -> String
Generate the file header (imports, module declaration, etc.)
Source§fn generate_models(&self) -> Result<String>
fn generate_models(&self) -> Result<String>
Generate data models/DTOs from
OpenAPI componentsSource§fn generate_routes(&self) -> Result<String>
fn generate_routes(&self) -> Result<String>
Generate route handlers from
OpenAPI pathsGenerate file footer (bootstrap, exports, etc.)
Source§fn iter_paths<F>(&self, f: F) -> Result<()>
fn iter_paths<F>(&self, f: F) -> Result<()>
Iterate over all paths in the spec and apply a function to each operation
Source§fn iter_schemas<F>(&self, f: F) -> Result<()>
fn iter_schemas<F>(&self, f: F) -> Result<()>
Iterate over all component schemas and apply a function to each
Source§fn extract_request_body_type(&self, operation: &Operation) -> Option<String>
fn extract_request_body_type(&self, operation: &Operation) -> Option<String>
Extract request body type from operation (looks for application/json)
Source§fn extract_response_type(&self, operation: &Operation) -> String
fn extract_response_type(&self, operation: &Operation) -> String
Extract response type from operation (looks for 200/201 responses)
Source§fn extract_type_from_schema_ref(
&self,
schema_ref: &ReferenceOr<Schema>,
) -> String
fn extract_type_from_schema_ref( &self, schema_ref: &ReferenceOr<Schema>, ) -> String
Extract type name from a schema reference or inline schema
Source§fn format_type_name(&self, name: &str) -> String
fn format_type_name(&self, name: &str) -> String
Format a type name according to language conventions (
PascalCase by default)Source§fn default_response_type(&self) -> String
fn default_response_type(&self) -> String
Return the language’s default response type (e.g., “dict[str, Any]”, “Record<string, unknown>”)
Auto Trait Implementations§
impl Freeze for ElixirGenerator
impl RefUnwindSafe for ElixirGenerator
impl Send for ElixirGenerator
impl Sync for ElixirGenerator
impl Unpin for ElixirGenerator
impl UnsafeUnpin for ElixirGenerator
impl UnwindSafe for ElixirGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more