feat: Add global YAML output format support#89
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6fd4e81863
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
ec5b8f7 to
10888c8
Compare
niv-hertz
left a comment
There was a problem hiding this comment.
Please revert the Cargo.lock change, and also re-open this PR with signed commits and I'll approve:
74eb9af to
865764e
Compare
2fb8be9 to
08c54d1
Compare
|
@yonbek waiting for approval |
7807ff9 to
6f40022
Compare
Add `yaml` as a supported output format via `-o yaml` / `--output yaml`. Changes: - `src/config.rs`: add `Yaml` variant to `OutputFormat` enum and update `as_str()` - `src/render.rs`: implement `format_yaml`, `render_yaml`, `format_yaml_auto`, `render_yaml_auto` helpers; add unit tests for parity with JSON - All command modules under `src/commands/`: add `OutputFormat::Yaml` match arms so every output site is exhaustively handled (actions, alerts, api_keys, connectors, contextual_data, custom_enrichments, dashboards, data_archive, data_usage, dataprime, e2m, enrichments, extensions, incidents, integrations, ip_access, metrics, notification_testing, olly, parsing_rules, presets, recording_rules, retentions, roles, routers, saml, scopes, search_fields, slos, suppression_rules, tco_policies, team_groups, users, views, webhooks) Closes coralogix#78
6f40022 to
789fe07
Compare
|
Hi @niv-hertz / @OmriGabai / @yonbek , Just wanted to give this a gentle bump! I've recently rebased the branch against the latest Please let me know if there's anything else you need from me to help get this merged. Thanks for your time! |
Description
Closes #78
This PR introduces global YAML output format support to the CLI. Users can now pass
-o yamlor--output yamlto serialize command responses into YAML format, significantly improving the UX for infrastructure engineers and GitOps workflows.Files Modified:
src/config.rs: AddedYamlto theOutputFormatenum.src/render.rs: Implementedrender_yaml,format_yaml,render_yaml_auto, andformat_yaml_auto. Added unit tests to verify YAML serialization parity with JSON.src/commands/**/*.rs(Dashboards, Dataprime, API Keys, Scopes, Olly, Views, Roles, SLOs, Metrics, etc.): Wired theOutputFormat::Yamlbranch into all command execution match arms.Verification