You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python SDK correctly uses snake_case for its public model attributes, but ConnectorHttpClient.send_async serializes dataclass bodies with dataclasses.asdict. That emits Python attribute names rather than the JSON property names declared by the connector Swagger schema.
For a Swagger property such as printBackground, a generated Python model exposes print_background; asdict sends print_background. The generated .NET model sends printBackground through JsonPropertyName. The connector service contract is the Swagger JSON name; language-specific public naming must not change the payload wire format.
The shared Python HTTP client uses asdict(body) before json.dumps.
In the PR Add new connectors (Phase 3) #54 validation snapshot, representative PDF.co fields serialize as paper_size / print_background instead of Swagger paperSize / printBackground.
The cross-language validation found 266 request-model serialization-key mismatches across the 12 PR Add new connectors (Phase 3) #54 connectors.
This is a pre-existing shared runtime defect, not behavior introduced by the binary-body changes in PR #54.
Expected Fix
Preserve idiomatic Python snake_case public attributes and methods.
Generate or retain each Swagger JSON property name as explicit serialization metadata.
Replace bare asdict request serialization with a shared recursive wire serializer that emits the Swagger property names for dataclasses, nested models, lists, maps, and additional_properties.
Continue omitting None values and preserve raw bytes handling without JSON encoding.
Regression Coverage
Add focused tests at the shared runtime boundary that capture the body sent to the transport and assert exact JSON keys for:
a snake_case property whose Swagger wire name is camelCase;
nested dataclasses and lists of dataclasses;
additional_properties / dynamic objects;
omitted None values; and
raw binary request bodies.
Add a generated-client contract test using a real PR #54 model, such as PDF.co HtmlToPdfInput, to verify print_background emits printBackground and paper_size emits paperSize.
Problem
The Python SDK correctly uses
snake_casefor its public model attributes, butConnectorHttpClient.send_asyncserializes dataclass bodies withdataclasses.asdict. That emits Python attribute names rather than the JSON property names declared by the connector Swagger schema.For a Swagger property such as
printBackground, a generated Python model exposesprint_background;asdictsendsprint_background. The generated .NET model sendsprintBackgroundthroughJsonPropertyName. The connector service contract is the Swagger JSON name; language-specific public naming must not change the payload wire format.Evidence
asdict(body)beforejson.dumps.paper_size/print_backgroundinstead of SwaggerpaperSize/printBackground.This is a pre-existing shared runtime defect, not behavior introduced by the binary-body changes in PR #54.
Expected Fix
snake_casepublic attributes and methods.asdictrequest serialization with a shared recursive wire serializer that emits the Swagger property names for dataclasses, nested models, lists, maps, andadditional_properties.Nonevalues and preserve rawbyteshandling without JSON encoding.Regression Coverage
Add focused tests at the shared runtime boundary that capture the body sent to the transport and assert exact JSON keys for:
additional_properties/ dynamic objects;Nonevalues; andAdd a generated-client contract test using a real PR #54 model, such as PDF.co
HtmlToPdfInput, to verifyprint_backgroundemitsprintBackgroundandpaper_sizeemitspaperSize.