pub struct OpenApiParserOptions {Show 13 fields
pub generate_client: bool,
pub generate_validation: bool,
pub derive_serde: bool,
pub derive_default: bool,
pub make_fields_optional: bool,
pub max_depth: usize,
pub include_tags: Option<HashSet<String>>,
pub exclude_tags: Option<HashSet<String>>,
pub generate_builders: bool,
pub generate_docs: bool,
pub type_prefix: Option<String>,
pub type_suffix: Option<String>,
pub module_name: String,
}Expand description
Options for configuring the OpenAPI parser
Fields§
§generate_client: boolGenerate API client traits
generate_validation: boolGenerate validation derives and attributes
derive_serde: boolAdd serde derives to generated structs
derive_default: boolAdd Default derive to generated structs
make_fields_optional: boolMake all fields optional (wrap in Option
max_depth: usizeMaximum depth for nested schemas (prevents infinite recursion)
Tag names to filter (only include these tags)
Tag names to exclude
generate_builders: boolGenerate builder pattern for request types
generate_docs: boolAdd documentation comments from OpenAPI descriptions
type_prefix: Option<String>Prefix for generated type names
type_suffix: Option<String>Suffix for generated type names
module_name: StringModule name for generated code
Implementations§
Source§impl OpenApiParserOptions
impl OpenApiParserOptions
Sourcepub fn builder() -> OpenApiParserOptionsBuilder
pub fn builder() -> OpenApiParserOptionsBuilder
Create a new builder for parser options
Sourcepub fn should_include_tag(&self, tag: &str) -> bool
pub fn should_include_tag(&self, tag: &str) -> bool
Check if a tag should be included
Sourcepub fn format_type_name(&self, name: &str) -> String
pub fn format_type_name(&self, name: &str) -> String
Apply prefix and suffix to type name
Trait Implementations§
Source§impl Clone for OpenApiParserOptions
impl Clone for OpenApiParserOptions
Source§fn clone(&self) -> OpenApiParserOptions
fn clone(&self) -> OpenApiParserOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenApiParserOptions
impl Debug for OpenApiParserOptions
Auto Trait Implementations§
impl Freeze for OpenApiParserOptions
impl RefUnwindSafe for OpenApiParserOptions
impl Send for OpenApiParserOptions
impl Sync for OpenApiParserOptions
impl Unpin for OpenApiParserOptions
impl UnsafeUnpin for OpenApiParserOptions
impl UnwindSafe for OpenApiParserOptions
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