feat(meta): add _meta field to prompts, resources and paginated result (#558)
This commit is contained in:
parent
eb5a7f7408
commit
81411fc12d
1 changed files with 195 additions and 8 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue