Compare commits

...

1 Commits

Author SHA1 Message Date
Jack Mousseau
6e8785a021 Return error when schema definitions collide 2026-03-05 10:13:01 -08:00

View File

@@ -1154,6 +1154,14 @@ fn insert_into_namespace(
.or_insert_with(|| Value::Object(Map::new()));
match entry {
Value::Object(map) => {
if let Some(existing) = map.get(&name) {
if existing != &schema {
return Err(anyhow!(
"conflicting schema definition for {namespace}/{name}"
));
}
return Ok(());
}
map.insert(name, schema);
Ok(())
}