feat: endpoints for config management via goose-server (#1207)

Co-authored-by: Lily Delalande <ldelalande@squareup.com>
This commit is contained in:
Alex Hancock
2025-02-12 21:19:13 -05:00
committed by GitHub
parent e461e6845d
commit 9287eaeb5d
14 changed files with 569 additions and 6 deletions
@@ -0,0 +1,22 @@
use goose_server::openapi;
use std::env;
use std::fs;
fn main() {
let schema = openapi::generate_schema();
// Get the current working directory
let current_dir = env::current_dir().unwrap();
let output_path = current_dir.join("ui").join("desktop").join("openapi.json");
// Ensure parent directory exists
if let Some(parent) = output_path.parent() {
fs::create_dir_all(parent).unwrap();
}
fs::write(&output_path, schema).unwrap();
println!(
"Successfully generated OpenAPI schema at {}",
output_path.display()
);
}