Skip to content

feat: prettify json output using stackit curl #713

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

Merged
merged 1 commit into from
May 7, 2025

Conversation

h3adex
Copy link
Contributor

@h3adex h3adex commented Apr 29, 2025

Description

When using the stackit curl command, it's more readable to prettify the JSON response, especially on systems without tools like jq or yq for easy content extraction. Additionally, I've introduced an error message for expired JWT tokens.

Test it out:

./bin/stackit curl "https://iaas.api.eu01.stackit.cloud/v1beta1/networks/public-ip-ranges"
./bin/stackit curl "https://iaas.api.eu01.stackit.cloud/v1beta1/networks/public-ip-ranges" | jq
./bin/stackit curl "https://iaas.api.eu01.stackit.cloud/v1beta1/networks/public-ip-ranges" | yq eval '.items[].cidr'

Error messages stackit curl:
Old:
Screenshot 2025-04-29 at 11 54 39

New:
Screenshot 2025-04-29 at 11 54 28

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@h3adex h3adex force-pushed the feat/curl-output-formatted branch from ea77b0a to 1ff7629 Compare April 29, 2025 12:00
@h3adex h3adex force-pushed the feat/curl-output-formatted branch from 1ff7629 to 8b87c83 Compare April 29, 2025 12:03
Copy link

github-actions bot commented May 7, 2025

This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

@github-actions github-actions bot added the Stale label May 7, 2025
@h3adex
Copy link
Contributor Author

h3adex commented May 7, 2025

Bump

Copy link
Contributor

@Fyusel Fyusel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting this improvement!

@Fyusel Fyusel merged commit f572e14 into stackitcloud:main May 7, 2025
3 checks passed
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.

2 participants