Skip to content

Commit 319549d

Browse files
committed
fix: detect status properties in the root schema
1 parent 03d9ac2 commit 319549d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,13 @@ impl Kopium {
270270
if scope == "Namespaced" {
271271
println!(r#"#[kube(namespaced)]"#);
272272
}
273-
if version.subresources.as_ref().is_some_and(|c| c.status.is_some())
273+
if (version.subresources.as_ref().is_some_and(|c| c.status.is_some())
274+
|| version
275+
.schema
276+
.as_ref()
277+
.and_then(|c| c.open_api_v3_schema.as_ref())
278+
.and_then(|c| c.properties.as_ref())
279+
.is_some_and(|c| c.contains_key("status")))
274280
&& self.has_status_resource(&structs)
275281
{
276282
println!(r#"#[kube(status = "{}Status")]"#, kind);

0 commit comments

Comments
 (0)