Compare commits

...

6 Commits

Author SHA1 Message Date
trinity-1686a 45f44023a8 and again 2026-03-05 23:44:11 +01:00
trinity-1686a 173a54a83c identical but maybe valid 2026-03-05 23:41:20 +01:00
trinity-1686a 41c943a6b1 this schema is known-broken, but hey 2026-03-05 12:40:05 +01:00
trinity-1686a 84c1e189c4 this schema is known-broken, but hey 2026-03-05 11:20:42 +01:00
trinity-1686a dc8355d0f3 edit openapi by hand 😭 2026-03-05 11:03:58 +01:00
trinity-1686a 1c12ca4caf modify schema in a compatible way to maybe fix typescript sdk 2026-03-05 00:13:55 +01:00
2 changed files with 54 additions and 52 deletions
+44 -45
View File
@@ -3922,23 +3922,26 @@
} }
}, },
{ {
"allOf": [ "$ref": "#/components/schemas/NodeRoleUpdate"
{ }
"$ref": "#/components/schemas/NodeAssignedRole" ]
}, },
{ "NodeRoleUpdate": {
"type": "object", "allOf": [
"required": [ {
"id" "$ref": "#/components/schemas/NodeAssignedRole"
], },
"properties": { {
"id": { "type": "object",
"type": "string", "required": [
"description": "ID of the node for which this change applies" "id"
} ],
} "properties": {
"id": {
"type": "string",
"description": "ID of the node for which this change applies"
} }
] }
} }
] ]
}, },
@@ -4350,43 +4353,39 @@
"WorkerStateResp": { "WorkerStateResp": {
"oneOf": [ "oneOf": [
{ {
"type": "string", "$ref": "#/components/schemas/Yolo"
"enum": [ },
"busy"
]
},
{ {
"$ref": "#/components/schemas/WorkerStateRespStrs"
}
]
},
"Yolo": {
"type": "object",
"required": [
"throttled"
],
"properties": {
"throttled": {
"type": "object", "type": "object",
"required": [ "required": [
"throttled" "durationSecs"
], ],
"properties": { "properties": {
"throttled": { "durationSecs": {
"type": "object", "type": "number",
"required": [ "format": "float"
"durationSecs"
],
"properties": {
"durationSecs": {
"type": "number",
"format": "float"
}
}
} }
} }
},
{
"type": "string",
"enum": [
"idle"
]
},
{
"type": "string",
"enum": [
"done"
]
} }
}
},
"WorkerStateRespStrs": {
"type": "string",
"enum": [
"busy",
"idle",
"done"
] ]
}, },
"ZoneRedundancy": { "ZoneRedundancy": {
+10 -7
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,
}, },
#[serde(rename_all = "camelCase")] Update(NodeRoleUpdate),
Update { }
/// ID of the node for which this change applies
id: String, #[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
#[serde(flatten)] #[serde(rename_all = "camelCase")]
role: NodeAssignedRole, pub struct NodeRoleUpdate {
}, /// ID of the node for which this change applies
id: String,
#[serde(flatten)]
role: NodeAssignedRole,
} }
#[utoipa::path(post, #[utoipa::path(post,