Skip to content

Commit

Permalink
chore: implemented crdgen json output (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan authored Sep 23, 2024
1 parent 69526d6 commit 9ac856f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions operator/src/crdgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ use ext_cardano_dbsync::controller;
use kube::CustomResourceExt;

fn main() {
let args: Vec<String> = 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()
Expand Down

0 comments on commit 9ac856f

Please sign in to comment.