feat: add JSON output to render command (12.11)#393
Merged
Conversation
Member
Author
|
ACK 2acceaf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements roadmap task 12.11 — adds JSON output format support to the
rendercommand.Changes
New Files (4)
src/presentation/cli/views/commands/render/mod.rs— module wiring following Strategy Patternsrc/presentation/cli/views/commands/render/view_data/render_details.rs—RenderDetailsDataDTO withfrom_result()constructorsrc/presentation/cli/views/commands/render/views/json_view.rs—JsonView(5 unit tests)src/presentation/cli/views/commands/render/views/text_view.rs—TextViewpreserving existing output style (4 unit tests)Modified Files (4)
src/presentation/cli/views/commands/mod.rs— addedpub mod render;src/presentation/cli/controllers/render/handler.rs— addedoutput_formatparam toexecute(), replacedshow_success()withcomplete_workflow()view dispatch, removed unuseduser_outputstruct fieldsrc/presentation/cli/dispatch/router.rs— reads and passesoutput_formattoexecute()docs/user-guide/commands/render.md— added JSON Output section with example and field tableJSON 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
cargo run --bin linter all)cargo machete— no unused dependenciescargo doc— no rustdoc errorsRelated
rendercommand (12.11) #392