From 12a6846a03c5966bf8e95c340ea79c59fc0d96f8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 24 Feb 2021 13:34:06 +0100 Subject: [PATCH] fix AllOfSchema::lookup to allow nesting Signed-off-by: Wolfgang Bumiller --- proxmox/src/api/schema.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxmox/src/api/schema.rs b/proxmox/src/api/schema.rs index 86bcb7bd..e44a8745 100644 --- a/proxmox/src/api/schema.rs +++ b/proxmox/src/api/schema.rs @@ -505,6 +505,11 @@ impl AllOfSchema { pub fn lookup(&self, key: &str) -> Option<(bool, &Schema)> { for entry in self.list { match entry { + Schema::AllOf(s) => { + if let Some(v) = s.lookup(key) { + return Some(v); + } + } Schema::Object(s) => { if let Some(v) = s.lookup(key) { return Some(v);