fix AllOfSchema::lookup to allow nesting

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-02-24 13:34:06 +01:00
parent bd4f9a313b
commit 12a6846a03

View File

@ -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);