modify schema in a compatible way to maybe fix typescript sdk

This commit is contained in:
trinity-1686a
2026-03-05 00:13:55 +01:00
parent 582b168b6a
commit 1c12ca4caf
2 changed files with 29 additions and 23 deletions
+5 -2
View File
@@ -3922,6 +3922,11 @@
} }
}, },
{ {
"$ref": "#/components/schemas/NodeRoleUpdate"
}
]
},
"NodeRoleUpdate": {
"allOf": [ "allOf": [
{ {
"$ref": "#/components/schemas/NodeAssignedRole" "$ref": "#/components/schemas/NodeAssignedRole"
@@ -3939,8 +3944,6 @@
} }
} }
] ]
}
]
}, },
"NodeUpdateTrackers": { "NodeUpdateTrackers": {
"type": "object", "type": "object",
+5 -2
View File
@@ -293,13 +293,16 @@ pub enum NodeRoleChangeOpenapi {
/// Set `remove` to `true` to remove the node from the layout /// Set `remove` to `true` to remove the node from the layout
remove: bool, remove: bool,
}, },
Update(NodeRoleUpdate),
}
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
Update { pub struct NodeRoleUpdate {
/// ID of the node for which this change applies /// ID of the node for which this change applies
id: String, id: String,
#[serde(flatten)] #[serde(flatten)]
role: NodeAssignedRole, role: NodeAssignedRole,
},
} }
#[utoipa::path(post, #[utoipa::path(post,