Skip to content

Commit 864c180

Browse files
committed
Add raw_object_list_schema
1 parent 90dc260 commit 864c180

File tree

1 file changed

+11
-0
lines changed
  • crates/stackable-operator/src/utils

1 file changed

+11
-0
lines changed

crates/stackable-operator/src/utils/crds.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ pub fn raw_object_schema(_: &mut schemars::gen::SchemaGenerator) -> Schema {
88
.expect("Failed to parse JSON of custom raw object schema")
99
}
1010

11+
pub fn raw_object_list_schema(_: &mut schemars::gen::SchemaGenerator) -> Schema {
12+
serde_json::from_value(serde_json::json!({
13+
"type": "array",
14+
"items": {
15+
"type": "object",
16+
"x-kubernetes-preserve-unknown-fields": true,
17+
}
18+
}))
19+
.expect("Failed to parse JSON of custom raw object list schema")
20+
}
21+
1122
#[cfg(test)]
1223
mod tests {
1324
use k8s_openapi::api::core::v1::PodTemplateSpec;

0 commit comments

Comments
 (0)