Skip to content

Commit

Permalink
Implemented crdgen json output (#69)
Browse files Browse the repository at this point in the history
* chore: implemented crdgen json output

* chore: implemented crdgen json output
  • Loading branch information
paulobressan authored Sep 23, 2024
1 parent 117c631 commit 637c86f
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 kube::CustomResourceExt;
use operator::controller;

fn main() {
let args: Vec<String> = std::env::args().collect();
if args.len() > 1 && args[1] == "json" {
print!(
"{}",
serde_json::to_string_pretty(&controller::OgmiosPort::crd()).unwrap()
);
return;
}

print!(
"{}",
serde_yaml::to_string(&controller::OgmiosPort::crd()).unwrap()
Expand Down

0 comments on commit 637c86f

Please sign in to comment.