Skip to content

feat: add JSON output to render command (12.11)#393

Merged
josecelano merged 1 commit into
mainfrom
392-add-json-output-to-render-command
Feb 26, 2026
Merged

feat: add JSON output to render command (12.11)#393
josecelano merged 1 commit into
mainfrom
392-add-json-output-to-render-command

Conversation

@josecelano

Copy link
Copy Markdown
Member

Summary

Implements roadmap task 12.11 — adds JSON output format support to the render command.

Changes

New Files (4)

  • src/presentation/cli/views/commands/render/mod.rs — module wiring following Strategy Pattern
  • src/presentation/cli/views/commands/render/view_data/render_details.rsRenderDetailsData DTO with from_result() constructor
  • src/presentation/cli/views/commands/render/views/json_view.rsJsonView (5 unit tests)
  • src/presentation/cli/views/commands/render/views/text_view.rsTextView preserving existing output style (4 unit tests)

Modified Files (4)

  • src/presentation/cli/views/commands/mod.rs — added pub mod render;
  • src/presentation/cli/controllers/render/handler.rs — added output_format param to execute(), replaced show_success() with complete_workflow() view dispatch, removed unused user_output struct field
  • src/presentation/cli/dispatch/router.rs — reads and passes output_format to execute()
  • docs/user-guide/commands/render.md — added JSON Output section with example and field table

JSON Output

{
  "environment_name": "my-environment",
  "config_source": "Config file: envs/my-environment.json",
  "target_ip": "192.168.1.100",
  "output_dir": "/tmp/build/my-environment"
}

Verification

  • ✅ 422 tests pass (5 new)
  • ✅ All linters pass (cargo run --bin linter all)
  • cargo machete — no unused dependencies
  • cargo doc — no rustdoc errors

Related

@josecelano josecelano self-assigned this Feb 26, 2026
@josecelano

Copy link
Copy Markdown
Member Author

ACK 2acceaf

@josecelano josecelano merged commit a0c4bb8 into main Feb 26, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JSON output to render command (12.11)

1 participant