diff --git a/operator/src/crdgen.rs b/operator/src/crdgen.rs index a3f9a52..cd50429 100644 --- a/operator/src/crdgen.rs +++ b/operator/src/crdgen.rs @@ -2,6 +2,15 @@ use ext_cardano_dbsync::controller; use kube::CustomResourceExt; fn main() { + let args: Vec = std::env::args().collect(); + if args.len() > 1 && args[1] == "json" { + print!( + "{}", + serde_json::to_string_pretty(&controller::DbSyncPort::crd()).unwrap() + ); + return; + } + print!( "{}", serde_yaml::to_string(&controller::DbSyncPort::crd()).unwrap()