Skip to content

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

Open
WilliamK112 wants to merge 1 commit into
btoron:masterfrom
WilliamK112:codex/async-write-aliases-188
Open

WilliamK112 wants to merge 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>

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

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

1 participant