Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): fixing nested structs output format #2496

Merged
merged 1 commit into from
May 5, 2023

Conversation

xoscar
Copy link
Collaborator

@xoscar xoscar commented May 5, 2023

This PR fixes an issue we had when parsing YAML strings into structs when having nested structures similar to the Demo.
When parsing the Demo objects the values for the pokeshop and the open telemetry store objects were empty.

In this case, we are now using the open API provided logic to unmarshal JSON bytes into structs.

Changes

  • The API now uses JSON
  • Removing usage of yaml parsing for responses and relying on the open API functionality

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Wrong output:
Screenshot 2023-05-05 at 13 33 38

Fixed output:
Screenshot 2023-05-05 at 13 33 57

@xoscar xoscar self-assigned this May 5, 2023
@xoscar xoscar requested review from danielbdias, schoren, mathnogueira and jorgeepc and removed request for danielbdias May 5, 2023 19:34
@xoscar xoscar added the CLI label May 5, 2023
@xoscar xoscar marked this pull request as ready for review May 5, 2023 19:34
@xoscar xoscar merged commit 1791556 into main May 5, 2023
29 checks passed
@xoscar xoscar deleted the fix/cli-structured-output branch May 5, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants