summaryrefslogtreecommitdiff
path: root/src/bin/cli.rs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-10 14:14:54 -0600
committermo khan <mo@mokhan.ca>2025-07-10 14:14:54 -0600
commit8dcd2807ee81dc65e872e0d62273cdc7cee58ed2 (patch)
tree8233edd84da1031294ca161fd7d5bba9a248ee75 /src/bin/cli.rs
parent13be2a41026e065db2ebe81b41817ad2e376b2cf (diff)
chore: validate the generated entities.json
Diffstat (limited to 'src/bin/cli.rs')
-rw-r--r--src/bin/cli.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bin/cli.rs b/src/bin/cli.rs
index 0751ed05..fc70ae82 100644
--- a/src/bin/cli.rs
+++ b/src/bin/cli.rs
@@ -53,8 +53,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
} => {
let repository = EntitiesRepository::new(Api::new(token, host));
let entities = repository.all(project).await?;
+ EntitiesRepository::is_valid(&entities)?;
let json = serde_json::to_string_pretty(&entities)?;
- std::fs::write(output, json)?;
+ std::fs::write(&output, json)?;
+
+ println!(
+ "Successfully generated {} entities to {}",
+ entities.len(),
+ output
+ );
}
}