Reported in python support channel:
Expected Behavior
@clientName should only affect the SDK's client-facing API. Wire serialization should use the original TypeSpec field name.
Actual Behavior
When @clientName is applied to an HttpPart field, the emitter uses the client name for the Content-Disposition header in the multipart request, causing the service to reject the field name.
TypeSpec Definition:
model TranscriptionContent {
@clientName("options") // Client API should use "options"
definition: HttpPart; // Wire should use "definition"
audio?: HttpPart;
}
Content-Type: multipart/form-data; boundary=...
Incorrect Wire Format
--boundary
Content-Disposition: form-data; name="options" ❌ Should be "definition"
Content-Type: application/json
{"audioUrl": "..."}
Current workround: I remove @clientName decorator entirely, forcing client code to use the wire name.