diff --git a/rust/agama-lib/share/profile.schema.json b/rust/agama-lib/share/profile.schema.json index d7f10b68cf..45bf2266fb 100644 --- a/rust/agama-lib/share/profile.schema.json +++ b/rust/agama-lib/share/profile.schema.json @@ -1008,9 +1008,14 @@ "description": "Action to use for the question.", "type": "string" }, + "answer": { + "description": "Action to use for the question. Prefer using \"action\" instead.", + "type": "string", + "deprecated": true + }, "value": { "title": "Predefined question value", - "description": "Value to use for the question.", + "description": "Value to use for the question (depending on the type of the question).", "type": "string" } } diff --git a/rust/agama-utils/src/api/question.rs b/rust/agama-utils/src/api/question.rs index e856d7351d..1075b29fa3 100644 --- a/rust/agama-utils/src/api/question.rs +++ b/rust/agama-utils/src/api/question.rs @@ -342,6 +342,7 @@ impl Action { /// on the question field. #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, utoipa::ToSchema)] pub struct Answer { + #[serde(alias = "answer")] pub action: String, #[serde(alias = "password")] pub value: Option,