Skip to content

fix(async): serialize API aliases in write helpers - #190

Merged
btoron merged 1 commit into
btoron:masterfrom
WilliamK112:codex/async-write-aliases-188
Oct 18, 2026
Merged

btoron merged 1 commit into
btoron:masterfrom
WilliamK112:codex/async-write-aliases-188

Conversation

@WilliamK112

Copy link
Copy Markdown
Contributor

create_or_replace_inventory_type currently sends non_serialized and model_property instead of the API's nonSerialized and modelProperty keys, causing OFSC to reject the missing mandatory field. Serialize aliases at the HTTP boundary in the shared async PUT, POST, and PATCH helpers.

The change preserves JSON-mode serialization, omission of None, and false/zero values. Regression tests inspect the actual outgoing bodies across all three helpers and the public inventory-type write method.

Fixes #188.

Validation with Python 3.13:

  • All 459 mocked tests pass, with 8 skipped; 13 alias regression cases failed before the fix.
  • Full Ruff check, Ruff format check, and diff whitespace checks pass.

Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
@WilliamK112
WilliamK112 force-pushed the codex/async-write-aliases-188 branch from d22f1db to d88be2b Compare October 17, 2026 05:32
@WilliamK112

Copy link
Copy Markdown
Contributor Author

Rebased this PR onto current master (62cccd2) to follow the new linear-history requirement. The implementation remains the same three-file alias-serialization fix; the commit retains its Signed-off-by trailer.

Validation on rebased head d88be2b:

  • 465 mocked tests passed, 8 skipped (-m "not uses_real_data and not uses_local_data")
  • 77 focused async helper/metadata tests passed
  • Ruff check and format check passed
  • diff whitespace check passed

@btoron
btoron merged commit aae9696 into btoron:master Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create_or_replace_inventory_type sends snake_case keys (model_dump without by_alias); OFS rejects with 400 nonSerialized not set

3 participants