Skip to content

Update migrating guide to refine details#284

Open
duanemay wants to merge 1 commit intomasterfrom
fix_docs
Open

Update migrating guide to refine details#284
duanemay wants to merge 1 commit intomasterfrom
fix_docs

Conversation

@duanemay
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 24, 2026 19:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 curl fallback example to use uaa curl explicitly and simplifies JSON field extraction with jq.

💡 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`
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

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

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`

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants