Conversation
There was a problem hiding this comment.
Pull request overview
Updates the “Migrating from uaac” guide to better reflect current uaa CLI behavior and improve examples for users transitioning from uaac.
Changes:
- Fixes the command reference link to correctly resolve from within the
docs/directory. - Expands the “Key Differences” section and adds notes about mixed human-readable + JSON output behavior.
- Updates the
uaa curlfallback example to useuaa curlexplicitly and simplifies JSON field extraction withjq.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| The `uaa` CLI outputs a combination of human-readable status messages and JSON data to stdout. Many commands (like `create-client`, `update-client`, etc.) print a success message followed by JSON output. For reliable machine parsing: | ||
|
|
||
| - Use tools like `tail -n1` to extract only the JSON portion: `uaa create-client myclient -s secret --authorized_grant_types client_credentials | tail -n1 | jq` |
There was a problem hiding this comment.
The tail -n1 parsing suggestion isn’t reliable here: JSON output is pretty-printed with indentation/newlines (see cli.JsonPrinter using json.MarshalIndent), so the last line will usually be just } and won’t be valid JSON for jq. Recommend updating the guidance to extract the full JSON block (e.g., filter from the first line that starts with { or [ through EOF) rather than only the last line.
Suggested change
| - Use tools like `tail -n1` to extract only the JSON portion: `uaa create-client myclient -s secret --authorized_grant_types client_credentials | tail -n1 | jq` | |
| - Extract the full JSON block starting at the first line that begins with `{` or `[` rather than using only the last line, for example: `uaa create-client myclient -s secret --authorized_grant_types client_credentials | sed -n '/^[[:space:]]*[{\[]/,$p' | jq` |
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.
No description provided.