Skip to content

Commit 7af8f6d

Browse files
authored
[Python] Fix serialization name for multipart (#9138)
fix #9137 Related PR: - [ ] #9139
1 parent e50ab7c commit 7af8f6d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: fix
3+
packages:
4+
- "@typespec/http-client-python"
5+
---
6+
7+
Fix serialization name for multipart

packages/http-client-python/emitter/src/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,10 @@ function emitProperty(
235235
}
236236
return {
237237
clientName: camelToSnakeCase(property.name),
238-
wireName: property.serializationOptions.json?.name ?? property.name,
238+
wireName:
239+
(property.serializationOptions?.multipart
240+
? property.serializationOptions?.multipart?.name
241+
: property.serializationOptions?.json?.name) ?? property.name,
239242
type: getType(context, sourceType),
240243
optional: property.optional,
241244
description: property.summary ? property.summary : property.doc,

0 commit comments

Comments
 (0)