Skip to content

Commit 3721041

Browse files
committed
Fix generated serialization name of partial_image_b64
1 parent 87964c3 commit 3721041

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

specification/client/responses.client.tsp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ using TypeSpec.HttpClient.CSharp;
8585

8686
@@alternateType(ResponseMCPCallArgumentsDeltaEvent.delta, unknown);
8787

88-
@@clientName(ResponseImageGenCallPartialImageEvent.partial_image_b64, "PartialImageBytes");
89-
9088
// ------------ JsonPatch ------------
9189

9290
// models.tsp
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
namespace OpenAI.Responses;
1+
using System;
2+
3+
namespace OpenAI.Responses;
24

35
// CUSTOM: Renamed.
46
[CodeGenType("ResponseImageGenCallPartialImageEvent")]
57
public partial class StreamingResponseImageGenerationCallPartialImageUpdate
68
{
9+
// CUSTOM: Renamed.
10+
[CodeGenMember("PartialImageB64")]
11+
public BinaryData PartialImageBytes { get; }
712
}

src/Generated/Models/Responses/StreamingResponseImageGenerationCallPartialImageUpdate.Serialization.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
5555
writer.WritePropertyName("partial_image_index"u8);
5656
writer.WriteNumberValue(PartialImageIndex);
5757
}
58-
if (!Patch.Contains("$.PartialImageBytes"u8))
58+
if (!Patch.Contains("$.partial_image_b64"u8))
5959
{
60-
writer.WritePropertyName("PartialImageBytes"u8);
60+
writer.WritePropertyName("partial_image_b64"u8);
6161
writer.WriteBase64StringValue(PartialImageBytes.ToArray(), "D");
6262
}
6363

@@ -120,7 +120,7 @@ internal static StreamingResponseImageGenerationCallPartialImageUpdate Deseriali
120120
partialImageIndex = prop.Value.GetInt32();
121121
continue;
122122
}
123-
if (prop.NameEquals("PartialImageBytes"u8))
123+
if (prop.NameEquals("partial_image_b64"u8))
124124
{
125125
partialImageBytes = BinaryData.FromBytes(prop.Value.GetBytesFromBase64("D"));
126126
continue;

src/Generated/Models/Responses/StreamingResponseImageGenerationCallPartialImageUpdate.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,5 @@ internal StreamingResponseImageGenerationCallPartialImageUpdate(InternalResponse
3434
public string ItemId { get; }
3535

3636
public int PartialImageIndex { get; }
37-
38-
public BinaryData PartialImageBytes { get; }
3937
}
4038
}

tspCodeModel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71863,7 +71863,7 @@
7186371863
{
7186471864
"$id": "5658",
7186571865
"kind": "property",
71866-
"name": "PartialImageBytes",
71866+
"name": "partial_image_b64",
7186771867
"doc": "Base64-encoded partial image data, suitable for rendering as an image.",
7186871868
"type": {
7186971869
"$id": "5659",

0 commit comments

Comments
 (0)