remove manual list for json schema

This commit is contained in:
Owen Lin
2025-11-01 10:00:24 -07:00
parent 2bd507c6fb
commit 473600a75b
2 changed files with 98 additions and 109 deletions
@@ -82,6 +82,15 @@ macro_rules! client_request_definitions {
)*
Ok(())
}
pub fn export_client_param_schemas(
out_dir: &::std::path::Path,
) -> ::anyhow::Result<()> {
$(
crate::export::write_json_schema::<$params>(out_dir, stringify!($params))?;
)*
Ok(())
}
};
}
@@ -284,6 +293,15 @@ macro_rules! server_request_definitions {
}
Ok(())
}
pub fn export_server_param_schemas(
out_dir: &::std::path::Path,
) -> ::anyhow::Result<()> {
paste! {
$(crate::export::write_json_schema::<[<$variant Params>]>(out_dir, stringify!([<$variant Params>]))?;)*
}
Ok(())
}
};
}