Skip to content

Commit b74ef15

Browse files
authored
feat: use better default for openapi/rust client (#958)
The OpenAPI-generated Rust client by default wraps types in `Box<T>`, which can get annoying pretty fast, in everything from `.into()` or `Box::new` on object construction to having to do `.as_ref()` on every `match` construct. Setting `avoidBoxedModels=true` makes this behavior much more sane.
1 parent 1e911e7 commit b74ef15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/baml-runtime/src/cli/init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ fn generate_main_baml_content(
149149
"{cmd} --additional-properties gemName=baml_client",
150150
),
151151
Some("rust") => format!(
152-
"{cmd} --additional-properties packageName=baml-client",
152+
"{cmd} --additional-properties packageName=baml-client,avoidBoxedModels=true",
153153
),
154154
_ => cmd,
155155
};

0 commit comments

Comments
 (0)