mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-15 08:33:12 +00:00
Compare commits
6 Commits
main-v2
...
1686a/openapi
| Author | SHA1 | Date | |
|---|---|---|---|
| 45f44023a8 | |||
| 173a54a83c | |||
| 41c943a6b1 | |||
| 84c1e189c4 | |||
| dc8355d0f3 | |||
| 1c12ca4caf |
@@ -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": {
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user