Skip to content

Commit

Permalink
Merge pull request #9 from tryAGI/bot/update-openapi_202411132108
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 13, 2024
2 parents 5ab33a1 + 38fa586 commit 412347c
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,10 @@ partial void ProcessClarityUpscaleResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,10 @@ partial void ProcessGenerateImageResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.GenerateImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.GenerateImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,10 @@ partial void ProcessGenerativeUpscaleResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,10 @@ partial void ProcessRemoveBackgroundResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,10 @@ partial void ProcessVectorizeImageResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.ProcessImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,10 @@ partial void ProcessCreateStyleResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.Style.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.Style.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
10 changes: 3 additions & 7 deletions src/libs/Recraft/Generated/Recraft.StyleClient.DeleteStyle.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ partial void ProcessDeleteStyleResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -135,13 +135,9 @@ partial void ProcessDeleteStyleResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/libs/Recraft/Generated/Recraft.StyleClient.GetStyle.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ partial void ProcessGetStyleResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.Style.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.Style.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,10 @@ partial void ProcessListStylesResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.ListStylesResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.ListStylesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,10 @@ partial void ProcessGetCurrentUserResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Recraft.User.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Recraft.User.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down

0 comments on commit 412347c

Please sign in to comment.