pub struct GeneratorConfig {Show 19 fields
pub spec_path: PathBuf,
pub output_dir: PathBuf,
pub module_name: String,
pub enable_sse_client: bool,
pub enable_async_client: bool,
pub enable_specta: bool,
pub type_mappings: BTreeMap<String, String>,
pub streaming_config: Option<StreamingConfig>,
pub nullable_field_overrides: BTreeMap<String, bool>,
pub extensible_enum_overrides: BTreeMap<String, bool>,
pub schema_extensions: Vec<PathBuf>,
pub http_client_config: Option<HttpClientConfig>,
pub retry_config: Option<RetryConfig>,
pub tracing_enabled: bool,
pub auth_config: Option<AuthConfig>,
pub enable_registry: bool,
pub registry_only: bool,
pub types: TypeMappingConfig,
pub server: Option<ServerSection>,
}Fields§
§spec_path: PathBufPath to OpenAPI specification file
output_dir: PathBufOutput directory for generated code (e.g., “src/gen”)
module_name: StringInformational label for the generated module. Does NOT pick
the on-disk directory (that’s output_dir) or the Rust module
path the user mounts the tree at — both of those are the
user’s choice. The label is surfaced in the generated mod.rs
header as a hint and is otherwise used only by the streaming
codegen for naming the SSE client module.
enable_sse_client: boolEnable SSE streaming client generation
enable_async_client: boolEnable async HTTP client generation
enable_specta: boolEnable Specta type derives for frontend integration
type_mappings: BTreeMap<String, String>Custom type mappings
streaming_config: Option<StreamingConfig>Optional streaming configuration for SSE client generation
nullable_field_overrides: BTreeMap<String, bool>Fields that should be treated as nullable even if not marked in the spec Format: “SchemaName.fieldName” -> true
extensible_enum_overrides: BTreeMap<String, bool>String-enum schemas that should be rendered as extensible (with a
Custom(String) fallback variant) instead of closed enums. Useful when
the spec declares a fixed set of values but the API actually returns
values outside that set (real-world drift: Cloudflare’s r2_bucket_location
declares lowercase but returns uppercase).
Format: “SchemaName” -> true
schema_extensions: Vec<PathBuf>Additional schema extension files to merge into the main spec These files will be merged additively using simple JSON object merging
http_client_config: Option<HttpClientConfig>HTTP client configuration
retry_config: Option<RetryConfig>Retry configuration for HTTP requests
tracing_enabled: boolEnable request/response tracing
auth_config: Option<AuthConfig>Authentication configuration
enable_registry: boolEnable operation registry generation (static metadata for CLI/proxy routing)
registry_only: boolGenerate only the operation registry (skip types, client, streaming)
types: TypeMappingConfigPer-format type-mapping strategies driven by the [generator.types]
TOML section. Q2.0 introduces this field; with the default value
every mapping preserves pre-refactor behavior.
server: Option<ServerSection>Opt-in server codegen scope. None ⇒ emit no server code.
Set by the [server] section in the TOML config.
Trait Implementations§
Source§impl Clone for GeneratorConfig
impl Clone for GeneratorConfig
Source§fn clone(&self) -> GeneratorConfig
fn clone(&self) -> GeneratorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more