Show missing schema ref (#325)

This commit is contained in:
John Vandenberg 2023-02-21 08:11:35 +08:00 committed by GitHub
parent 91ca1a3125
commit 82c979df65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -28,7 +28,10 @@ impl<T: ComponentLookup> ReferenceOrExt<T> for openapiv3::ReferenceOr<T> {
let key = &reference[idx + 1..]; let key = &reference[idx + 1..];
let parameters = let parameters =
T::get_components(components.as_ref().unwrap()); T::get_components(components.as_ref().unwrap());
parameters.get(key).unwrap().item(components) parameters
.get(key)
.unwrap_or_else(|| panic!("key {} is missing", key))
.item(components)
} }
} }
} }