Problem
The Python SDK correctly uses snake_case public model attributes, but ConnectorHttpClient.send_async serializes dataclass bodies using dataclasses.asdict. That emits Python attribute names instead of the JSON property names declared by the connector Swagger schema.
For example, a Swagger property printBackground is represented by Python print_background. asdict sends print_background, while the generated .NET model sends printBackground through JsonPropertyName. The connector service contract is the Swagger JSON name. Language-specific public naming must not alter the payload wire format.
Evidence
Expected Fix
- Preserve idiomatic Python snake_case public attributes and methods.
- Generate or retain Swagger JSON property names as serialization metadata.
- Replace bare asdict request serialization with a shared recursive wire serializer that emits Swagger property names for dataclasses, nested models, lists, maps, and additional_properties.
- Preserve omitted None values and raw bytes request handling.
Regression Coverage
Add shared-runtime tests that capture the exact transport body for a snake_case property with a camelCase Swagger wire name, nested dataclasses and lists, additional_properties, omitted None values, and raw bytes. Add a generated-client contract test using PDF.co HtmlToPdfInput that verifies print_background emits printBackground and paper_size emits paperSize.
Related
Problem
The Python SDK correctly uses snake_case public model attributes, but ConnectorHttpClient.send_async serializes dataclass bodies using dataclasses.asdict. That emits Python attribute names instead of the JSON property names declared by the connector Swagger schema.
For example, a Swagger property printBackground is represented by Python print_background. asdict sends print_background, while the generated .NET model sends printBackground through JsonPropertyName. The connector service contract is the Swagger JSON name. Language-specific public naming must not alter the payload wire format.
Evidence
Expected Fix
Regression Coverage
Add shared-runtime tests that capture the exact transport body for a snake_case property with a camelCase Swagger wire name, nested dataclasses and lists, additional_properties, omitted None values, and raw bytes. Add a generated-client contract test using PDF.co HtmlToPdfInput that verifies print_background emits printBackground and paper_size emits paperSize.
Related