Files
gamenight/gamenight-api-client-rs/build.rs

23 lines
798 B
Rust

use std::process::Command;
fn main() {
println!("cargo::rerun-if-changed=../backend-actix/gamenight-api.yaml");
let _ =
Command::new("openapi-generator")
.args([
"generate",
"-i",
"../backend-actix/gamenight-api.yaml",
"-g",
"rust",
"--additional-properties=\
withSeparateModelsAndApi=true,\
library=reqwest-trait,\
modelPackage=gamenight_model,\
apiPackage=gamenight_api,\
packageName=gamenight-api-client-rs,\
packageVersion=0.1.0"
])
.output()
.expect("Failed to generate models sources for the gamenight API");
}