Fix validator arity check

For now, this panics, but ideally, we should return a "unknown
  purpose" error when we cannot map the name to an arity.
This commit is contained in:
KtorZ
2024-08-15 17:45:26 +02:00
parent 823492c27b
commit 5cf0a4d294
3 changed files with 43 additions and 9 deletions

View File

@@ -846,13 +846,11 @@ mod tests {
let mut definitions = fixture_definitions();
definitions.insert(
&schema,
Schema::Data(Data::AnyOf(vec![
Constructor {
index: 0,
fields: vec![Declaration::Referenced(Reference::new("Bool")).into()],
}
.into(),
]))
Schema::Data(Data::AnyOf(vec![Constructor {
index: 0,
fields: vec![Declaration::Referenced(Reference::new("Bool")).into()],
}
.into()]))
.into(),
);