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
+27
View File
@@ -0,0 +1,27 @@
use utoipa::OpenApi;
#[allow(dead_code)] // Used by utoipa for OpenAPI generation
#[derive(OpenApi)]
#[openapi(
paths(
super::routes::config_management::upsert_config,
super::routes::config_management::remove_config,
super::routes::config_management::read_config,
super::routes::config_management::add_extension,
super::routes::config_management::remove_extension,
super::routes::config_management::read_all_config
),
components(schemas(
super::routes::config_management::UpsertConfigQuery,
super::routes::config_management::ConfigKeyQuery,
super::routes::config_management::ExtensionQuery,
super::routes::config_management::ConfigResponse
))
)]
pub struct ApiDoc;
#[allow(dead_code)] // Used by generate_schema binary
pub fn generate_schema() -> String {
let api_doc = ApiDoc::openapi();
serde_json::to_string_pretty(&api_doc).unwrap()
}