Skip to content

Normalize multi-result commands to shared JSON output types - #279

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
json-normalize-multi-result
Jun 24, 2026
Merged

Normalize multi-result commands to shared JSON output types#279
AndreyVMarkelov merged 1 commit into
masterfrom
json-normalize-multi-result

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Consolidates cp, mv, put, get, and rm to use shared jsonOperationOutput with consistent input/results/warnings structure
  • All multi-result JSON responses now include top-level "input", "results", and "warnings": [] fields
  • Removes per-command output wrapper structs (relocationOutput, putOutputData, getOutputData, removeOutput) in favor of shared renderJSONOperationOutput helper
  • Adds newJSONOperationResult constructor and per-command converter functions
  • Updates README JSON examples to reflect the normalized schema

Test plan

  • All existing tests pass
  • Test decode helpers now assert warnings is always [] (not null)
  • New tests for renderJSONOperationOutput and newJSONOperationResult
  • gofmt, go vet, golangci-lint clean

Consolidates cp, mv, put, get, and rm to use jsonOperationOutput with
consistent input/results/warnings structure. All multi-result JSON
responses now include top-level "input", "results", and "warnings": []
fields. Removes per-command output wrapper structs in favor of the shared
renderJSONOperationOutput helper.
@AndreyVMarkelov
AndreyVMarkelov merged commit 4ba830d into master Jun 24, 2026
7 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.

1 participant