feat(meta): add _meta field to prompts, resources and paginated result (#558)

This commit is contained in:
Pavel Bezglasny 2025-12-04 02:38:47 +01:00 • committed by GitHub
commit 81411fc12d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -828,6 +828,8 @@ macro_rules! paginated_result {
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct $t {
#[serde(rename = "_meta", skip_serializing_if = "Option::is_none")]
pub meta: Option<Meta>,
#[serde(skip_serializing_if = "Option::is_none")]
pub next_cursor: Option<Cursor>,
pub $i_item: $t_item,
@ -838,6 +840,7 @@ macro_rules! paginated_result {
items: $t_item,
) -> Self {
Self {
meta: None,
next_cursor: None,
$i_item: items,
}