Skip to content

Commit f13a751

Browse files
committed
chore: Add a crude fix to code that will be removed in a later commit
1 parent e91665b commit f13a751

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

kube-core/src/schema.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,12 @@ fn hoist_any_of_option_enum(incoming: SchemaObject) -> SchemaObject {
562562
.any_of
563563
.clone();
564564
// Bring across the properties, etc...
565-
// Is this ok?
566-
new_schema.object = to_hoist.object.clone();
565+
// Is this ok? Or should we just replace properties with sub properties?
566+
// Or should we carefully copy the property entries over in case there are existing entries?
567+
// new_schema.object = to_hoist.object.clone();
568+
if let Some(to_hoist_object) = &to_hoist.object {
569+
new_schema.object.get_or_insert_default().properties = to_hoist_object.properties.clone();
570+
}
567571
} else if to_hoist
568572
.subschemas
569573
.as_ref()

0 commit comments

Comments
 (0)