Skip to content

Add JSON output to render command (12.11) #392

Description

@josecelano

Overview

Add JSON output format support to the render command (roadmap task 12.11). Part of Phase 2 of the JSON output epic (#348).

The render command generates deployment artifacts (docker-compose files, Ansible playbooks, tracker config, etc.) without executing any infrastructure operations. Its JSON output contains the artifact generation result: environment name, configuration source, target IP, and output directory.

Rationale

Contains the list of generated artifact paths and their destinations. Enables automation to locate and process the generated files programmatically without parsing human-readable success messages.

Specification

See detailed specification: docs/issues/392-add-json-output-to-render-command.md

(File will be committed and renamed with the real issue number.)

JSON Output Format

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

Tasks

  • Create RenderDetailsData view DTO
  • Implement JsonView for render command
  • Implement TextView (preserving current show_success output)
  • Add output_format: OutputFormat parameter to execute()
  • Update router to pass output_format
  • Add unit tests for both views
  • Update docs/user-guide/commands/render.md
  • All linters pass (cargo run --bin linter all)

Related

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions