Skip to content

TPT-4731: Fix nested CLI arguments for schemas without an explicit type - #931

Open
zliang-akamai wants to merge 4 commits into
linode:devfrom
zliang-akamai:fix/tpt-4731-nested-request-args
Open

zliang-akamai wants to merge 4 commits into
linode:devfrom
zliang-akamai:fix/tpt-4731-nested-request-args

Conversation

@zliang-akamai

@zliang-akamai zliang-akamai commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

📝 Description

Expand nested request arguments and response attributes for composed schemas without an explicit type: object, fixing flags such as --details.host. Preserve JSON-formatted fields and explicit scalar/array handling, with regression coverage.

✔️ How to Test

Focused regression tests:

 python -m pytest tests/unit/test_request.py tests/unit/test_response.py -k test_handle_one_ofs -k test_explicit_non_object_composed_schema -k test_json_format_composed_objects

Command it fixes:

Creating a bucket in us-mia with an OBJ key with read/write access to the bucket first.

linode-cli streams destination-create --label test-stream-def --type akamai_object_storage --details.host <YOUR_OBJ_BUCKET>.us-mia-1.linodeobjects.com --details.bucket_name <YOUR_OBJ_BUCKET> --details.path audit-logs --details.access_key_id <YOUR_OBJ_KEY_ID> --details.access_key_secret <YOUR_OBJ_KEY>

@zliang-akamai zliang-akamai added the bugfix for any bug fixes in the changelog. label Oct 12, 2026
@zliang-akamai
zliang-akamai requested review from a team as code owners October 12, 2026 15:11
@zliang-akamai
zliang-akamai requested review from mawilk90 and yec-akamai and a balanced review from Copilot and removed request for a team October 12, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

JSON-formatted composed fields are incorrectly expanded instead of remaining raw parent arguments.

1 open finding
What changed in this PR

Fixes dotted CLI argument generation for composed schemas lacking type: object.

Changes:

  • Detects nested properties through schema aggregation.
  • Adds regression coverage and updates fixture/documentation.
File Description
linodecli/​baked/​request.py Expands implicit composed objects.
tests/​unit/​test_request.py Verifies exact generated arguments.
tests/​fixtures/​operation_with_one_ofs.yaml Tests a composition without explicit object type.
linodecli/​baked/​AGENTS.md Documents nested composition handling.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread linodecli/baked/request.py Outdated
@zliang-akamai
zliang-akamai marked this pull request as draft October 12, 2026 15:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Request parsing incorrectly expands explicitly typed scalar compositions into dotted child arguments.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread linodecli/baked/request.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation addresses the regression while preserving existing scalar, array, JSON, and dictionary behavior.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@zliang-akamai
zliang-akamai marked this pull request as ready for review October 12, 2026 15:53
@zliang-akamai
zliang-akamai marked this pull request as draft October 12, 2026 15:56
@zliang-akamai
zliang-akamai marked this pull request as ready for review October 12, 2026 18:29

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix for any bug fixes in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants