diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.CreateArticle.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.CreateArticle.g.cs
index e67abc6..125a85e 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.CreateArticle.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.CreateArticle.g.cs
@@ -23,7 +23,7 @@ partial void ProcessCreateArticleResponse(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task CreateArticleAsync(
global::Forem.Article request,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,7 +85,23 @@ partial void ProcessCreateArticleResponse(
ProcessCreateArticleResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
- __response.EnsureSuccessStatusCode();
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
}
///
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleById.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleById.g.cs
index 578a5de..c33998d 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleById.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleById.g.cs
@@ -27,7 +27,7 @@ partial void ProcessGetArticleByIdResponseContent(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task GetArticleByIdAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -81,28 +81,93 @@ partial void ProcessGetArticleByIdResponseContent(
ProcessGetArticleByIdResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // Article Not Found
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ if (ReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetArticleByIdResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetArticleByIdResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return __content;
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return __content;
+ 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;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleByPath.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleByPath.g.cs
index d727a84..ee79d92 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleByPath.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticleByPath.g.cs
@@ -30,7 +30,7 @@ partial void ProcessGetArticleByPathResponseContent(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task GetArticleByPathAsync(
string username,
string slug,
@@ -87,28 +87,93 @@ partial void ProcessGetArticleByPathResponseContent(
ProcessGetArticleByPathResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // Article Not Found
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ if (ReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetArticleByPathResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetArticleByPathResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return __content;
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return __content;
+ 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;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticles.g.cs
index 2da925c..e39ca38 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetArticles.g.cs
@@ -61,7 +61,7 @@ partial void ProcessGetArticlesResponseContent(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetArticlesAsync(
int? page = default,
int? perPage = default,
@@ -151,29 +151,70 @@ partial void ProcessGetArticlesResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response);
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ if (ReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetArticlesResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetArticlesResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
- try
- {
- __response.EnsureSuccessStatusCode();
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetLatestArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetLatestArticles.g.cs
index f056319..aa469c1 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetLatestArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetLatestArticles.g.cs
@@ -35,7 +35,7 @@ partial void ProcessGetLatestArticlesResponseContent(
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetLatestArticlesAsync(
int? page = default,
int? perPage = default,
@@ -97,29 +97,70 @@ partial void ProcessGetLatestArticlesResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response);
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ if (ReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetLatestArticlesResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetLatestArticlesResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
- try
- {
- __response.EnsureSuccessStatusCode();
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserAllArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserAllArticles.g.cs
index b277324..9a2389c 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserAllArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserAllArticles.g.cs
@@ -38,7 +38,7 @@ partial void ProcessGetUserAllArticlesResponseContent(
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetUserAllArticlesAsync(
int? page = default,
int? perPage = default,
@@ -99,30 +99,95 @@ partial void ProcessGetUserAllArticlesResponseContent(
ProcessGetUserAllArticlesResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetUserAllArticlesResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetUserAllArticlesResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserArticles.g.cs
index 48563e6..681613d 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserArticles.g.cs
@@ -37,7 +37,7 @@ partial void ProcessGetUserArticlesResponseContent(
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetUserArticlesAsync(
int? page = default,
int? perPage = default,
@@ -98,30 +98,95 @@ partial void ProcessGetUserArticlesResponseContent(
ProcessGetUserArticlesResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetUserArticlesResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetUserArticlesResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserPublishedArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserPublishedArticles.g.cs
index 6cc8829..d11f287 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserPublishedArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserPublishedArticles.g.cs
@@ -37,7 +37,7 @@ partial void ProcessGetUserPublishedArticlesResponseContent(
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetUserPublishedArticlesAsync(
int? page = default,
int? perPage = default,
@@ -98,30 +98,95 @@ partial void ProcessGetUserPublishedArticlesResponseContent(
ProcessGetUserPublishedArticlesResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetUserPublishedArticlesResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetUserPublishedArticlesResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserUnpublishedArticles.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserUnpublishedArticles.g.cs
index b2a6e87..745e4d7 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserUnpublishedArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.GetUserUnpublishedArticles.g.cs
@@ -37,7 +37,7 @@ partial void ProcessGetUserUnpublishedArticlesResponseContent(
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetUserUnpublishedArticlesAsync(
int? page = default,
int? perPage = default,
@@ -98,30 +98,95 @@ partial void ProcessGetUserUnpublishedArticlesResponseContent(
ProcessGetUserUnpublishedArticlesResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // Unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetUserUnpublishedArticlesResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetUserUnpublishedArticlesResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.UnpublishArticle.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.UnpublishArticle.g.cs
index 8fff327..d312f84 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.UnpublishArticle.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.UnpublishArticle.g.cs
@@ -30,7 +30,7 @@ partial void ProcessUnpublishArticleResponse(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task UnpublishArticleAsync(
int id,
string? note = default,
@@ -90,7 +90,23 @@ partial void ProcessUnpublishArticleResponse(
ProcessUnpublishArticleResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
- __response.EnsureSuccessStatusCode();
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.UpdateArticle.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.UpdateArticle.g.cs
index 283cb84..4db6aaa 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.UpdateArticle.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.UpdateArticle.g.cs
@@ -26,7 +26,7 @@ partial void ProcessUpdateArticleResponse(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task UpdateArticleAsync(
int id,
global::Forem.Article request,
@@ -91,7 +91,23 @@ partial void ProcessUpdateArticleResponse(
ProcessUpdateArticleResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
- __response.EnsureSuccessStatusCode();
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
}
///
diff --git a/src/libs/Forem/Generated/Forem.ArticlesClient.g.cs b/src/libs/Forem/Generated/Forem.ArticlesClient.g.cs
index 8a75b5e..4f24ef6 100644
--- a/src/libs/Forem/Generated/Forem.ArticlesClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.ArticlesClient.g.cs
@@ -25,6 +25,11 @@ public sealed partial class ArticlesClient : global::Forem.IArticlesClient, glob
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentById.g.cs b/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentById.g.cs
index fc98d6e..10e5953 100644
--- a/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentById.g.cs
+++ b/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentById.g.cs
@@ -24,7 +24,7 @@ partial void ProcessGetCommentByIdResponse(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task GetCommentByIdAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -78,7 +78,23 @@ partial void ProcessGetCommentByIdResponse(
ProcessGetCommentByIdResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
- __response.EnsureSuccessStatusCode();
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentsByArticleId.g.cs b/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentsByArticleId.g.cs
index 33d81f5..76f0839 100644
--- a/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentsByArticleId.g.cs
+++ b/src/libs/Forem/Generated/Forem.CommentsClient.GetCommentsByArticleId.g.cs
@@ -31,7 +31,7 @@ partial void ProcessGetCommentsByArticleIdResponseContent(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetCommentsByArticleIdAsync(
string? aId = default,
string? pId = default,
@@ -92,30 +92,95 @@ partial void ProcessGetCommentsByArticleIdResponseContent(
ProcessGetCommentsByArticleIdResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // Resource Not Found
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ if (ReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetCommentsByArticleIdResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetCommentsByArticleIdResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.CommentsClient.g.cs b/src/libs/Forem/Generated/Forem.CommentsClient.g.cs
index 7130225..423e3d0 100644
--- a/src/libs/Forem/Generated/Forem.CommentsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.CommentsClient.g.cs
@@ -25,6 +25,11 @@ public sealed partial class CommentsClient : global::Forem.ICommentsClient, glob
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.CreateDisplayAds.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.CreateDisplayAds.g.cs
index 4beae35..4bc3406 100644
--- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.CreateDisplayAds.g.cs
+++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.CreateDisplayAds.g.cs
@@ -27,7 +27,7 @@ partial void ProcessCreateDisplayAdsResponseContent(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task CreateDisplayAdsAsync(
object request,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -89,28 +89,117 @@ partial void ProcessCreateDisplayAdsResponseContent(
ProcessCreateDisplayAdsResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // unprocessable
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ if (ReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessCreateDisplayAdsResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_422,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessCreateDisplayAdsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return __content;
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return __content;
+ 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;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
///
diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAds.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAds.g.cs
index 514966c..0bca3d0 100644
--- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAds.g.cs
+++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAds.g.cs
@@ -24,7 +24,7 @@ partial void ProcessGetDisplayAdsResponseContent(
/// This endpoint allows the client to retrieve a list of all display ads.
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetDisplayAdsAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -75,30 +75,95 @@ partial void ProcessGetDisplayAdsResponseContent(
ProcessGetDisplayAdsResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetDisplayAdsResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetDisplayAdsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAdsById.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAdsById.g.cs
index b9b3090..022e490 100644
--- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAdsById.g.cs
+++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.GetDisplayAdsById.g.cs
@@ -22,7 +22,7 @@ partial void ProcessGetDisplayAdsByIdResponse(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task GetDisplayAdsByIdAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -76,7 +76,23 @@ partial void ProcessGetDisplayAdsByIdResponse(
ProcessGetDisplayAdsByIdResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
- __response.EnsureSuccessStatusCode();
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsById.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsById.g.cs
index bce2ef2..c1a2be3 100644
--- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsById.g.cs
+++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsById.g.cs
@@ -30,7 +30,7 @@ partial void ProcessPutDisplayAdsByIdResponseContent(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task PutDisplayAdsByIdAsync(
int id,
object request,
@@ -95,28 +95,117 @@ partial void ProcessPutDisplayAdsByIdResponseContent(
ProcessPutDisplayAdsByIdResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // not found
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ if (ReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessPutDisplayAdsByIdResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessPutDisplayAdsByIdResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return __content;
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return __content;
+ 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;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
///
diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsByIdUnpublish.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsByIdUnpublish.g.cs
index 42057c2..969284d 100644
--- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsByIdUnpublish.g.cs
+++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.PutDisplayAdsByIdUnpublish.g.cs
@@ -22,7 +22,7 @@ partial void ProcessPutDisplayAdsByIdUnpublishResponse(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task PutDisplayAdsByIdUnpublishAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -76,7 +76,23 @@ partial void ProcessPutDisplayAdsByIdUnpublishResponse(
ProcessPutDisplayAdsByIdUnpublishResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
- __response.EnsureSuccessStatusCode();
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.DisplayAdsClient.g.cs b/src/libs/Forem/Generated/Forem.DisplayAdsClient.g.cs
index c946101..e93aa4c 100644
--- a/src/libs/Forem/Generated/Forem.DisplayAdsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.DisplayAdsClient.g.cs
@@ -25,6 +25,11 @@ public sealed partial class DisplayAdsClient : global::Forem.IDisplayAdsClient,
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.Exceptions.g.cs b/src/libs/Forem/Generated/Forem.Exceptions.g.cs
new file mode 100644
index 0000000..f4d9d65
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Exceptions.g.cs
@@ -0,0 +1,90 @@
+#nullable enable
+
+namespace Forem
+{
+ ///
+ /// Represents an exception thrown by the API.
+ ///
+ [global::System.Serializable]
+ public partial class ApiException : global::System.Exception
+ {
+ ///
+ /// The HTTP status code of the response.
+ ///
+ public global::System.Net.HttpStatusCode StatusCode { get; }
+ ///
+ /// The response body.
+ ///
+ public string? ResponseBody { get; set; }
+ ///
+ /// The response headers.
+ ///
+ public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ApiException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class with a specified error message.
+ ///
+ /// The message that describes the error.
+ /// The HTTP status code of the response.
+ public ApiException(string message, global::System.Net.HttpStatusCode statusCode) : base(message)
+ {
+ StatusCode = statusCode;
+ }
+
+ ///
+ /// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
+ ///
+ /// The error message that explains the reason for the exception.
+ /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified.
+ /// The HTTP status code of the response.
+ public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException)
+ {
+ StatusCode = statusCode;
+ }
+ }
+
+ ///
+ /// Represents an exception thrown by the API.
+ ///
+ ///
+ [global::System.Serializable]
+ public partial class ApiException : ApiException
+ {
+ ///
+ /// The response object.
+ ///
+ public T? ResponseObject { get; set; }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ApiException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class with a specified error message.
+ ///
+ /// The message that describes the error.
+ /// The HTTP status code of the response.
+ public ApiException(string message, global::System.Net.HttpStatusCode statusCode) : base(message, statusCode)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
+ ///
+ /// The error message that explains the reason for the exception.
+ /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified.
+ /// The HTTP status code of the response.
+ public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.FollowedTagsClient.GetFollowedTags.g.cs b/src/libs/Forem/Generated/Forem.FollowedTagsClient.GetFollowedTags.g.cs
index 6e34758..e82bca9 100644
--- a/src/libs/Forem/Generated/Forem.FollowedTagsClient.GetFollowedTags.g.cs
+++ b/src/libs/Forem/Generated/Forem.FollowedTagsClient.GetFollowedTags.g.cs
@@ -24,7 +24,7 @@ partial void ProcessGetFollowedTagsResponseContent(
/// This endpoint allows the client to retrieve a list of the tags they follow.
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetFollowedTagsAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -75,30 +75,95 @@ partial void ProcessGetFollowedTagsResponseContent(
ProcessGetFollowedTagsResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetFollowedTagsResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetFollowedTagsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.FollowedTagsClient.g.cs b/src/libs/Forem/Generated/Forem.FollowedTagsClient.g.cs
index 6013126..251cb1f 100644
--- a/src/libs/Forem/Generated/Forem.FollowedTagsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.FollowedTagsClient.g.cs
@@ -25,6 +25,11 @@ public sealed partial class FollowedTagsClient : global::Forem.IFollowedTagsClie
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.FollowersClient.GetFollowers.g.cs b/src/libs/Forem/Generated/Forem.FollowersClient.GetFollowers.g.cs
index d31f5b2..6398247 100644
--- a/src/libs/Forem/Generated/Forem.FollowersClient.GetFollowers.g.cs
+++ b/src/libs/Forem/Generated/Forem.FollowersClient.GetFollowers.g.cs
@@ -39,7 +39,7 @@ partial void ProcessGetFollowersResponseContent(
///
///
/// The token to cancel the operation with
- ///
+ ///
public async global::System.Threading.Tasks.Task> GetFollowersAsync(
int? page = default,
int? perPage = default,
@@ -104,30 +104,95 @@ partial void ProcessGetFollowersResponseContent(
ProcessGetFollowersResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
+ // unauthorized
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ if (ReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ }
+ else
+ {
+ var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ }
- var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
-
- ProcessResponseContent(
- client: HttpClient,
- response: __response,
- content: ref __content);
- ProcessGetFollowersResponseContent(
- httpClient: HttpClient,
- httpResponseMessage: __response,
- content: ref __content);
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- try
+ if (ReadResponseAsString)
{
- __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetFollowersResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
- catch (global::System.Net.Http.HttpRequestException __ex)
+ else
{
- throw new global::System.InvalidOperationException(__content, __ex);
- }
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::Forem.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
- return
- global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ??
- throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList;
+
+ return
+ __responseValue ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
}
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.FollowersClient.g.cs b/src/libs/Forem/Generated/Forem.FollowersClient.g.cs
index 9128319..b01b2f4 100644
--- a/src/libs/Forem/Generated/Forem.FollowersClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.FollowersClient.g.cs
@@ -25,6 +25,11 @@ public sealed partial class FollowersClient : global::Forem.IFollowersClient, gl
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.ForemClient.g.cs b/src/libs/Forem/Generated/Forem.ForemClient.g.cs
index f228ee7..31788d6 100644
--- a/src/libs/Forem/Generated/Forem.ForemClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.ForemClient.g.cs
@@ -31,6 +31,11 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
///
///
///
@@ -42,6 +47,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public ArticlesClient Articles => new ArticlesClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -50,6 +56,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public UsersClient Users => new UsersClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -58,6 +65,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public CommentsClient Comments => new CommentsClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -66,6 +74,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public DisplayAdsClient DisplayAds => new DisplayAdsClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -74,6 +83,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public FollowedTagsClient FollowedTags => new FollowedTagsClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -82,6 +92,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public TagsClient Tags => new TagsClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -90,6 +101,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public FollowersClient Followers => new FollowersClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -98,6 +110,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public OrganizationsClient Organizations => new OrganizationsClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -106,6 +119,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public PagesClient Pages => new PagesClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -114,6 +128,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public PodcastEpisodesClient PodcastEpisodes => new PodcastEpisodesClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -122,6 +137,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public ProfileImagesClient ProfileImages => new ProfileImagesClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -130,6 +146,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public ReactionsClient Reactions => new ReactionsClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -138,6 +155,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public ReadinglistClient Readinglist => new ReadinglistClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
@@ -146,6 +164,7 @@ public sealed partial class ForemClient : global::Forem.IForemClient, global::Sy
///
public VideosClient Videos => new VideosClient(HttpClient, authorizations: Authorizations)
{
+ ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
};
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.CreateArticle.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.CreateArticle.g.cs
index d09b949..664abb3 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.CreateArticle.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.CreateArticle.g.cs
@@ -11,7 +11,7 @@ public partial interface IArticlesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task CreateArticleAsync(
global::Forem.Article request,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticleById.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticleById.g.cs
index fcd156d..43fb85c 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticleById.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticleById.g.cs
@@ -10,7 +10,7 @@ public partial interface IArticlesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetArticleByIdAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticleByPath.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticleByPath.g.cs
index 2b3816c..dd0d53c 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticleByPath.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticleByPath.g.cs
@@ -11,7 +11,7 @@ public partial interface IArticlesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetArticleByPathAsync(
string username,
string slug,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticles.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticles.g.cs
index d1ac99c..535adef 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.GetArticles.g.cs
@@ -28,7 +28,7 @@ public partial interface IArticlesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetArticlesAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.GetLatestArticles.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.GetLatestArticles.g.cs
index 3f85a6d..7d5a997 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.GetLatestArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.GetLatestArticles.g.cs
@@ -16,7 +16,7 @@ public partial interface IArticlesClient
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetLatestArticlesAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserAllArticles.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserAllArticles.g.cs
index f1d2b2a..76ba77a 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserAllArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserAllArticles.g.cs
@@ -19,7 +19,7 @@ public partial interface IArticlesClient
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetUserAllArticlesAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserArticles.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserArticles.g.cs
index 93f0c42..a7372e3 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserArticles.g.cs
@@ -18,7 +18,7 @@ public partial interface IArticlesClient
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetUserArticlesAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserPublishedArticles.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserPublishedArticles.g.cs
index 2e49459..6e91517 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserPublishedArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserPublishedArticles.g.cs
@@ -18,7 +18,7 @@ public partial interface IArticlesClient
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetUserPublishedArticlesAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserUnpublishedArticles.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserUnpublishedArticles.g.cs
index 9db315b..da7f8f9 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserUnpublishedArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.GetUserUnpublishedArticles.g.cs
@@ -18,7 +18,7 @@ public partial interface IArticlesClient
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetUserUnpublishedArticlesAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.UnpublishArticle.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.UnpublishArticle.g.cs
index 19f576b..32580d6 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.UnpublishArticle.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.UnpublishArticle.g.cs
@@ -16,7 +16,7 @@ public partial interface IArticlesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task UnpublishArticleAsync(
int id,
string? note = default,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.UpdateArticle.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.UpdateArticle.g.cs
index c8a1b5b..49e3eb9 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.UpdateArticle.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.UpdateArticle.g.cs
@@ -12,7 +12,7 @@ public partial interface IArticlesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task UpdateArticleAsync(
int id,
global::Forem.Article request,
diff --git a/src/libs/Forem/Generated/Forem.IArticlesClient.g.cs b/src/libs/Forem/Generated/Forem.IArticlesClient.g.cs
index 0ecc3d5..b2ead4d 100644
--- a/src/libs/Forem/Generated/Forem.IArticlesClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IArticlesClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IArticlesClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.ICommentsClient.GetCommentById.g.cs b/src/libs/Forem/Generated/Forem.ICommentsClient.GetCommentById.g.cs
index 4f85ed0..427c4e1 100644
--- a/src/libs/Forem/Generated/Forem.ICommentsClient.GetCommentById.g.cs
+++ b/src/libs/Forem/Generated/Forem.ICommentsClient.GetCommentById.g.cs
@@ -12,7 +12,7 @@ public partial interface ICommentsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetCommentByIdAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.ICommentsClient.GetCommentsByArticleId.g.cs b/src/libs/Forem/Generated/Forem.ICommentsClient.GetCommentsByArticleId.g.cs
index e7d1342..c7a6087 100644
--- a/src/libs/Forem/Generated/Forem.ICommentsClient.GetCommentsByArticleId.g.cs
+++ b/src/libs/Forem/Generated/Forem.ICommentsClient.GetCommentsByArticleId.g.cs
@@ -12,7 +12,7 @@ public partial interface ICommentsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetCommentsByArticleIdAsync(
string? aId = default,
string? pId = default,
diff --git a/src/libs/Forem/Generated/Forem.ICommentsClient.g.cs b/src/libs/Forem/Generated/Forem.ICommentsClient.g.cs
index ba2c653..3f7229f 100644
--- a/src/libs/Forem/Generated/Forem.ICommentsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.ICommentsClient.g.cs
@@ -24,6 +24,12 @@ public partial interface ICommentsClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.CreateDisplayAds.g.cs b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.CreateDisplayAds.g.cs
index e109625..55a4e32 100644
--- a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.CreateDisplayAds.g.cs
+++ b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.CreateDisplayAds.g.cs
@@ -10,7 +10,7 @@ public partial interface IDisplayAdsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task CreateDisplayAdsAsync(
object request,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.GetDisplayAds.g.cs b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.GetDisplayAds.g.cs
index c3ae856..804e858 100644
--- a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.GetDisplayAds.g.cs
+++ b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.GetDisplayAds.g.cs
@@ -9,7 +9,7 @@ public partial interface IDisplayAdsClient
/// This endpoint allows the client to retrieve a list of all display ads.
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetDisplayAdsAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.GetDisplayAdsById.g.cs b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.GetDisplayAdsById.g.cs
index 91c0bfd..00140b6 100644
--- a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.GetDisplayAdsById.g.cs
+++ b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.GetDisplayAdsById.g.cs
@@ -10,7 +10,7 @@ public partial interface IDisplayAdsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetDisplayAdsByIdAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.PutDisplayAdsById.g.cs b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.PutDisplayAdsById.g.cs
index 1694804..9727e68 100644
--- a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.PutDisplayAdsById.g.cs
+++ b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.PutDisplayAdsById.g.cs
@@ -11,7 +11,7 @@ public partial interface IDisplayAdsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task PutDisplayAdsByIdAsync(
int id,
object request,
diff --git a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.PutDisplayAdsByIdUnpublish.g.cs b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.PutDisplayAdsByIdUnpublish.g.cs
index 12e3f3a..e251a77 100644
--- a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.PutDisplayAdsByIdUnpublish.g.cs
+++ b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.PutDisplayAdsByIdUnpublish.g.cs
@@ -10,7 +10,7 @@ public partial interface IDisplayAdsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task PutDisplayAdsByIdUnpublishAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.g.cs b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.g.cs
index bf624a6..93fe5e3 100644
--- a/src/libs/Forem/Generated/Forem.IDisplayAdsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IDisplayAdsClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IDisplayAdsClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IFollowedTagsClient.GetFollowedTags.g.cs b/src/libs/Forem/Generated/Forem.IFollowedTagsClient.GetFollowedTags.g.cs
index 5475ceb..eb45274 100644
--- a/src/libs/Forem/Generated/Forem.IFollowedTagsClient.GetFollowedTags.g.cs
+++ b/src/libs/Forem/Generated/Forem.IFollowedTagsClient.GetFollowedTags.g.cs
@@ -9,7 +9,7 @@ public partial interface IFollowedTagsClient
/// This endpoint allows the client to retrieve a list of the tags they follow.
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetFollowedTagsAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Forem/Generated/Forem.IFollowedTagsClient.g.cs b/src/libs/Forem/Generated/Forem.IFollowedTagsClient.g.cs
index 962f5e3..df5db9a 100644
--- a/src/libs/Forem/Generated/Forem.IFollowedTagsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IFollowedTagsClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IFollowedTagsClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IFollowersClient.GetFollowers.g.cs b/src/libs/Forem/Generated/Forem.IFollowersClient.GetFollowers.g.cs
index 519a5c0..f0c66fd 100644
--- a/src/libs/Forem/Generated/Forem.IFollowersClient.GetFollowers.g.cs
+++ b/src/libs/Forem/Generated/Forem.IFollowersClient.GetFollowers.g.cs
@@ -18,7 +18,7 @@ public partial interface IFollowersClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetFollowersAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IFollowersClient.g.cs b/src/libs/Forem/Generated/Forem.IFollowersClient.g.cs
index a2001dd..fcfb4ab 100644
--- a/src/libs/Forem/Generated/Forem.IFollowersClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IFollowersClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IFollowersClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IForemClient.g.cs b/src/libs/Forem/Generated/Forem.IForemClient.g.cs
index ffee482..fb4c8ae 100644
--- a/src/libs/Forem/Generated/Forem.IForemClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IForemClient.g.cs
@@ -30,6 +30,12 @@ public partial interface IForemClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrgArticles.g.cs b/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrgArticles.g.cs
index 6151d8b..12f9e4a 100644
--- a/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrgArticles.g.cs
+++ b/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrgArticles.g.cs
@@ -17,7 +17,7 @@ public partial interface IOrganizationsClient
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetOrgArticlesAsync(
string username,
int? page = default,
diff --git a/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrgUsers.g.cs b/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrgUsers.g.cs
index 73a3a0e..bf8db59 100644
--- a/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrgUsers.g.cs
+++ b/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrgUsers.g.cs
@@ -17,7 +17,7 @@ public partial interface IOrganizationsClient
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetOrgUsersAsync(
string username,
int? page = default,
diff --git a/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrganization.g.cs b/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrganization.g.cs
index f1fbd12..5edbe35 100644
--- a/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrganization.g.cs
+++ b/src/libs/Forem/Generated/Forem.IOrganizationsClient.GetOrganization.g.cs
@@ -10,7 +10,7 @@ public partial interface IOrganizationsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetOrganizationAsync(
string username,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IOrganizationsClient.g.cs b/src/libs/Forem/Generated/Forem.IOrganizationsClient.g.cs
index cf2acc5..95e81f3 100644
--- a/src/libs/Forem/Generated/Forem.IOrganizationsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IOrganizationsClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IOrganizationsClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IPagesClient.CreatePages.g.cs b/src/libs/Forem/Generated/Forem.IPagesClient.CreatePages.g.cs
index 290ef4c..42822a3 100644
--- a/src/libs/Forem/Generated/Forem.IPagesClient.CreatePages.g.cs
+++ b/src/libs/Forem/Generated/Forem.IPagesClient.CreatePages.g.cs
@@ -10,7 +10,7 @@ public partial interface IPagesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task CreatePagesAsync(
global::Forem.Request3 request,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IPagesClient.DeletePagesById.g.cs b/src/libs/Forem/Generated/Forem.IPagesClient.DeletePagesById.g.cs
index 7d528d4..1cfca4b 100644
--- a/src/libs/Forem/Generated/Forem.IPagesClient.DeletePagesById.g.cs
+++ b/src/libs/Forem/Generated/Forem.IPagesClient.DeletePagesById.g.cs
@@ -10,7 +10,7 @@ public partial interface IPagesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task DeletePagesByIdAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IPagesClient.GetPages.g.cs b/src/libs/Forem/Generated/Forem.IPagesClient.GetPages.g.cs
index 767b9b1..6211191 100644
--- a/src/libs/Forem/Generated/Forem.IPagesClient.GetPages.g.cs
+++ b/src/libs/Forem/Generated/Forem.IPagesClient.GetPages.g.cs
@@ -9,7 +9,7 @@ public partial interface IPagesClient
/// This endpoint allows the client to retrieve details for all Page objects.
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetPagesAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Forem/Generated/Forem.IPagesClient.GetPagesById.g.cs b/src/libs/Forem/Generated/Forem.IPagesClient.GetPagesById.g.cs
index c2dd019..df27dea 100644
--- a/src/libs/Forem/Generated/Forem.IPagesClient.GetPagesById.g.cs
+++ b/src/libs/Forem/Generated/Forem.IPagesClient.GetPagesById.g.cs
@@ -10,7 +10,7 @@ public partial interface IPagesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetPagesByIdAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IPagesClient.PutPagesById.g.cs b/src/libs/Forem/Generated/Forem.IPagesClient.PutPagesById.g.cs
index 242477f..60413b3 100644
--- a/src/libs/Forem/Generated/Forem.IPagesClient.PutPagesById.g.cs
+++ b/src/libs/Forem/Generated/Forem.IPagesClient.PutPagesById.g.cs
@@ -11,7 +11,7 @@ public partial interface IPagesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task PutPagesByIdAsync(
int id,
global::Forem.Page request,
diff --git a/src/libs/Forem/Generated/Forem.IPagesClient.g.cs b/src/libs/Forem/Generated/Forem.IPagesClient.g.cs
index 4af06ba..c59ad6e 100644
--- a/src/libs/Forem/Generated/Forem.IPagesClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IPagesClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IPagesClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IPodcastEpisodesClient.GetPodcastEpisodes.g.cs b/src/libs/Forem/Generated/Forem.IPodcastEpisodesClient.GetPodcastEpisodes.g.cs
index d23fec8..cff57ab 100644
--- a/src/libs/Forem/Generated/Forem.IPodcastEpisodesClient.GetPodcastEpisodes.g.cs
+++ b/src/libs/Forem/Generated/Forem.IPodcastEpisodesClient.GetPodcastEpisodes.g.cs
@@ -19,7 +19,7 @@ public partial interface IPodcastEpisodesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetPodcastEpisodesAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IPodcastEpisodesClient.g.cs b/src/libs/Forem/Generated/Forem.IPodcastEpisodesClient.g.cs
index cc96202..b96043a 100644
--- a/src/libs/Forem/Generated/Forem.IPodcastEpisodesClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IPodcastEpisodesClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IPodcastEpisodesClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IProfileImagesClient.GetProfileImage.g.cs b/src/libs/Forem/Generated/Forem.IProfileImagesClient.GetProfileImage.g.cs
index 6d033ef..41816f1 100644
--- a/src/libs/Forem/Generated/Forem.IProfileImagesClient.GetProfileImage.g.cs
+++ b/src/libs/Forem/Generated/Forem.IProfileImagesClient.GetProfileImage.g.cs
@@ -11,7 +11,7 @@ public partial interface IProfileImagesClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetProfileImageAsync(
string username,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IProfileImagesClient.g.cs b/src/libs/Forem/Generated/Forem.IProfileImagesClient.g.cs
index 05945dc..5a8a257 100644
--- a/src/libs/Forem/Generated/Forem.IProfileImagesClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IProfileImagesClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IProfileImagesClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IReactionsClient.CreateReactions.g.cs b/src/libs/Forem/Generated/Forem.IReactionsClient.CreateReactions.g.cs
index 70b9733..bef60bf 100644
--- a/src/libs/Forem/Generated/Forem.IReactionsClient.CreateReactions.g.cs
+++ b/src/libs/Forem/Generated/Forem.IReactionsClient.CreateReactions.g.cs
@@ -14,7 +14,7 @@ public partial interface IReactionsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task CreateReactionsAsync(
global::Forem.Category2 category,
int reactableId,
diff --git a/src/libs/Forem/Generated/Forem.IReactionsClient.CreateReactionsToggle.g.cs b/src/libs/Forem/Generated/Forem.IReactionsClient.CreateReactionsToggle.g.cs
index ae5a2bc..482d069 100644
--- a/src/libs/Forem/Generated/Forem.IReactionsClient.CreateReactionsToggle.g.cs
+++ b/src/libs/Forem/Generated/Forem.IReactionsClient.CreateReactionsToggle.g.cs
@@ -14,7 +14,7 @@ public partial interface IReactionsClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task CreateReactionsToggleAsync(
global::Forem.Category category,
int reactableId,
diff --git a/src/libs/Forem/Generated/Forem.IReactionsClient.g.cs b/src/libs/Forem/Generated/Forem.IReactionsClient.g.cs
index 9f6a6f9..234498d 100644
--- a/src/libs/Forem/Generated/Forem.IReactionsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IReactionsClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IReactionsClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IReadinglistClient.GetReadinglist.g.cs b/src/libs/Forem/Generated/Forem.IReadinglistClient.GetReadinglist.g.cs
index 034a443..51df451 100644
--- a/src/libs/Forem/Generated/Forem.IReadinglistClient.GetReadinglist.g.cs
+++ b/src/libs/Forem/Generated/Forem.IReadinglistClient.GetReadinglist.g.cs
@@ -16,7 +16,7 @@ public partial interface IReadinglistClient
/// Default Value: 30
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetReadinglistAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IReadinglistClient.g.cs b/src/libs/Forem/Generated/Forem.IReadinglistClient.g.cs
index aa1c961..ffa5e8d 100644
--- a/src/libs/Forem/Generated/Forem.IReadinglistClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IReadinglistClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IReadinglistClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.ITagsClient.GetTags.g.cs b/src/libs/Forem/Generated/Forem.ITagsClient.GetTags.g.cs
index 6af44cf..db1878b 100644
--- a/src/libs/Forem/Generated/Forem.ITagsClient.GetTags.g.cs
+++ b/src/libs/Forem/Generated/Forem.ITagsClient.GetTags.g.cs
@@ -17,7 +17,7 @@ public partial interface ITagsClient
/// Default Value: 10
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> GetTagsAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.ITagsClient.g.cs b/src/libs/Forem/Generated/Forem.ITagsClient.g.cs
index 45bc1df..61a6f84 100644
--- a/src/libs/Forem/Generated/Forem.ITagsClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.ITagsClient.g.cs
@@ -24,6 +24,12 @@ public partial interface ITagsClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IUsersClient.GetUser.g.cs b/src/libs/Forem/Generated/Forem.IUsersClient.GetUser.g.cs
index bcc35ca..e95c566 100644
--- a/src/libs/Forem/Generated/Forem.IUsersClient.GetUser.g.cs
+++ b/src/libs/Forem/Generated/Forem.IUsersClient.GetUser.g.cs
@@ -12,7 +12,7 @@ public partial interface IUsersClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetUserAsync(
string id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IUsersClient.GetUserMe.g.cs b/src/libs/Forem/Generated/Forem.IUsersClient.GetUserMe.g.cs
index 24a0e28..1f0ea54 100644
--- a/src/libs/Forem/Generated/Forem.IUsersClient.GetUserMe.g.cs
+++ b/src/libs/Forem/Generated/Forem.IUsersClient.GetUserMe.g.cs
@@ -9,7 +9,7 @@ public partial interface IUsersClient
/// This endpoint allows the client to retrieve information about the authenticated user
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task GetUserMeAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Forem/Generated/Forem.IUsersClient.PostAdminUsersCreate.g.cs b/src/libs/Forem/Generated/Forem.IUsersClient.PostAdminUsersCreate.g.cs
index a23fe44..e58a979 100644
--- a/src/libs/Forem/Generated/Forem.IUsersClient.PostAdminUsersCreate.g.cs
+++ b/src/libs/Forem/Generated/Forem.IUsersClient.PostAdminUsersCreate.g.cs
@@ -11,7 +11,7 @@ public partial interface IUsersClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task PostAdminUsersCreateAsync(
global::Forem.UserInviteParam request,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IUsersClient.SuspendUser.g.cs b/src/libs/Forem/Generated/Forem.IUsersClient.SuspendUser.g.cs
index 1dc343e..06dcc40 100644
--- a/src/libs/Forem/Generated/Forem.IUsersClient.SuspendUser.g.cs
+++ b/src/libs/Forem/Generated/Forem.IUsersClient.SuspendUser.g.cs
@@ -15,7 +15,7 @@ public partial interface IUsersClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task SuspendUserAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IUsersClient.UnpublishUser.g.cs b/src/libs/Forem/Generated/Forem.IUsersClient.UnpublishUser.g.cs
index 806c7c3..1268d88 100644
--- a/src/libs/Forem/Generated/Forem.IUsersClient.UnpublishUser.g.cs
+++ b/src/libs/Forem/Generated/Forem.IUsersClient.UnpublishUser.g.cs
@@ -19,7 +19,7 @@ public partial interface IUsersClient
///
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task UnpublishUserAsync(
int id,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Forem/Generated/Forem.IUsersClient.g.cs b/src/libs/Forem/Generated/Forem.IUsersClient.g.cs
index 74cdc74..a8b39a0 100644
--- a/src/libs/Forem/Generated/Forem.IUsersClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IUsersClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IUsersClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.IVideosClient.Videos.g.cs b/src/libs/Forem/Generated/Forem.IVideosClient.Videos.g.cs
index 82c9e28..19c42b9 100644
--- a/src/libs/Forem/Generated/Forem.IVideosClient.Videos.g.cs
+++ b/src/libs/Forem/Generated/Forem.IVideosClient.Videos.g.cs
@@ -17,7 +17,7 @@ public partial interface IVideosClient
/// Default Value: 24
///
/// The token to cancel the operation with
- ///
+ ///
global::System.Threading.Tasks.Task> VideosAsync(
int? page = default,
int? perPage = default,
diff --git a/src/libs/Forem/Generated/Forem.IVideosClient.g.cs b/src/libs/Forem/Generated/Forem.IVideosClient.g.cs
index 8e9c135..e378d2e 100644
--- a/src/libs/Forem/Generated/Forem.IVideosClient.g.cs
+++ b/src/libs/Forem/Generated/Forem.IVideosClient.g.cs
@@ -24,6 +24,12 @@ public partial interface IVideosClient : global::System.IDisposable
///
public global::System.Collections.Generic.List Authorizations { get; }
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ ///
+ public bool ReadResponseAsString { get; set; }
+
///
///
///
diff --git a/src/libs/Forem/Generated/Forem.Models.Article.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.Article.Json.g.cs
new file mode 100644
index 0000000..9e2e2b7
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.Article.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class Article
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.Article? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.Article),
+ jsonSerializerContext) as global::Forem.Article;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.Article? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.Article),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.Article;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.Article.g.cs b/src/libs/Forem/Generated/Forem.Models.Article.g.cs
index 70c1448..32c1715 100644
--- a/src/libs/Forem/Generated/Forem.Models.Article.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.Article.g.cs
@@ -20,91 +20,22 @@ public sealed partial class Article
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static global::Forem.Article? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public Article(
+ global::Forem.ArticleArticle1? article1)
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.Article),
- jsonSerializerContext) as global::Forem.Article;
+ this.Article1 = article1;
}
///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.Article? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ public Article()
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
}
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.Article),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.Article;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.ArticleArticle1.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.ArticleArticle1.Json.g.cs
new file mode 100644
index 0000000..02936bf
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.ArticleArticle1.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class ArticleArticle1
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.ArticleArticle1? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.ArticleArticle1),
+ jsonSerializerContext) as global::Forem.ArticleArticle1;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.ArticleArticle1? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.ArticleArticle1),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.ArticleArticle1;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.ArticleArticle1.g.cs b/src/libs/Forem/Generated/Forem.Models.ArticleArticle1.g.cs
index bc9a6ad..825c469 100644
--- a/src/libs/Forem/Generated/Forem.Models.ArticleArticle1.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.ArticleArticle1.g.cs
@@ -68,91 +68,48 @@ public sealed partial class ArticleArticle1
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::Forem.ArticleArticle1? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.ArticleArticle1),
- jsonSerializerContext) as global::Forem.ArticleArticle1;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.ArticleArticle1? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public ArticleArticle1(
+ string? title,
+ string? bodyMarkdown,
+ bool? published,
+ string? series,
+ string? mainImage,
+ string? canonicalUrl,
+ string? description,
+ string? tags,
+ int? organizationId)
{
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.ArticleArticle1),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.ArticleArticle1;
+ this.Title = title;
+ this.BodyMarkdown = bodyMarkdown;
+ this.Published = published;
+ this.Series = series;
+ this.MainImage = mainImage;
+ this.CanonicalUrl = canonicalUrl;
+ this.Description = description;
+ this.Tags = tags;
+ this.OrganizationId = organizationId;
}
///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ public ArticleArticle1()
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
}
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.ArticleFlareTag.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.ArticleFlareTag.Json.g.cs
new file mode 100644
index 0000000..f723c45
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.ArticleFlareTag.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class ArticleFlareTag
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.ArticleFlareTag? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.ArticleFlareTag),
+ jsonSerializerContext) as global::Forem.ArticleFlareTag;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.ArticleFlareTag? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.ArticleFlareTag),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.ArticleFlareTag;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.ArticleFlareTag.g.cs b/src/libs/Forem/Generated/Forem.Models.ArticleFlareTag.g.cs
index dc31e79..90b5530 100644
--- a/src/libs/Forem/Generated/Forem.Models.ArticleFlareTag.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.ArticleFlareTag.g.cs
@@ -32,91 +32,32 @@ public sealed partial class ArticleFlareTag
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::Forem.ArticleFlareTag? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.ArticleFlareTag),
- jsonSerializerContext) as global::Forem.ArticleFlareTag;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.ArticleFlareTag? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ ///
+ ///
+ /// Background color (hexadecimal)
+ ///
+ ///
+ /// Text color (hexadecimal)
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public ArticleFlareTag(
+ string? name,
+ string? bgColorHex,
+ string? textColorHex)
{
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.ArticleFlareTag),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.ArticleFlareTag;
+ this.Name = name;
+ this.BgColorHex = bgColorHex;
+ this.TextColorHex = textColorHex;
}
///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ public ArticleFlareTag()
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
}
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.ArticleIndex.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.ArticleIndex.Json.g.cs
new file mode 100644
index 0000000..660f7de
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.ArticleIndex.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class ArticleIndex
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.ArticleIndex? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.ArticleIndex),
+ jsonSerializerContext) as global::Forem.ArticleIndex;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.ArticleIndex? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.ArticleIndex),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.ArticleIndex;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.ArticleIndex.g.cs b/src/libs/Forem/Generated/Forem.Models.ArticleIndex.g.cs
index b1e759c..84041c3 100644
--- a/src/libs/Forem/Generated/Forem.Models.ArticleIndex.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.ArticleIndex.g.cs
@@ -187,91 +187,104 @@ public sealed partial class ArticleIndex
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::Forem.ArticleIndex? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.ArticleIndex),
- jsonSerializerContext) as global::Forem.ArticleIndex;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.ArticleIndex? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Crossposting or published date time
+ ///
+ ///
+ /// Reading time, in minutes
+ ///
+ ///
+ /// The resource creator
+ ///
+ ///
+ /// Flare tag of the article
+ ///
+ ///
+ /// The organization the resource belongs to
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public ArticleIndex(
+ string typeOf,
+ int id,
+ string title,
+ string description,
+ string? coverImage,
+ string readablePublishDate,
+ string socialImage,
+ global::System.Collections.Generic.IList tagList,
+ string tags,
+ string slug,
+ string path,
+ string url,
+ string canonicalUrl,
+ int positiveReactionsCount,
+ int publicReactionsCount,
+ global::System.DateTime createdAt,
+ global::System.DateTime? editedAt,
+ global::System.DateTime? crosspostedAt,
+ global::System.DateTime publishedAt,
+ global::System.DateTime lastCommentAt,
+ global::System.DateTime publishedTimestamp,
+ int readingTimeMinutes,
+ global::Forem.SharedUser user,
+ global::Forem.ArticleFlareTag? flareTag,
+ global::Forem.SharedOrganization? organization)
{
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.ArticleIndex),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.ArticleIndex;
+ this.TypeOf = typeOf ?? throw new global::System.ArgumentNullException(nameof(typeOf));
+ this.Id = id;
+ this.Title = title ?? throw new global::System.ArgumentNullException(nameof(title));
+ this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description));
+ this.CoverImage = coverImage ?? throw new global::System.ArgumentNullException(nameof(coverImage));
+ this.ReadablePublishDate = readablePublishDate ?? throw new global::System.ArgumentNullException(nameof(readablePublishDate));
+ this.SocialImage = socialImage ?? throw new global::System.ArgumentNullException(nameof(socialImage));
+ this.TagList = tagList ?? throw new global::System.ArgumentNullException(nameof(tagList));
+ this.Tags = tags ?? throw new global::System.ArgumentNullException(nameof(tags));
+ this.Slug = slug ?? throw new global::System.ArgumentNullException(nameof(slug));
+ this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path));
+ this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url));
+ this.CanonicalUrl = canonicalUrl ?? throw new global::System.ArgumentNullException(nameof(canonicalUrl));
+ this.PositiveReactionsCount = positiveReactionsCount;
+ this.PublicReactionsCount = publicReactionsCount;
+ this.CreatedAt = createdAt;
+ this.EditedAt = editedAt;
+ this.CrosspostedAt = crosspostedAt;
+ this.PublishedAt = publishedAt;
+ this.LastCommentAt = lastCommentAt;
+ this.PublishedTimestamp = publishedTimestamp;
+ this.ReadingTimeMinutes = readingTimeMinutes;
+ this.User = user ?? throw new global::System.ArgumentNullException(nameof(user));
+ this.FlareTag = flareTag;
+ this.Organization = organization;
}
///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ public ArticleIndex()
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
}
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.Comment.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.Comment.Json.g.cs
new file mode 100644
index 0000000..eb55ea1
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.Comment.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class Comment
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.Comment? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.Comment),
+ jsonSerializerContext) as global::Forem.Comment;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.Comment? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.Comment),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.Comment;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.Comment.g.cs b/src/libs/Forem/Generated/Forem.Models.Comment.g.cs
index 384d0c5..342b336 100644
--- a/src/libs/Forem/Generated/Forem.Models.Comment.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.Comment.g.cs
@@ -38,91 +38,33 @@ public sealed partial class Comment
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::Forem.Comment? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.Comment),
- jsonSerializerContext) as global::Forem.Comment;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.Comment? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ ///
+ ///
+ ///
+ ///
+ /// Podcast image url
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public Comment(
+ string? typeOf,
+ string? idCode,
+ global::System.DateTime? createdAt,
+ string? imageUrl)
{
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.Comment),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.Comment;
+ this.TypeOf = typeOf;
+ this.IdCode = idCode;
+ this.CreatedAt = createdAt;
+ this.ImageUrl = imageUrl;
}
///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ public Comment()
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
}
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.DisplayAd.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.DisplayAd.Json.g.cs
new file mode 100644
index 0000000..323a0b8
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.DisplayAd.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class DisplayAd
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.DisplayAd? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.DisplayAd),
+ jsonSerializerContext) as global::Forem.DisplayAd;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.DisplayAd? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.DisplayAd),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.DisplayAd;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.DisplayAd.g.cs b/src/libs/Forem/Generated/Forem.Models.DisplayAd.g.cs
index 0af7d1d..0ce94a4 100644
--- a/src/libs/Forem/Generated/Forem.Models.DisplayAd.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.DisplayAd.g.cs
@@ -104,91 +104,89 @@ public sealed partial class DisplayAd
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::Forem.DisplayAd? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.DisplayAd),
- jsonSerializerContext) as global::Forem.DisplayAd;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.DisplayAd? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ ///
+ /// The ID of the Display Ad
+ ///
+ ///
+ /// For internal use, helps distinguish ads from one another
+ ///
+ ///
+ /// The text (in markdown) of the ad (required)
+ ///
+ ///
+ /// Ad must be both published and approved to be in rotation
+ ///
+ ///
+ /// Ad must be both published and approved to be in rotation
+ ///
+ ///
+ /// Identifies the organization to which the ad belongs
+ ///
+ ///
+ /// Identifies the user who created the ad.
+ ///
+ ///
+ /// Identifies which area of site layout the ad can appear in
+ ///
+ ///
+ /// Tags on which this ad can be displayed (blank is all/any tags)
+ ///
+ ///
+ /// Articles this ad should *not* appear on (blank means no articles are disallowed, and this ad can appear next to any/all articles). Comma-separated list of integer Article IDs
+ ///
+ ///
+ /// Specifies an group of users to show this ad to (only works with logged-in users)
+ ///
+ ///
+ /// Potentially limits visitors to whom the ad is visible
+ /// Default Value: all
+ ///
+ ///
+ /// Types of the billboards:
+ /// in_house (created by admins),
+ /// community (created by an entity, appears on entity's content),
+ /// external ( created by an entity, or a non-entity, can appear everywhere)
+ /// Default Value: in_house
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public DisplayAd(
+ string name,
+ string bodyMarkdown,
+ global::Forem.DisplayAdPlacementArea placementArea,
+ int? id,
+ bool? approved,
+ bool? published,
+ int? organizationId,
+ int? creatorId,
+ string? tagList,
+ string? articleExcludeIds,
+ global::Forem.DisplayAdAudienceSegmentType? audienceSegmentType,
+ global::Forem.DisplayAdDisplayTo? displayTo,
+ global::Forem.DisplayAdTypeOf? typeOf)
{
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.DisplayAd),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.DisplayAd;
+ this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
+ this.BodyMarkdown = bodyMarkdown ?? throw new global::System.ArgumentNullException(nameof(bodyMarkdown));
+ this.PlacementArea = placementArea;
+ this.Id = id;
+ this.Approved = approved;
+ this.Published = published;
+ this.OrganizationId = organizationId;
+ this.CreatorId = creatorId;
+ this.TagList = tagList;
+ this.ArticleExcludeIds = articleExcludeIds;
+ this.AudienceSegmentType = audienceSegmentType;
+ this.DisplayTo = displayTo;
+ this.TypeOf = typeOf;
}
///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ public DisplayAd()
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
}
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.FollowedTag.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.FollowedTag.Json.g.cs
new file mode 100644
index 0000000..d9f901a
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.FollowedTag.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class FollowedTag
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.FollowedTag? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.FollowedTag),
+ jsonSerializerContext) as global::Forem.FollowedTag;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.FollowedTag? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.FollowedTag),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.FollowedTag;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.FollowedTag.g.cs b/src/libs/Forem/Generated/Forem.Models.FollowedTag.g.cs
index 58533c8..18cf90b 100644
--- a/src/libs/Forem/Generated/Forem.Models.FollowedTag.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.FollowedTag.g.cs
@@ -35,91 +35,30 @@ public sealed partial class FollowedTag
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::Forem.FollowedTag? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.FollowedTag),
- jsonSerializerContext) as global::Forem.FollowedTag;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.FollowedTag? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ ///
+ /// Tag id
+ ///
+ ///
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public FollowedTag(
+ long id,
+ string name,
+ float points)
{
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.FollowedTag),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.FollowedTag;
+ this.Id = id;
+ this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
+ this.Points = points;
}
///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ public FollowedTag()
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
}
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.GetArticleByIdResponse.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.GetArticleByIdResponse.Json.g.cs
new file mode 100644
index 0000000..a138461
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.GetArticleByIdResponse.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class GetArticleByIdResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.GetArticleByIdResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.GetArticleByIdResponse),
+ jsonSerializerContext) as global::Forem.GetArticleByIdResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.GetArticleByIdResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.GetArticleByIdResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetArticleByIdResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.GetArticleByIdResponse.g.cs b/src/libs/Forem/Generated/Forem.Models.GetArticleByIdResponse.g.cs
index 5120184..6211734 100644
--- a/src/libs/Forem/Generated/Forem.Models.GetArticleByIdResponse.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.GetArticleByIdResponse.g.cs
@@ -15,91 +15,13 @@ public sealed partial class GetArticleByIdResponse
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static global::Forem.GetArticleByIdResponse? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public GetArticleByIdResponse(
+ )
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.GetArticleByIdResponse),
- jsonSerializerContext) as global::Forem.GetArticleByIdResponse;
}
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.GetArticleByIdResponse? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.GetArticleByIdResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetArticleByIdResponse;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.GetArticleByPathResponse.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.GetArticleByPathResponse.Json.g.cs
new file mode 100644
index 0000000..f9efd9e
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.GetArticleByPathResponse.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class GetArticleByPathResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.GetArticleByPathResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.GetArticleByPathResponse),
+ jsonSerializerContext) as global::Forem.GetArticleByPathResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.GetArticleByPathResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.GetArticleByPathResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetArticleByPathResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.GetArticleByPathResponse.g.cs b/src/libs/Forem/Generated/Forem.Models.GetArticleByPathResponse.g.cs
index d2e57ad..5eddbf8 100644
--- a/src/libs/Forem/Generated/Forem.Models.GetArticleByPathResponse.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.GetArticleByPathResponse.g.cs
@@ -15,91 +15,13 @@ public sealed partial class GetArticleByPathResponse
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static global::Forem.GetArticleByPathResponse? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public GetArticleByPathResponse(
+ )
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.GetArticleByPathResponse),
- jsonSerializerContext) as global::Forem.GetArticleByPathResponse;
}
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.GetArticleByPathResponse? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.GetArticleByPathResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetArticleByPathResponse;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.GetFollowersResponseItem.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.GetFollowersResponseItem.Json.g.cs
new file mode 100644
index 0000000..8a52e4d
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.GetFollowersResponseItem.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class GetFollowersResponseItem
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.GetFollowersResponseItem? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.GetFollowersResponseItem),
+ jsonSerializerContext) as global::Forem.GetFollowersResponseItem;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.GetFollowersResponseItem? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.GetFollowersResponseItem),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetFollowersResponseItem;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.GetFollowersResponseItem.g.cs b/src/libs/Forem/Generated/Forem.Models.GetFollowersResponseItem.g.cs
index 550fbaa..586d665 100644
--- a/src/libs/Forem/Generated/Forem.Models.GetFollowersResponseItem.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.GetFollowersResponseItem.g.cs
@@ -50,91 +50,47 @@ public sealed partial class GetFollowersResponseItem
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static global::Forem.GetFollowersResponseItem? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.GetFollowersResponseItem),
- jsonSerializerContext) as global::Forem.GetFollowersResponseItem;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.GetFollowersResponseItem? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ ///
+ /// user_follower by default
+ ///
+ ///
+ ///
+ /// The follower's user id
+ ///
+ ///
+ /// The follower's name
+ ///
+ ///
+ /// A path to the follower's profile
+ ///
+ ///
+ /// Profile image (640x640)
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public GetFollowersResponseItem(
+ string? typeOf,
+ int? id,
+ int? userId,
+ string? name,
+ string? path,
+ string? profileImage)
{
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.GetFollowersResponseItem),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetFollowersResponseItem;
+ this.TypeOf = typeOf;
+ this.Id = id;
+ this.UserId = userId;
+ this.Name = name;
+ this.Path = path;
+ this.ProfileImage = profileImage;
}
///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ /// Initializes a new instance of the class.
///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ public GetFollowersResponseItem()
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
}
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.GetOrganizationResponse.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.GetOrganizationResponse.Json.g.cs
new file mode 100644
index 0000000..8a0e42d
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.GetOrganizationResponse.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class GetOrganizationResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.GetOrganizationResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.GetOrganizationResponse),
+ jsonSerializerContext) as global::Forem.GetOrganizationResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.GetOrganizationResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.GetOrganizationResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetOrganizationResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.GetOrganizationResponse.g.cs b/src/libs/Forem/Generated/Forem.Models.GetOrganizationResponse.g.cs
index 2361163..a0afd1c 100644
--- a/src/libs/Forem/Generated/Forem.Models.GetOrganizationResponse.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.GetOrganizationResponse.g.cs
@@ -15,91 +15,13 @@ public sealed partial class GetOrganizationResponse
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static global::Forem.GetOrganizationResponse? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public GetOrganizationResponse(
+ )
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.GetOrganizationResponse),
- jsonSerializerContext) as global::Forem.GetOrganizationResponse;
}
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.GetOrganizationResponse? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.GetOrganizationResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetOrganizationResponse;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.GetProfileImageResponse.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.GetProfileImageResponse.Json.g.cs
new file mode 100644
index 0000000..efde423
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.GetProfileImageResponse.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class GetProfileImageResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.GetProfileImageResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.GetProfileImageResponse),
+ jsonSerializerContext) as global::Forem.GetProfileImageResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.GetProfileImageResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.GetProfileImageResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetProfileImageResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.GetProfileImageResponse.g.cs b/src/libs/Forem/Generated/Forem.Models.GetProfileImageResponse.g.cs
index 8e10d2f..8f0b742 100644
--- a/src/libs/Forem/Generated/Forem.Models.GetProfileImageResponse.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.GetProfileImageResponse.g.cs
@@ -15,91 +15,13 @@ public sealed partial class GetProfileImageResponse
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static global::Forem.GetProfileImageResponse? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public GetProfileImageResponse(
+ )
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.GetProfileImageResponse),
- jsonSerializerContext) as global::Forem.GetProfileImageResponse;
}
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.GetProfileImageResponse? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.GetProfileImageResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetProfileImageResponse;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
-
}
}
\ No newline at end of file
diff --git a/src/libs/Forem/Generated/Forem.Models.GetUserMeResponse.Json.g.cs b/src/libs/Forem/Generated/Forem.Models.GetUserMeResponse.Json.g.cs
new file mode 100644
index 0000000..ed4b051
--- /dev/null
+++ b/src/libs/Forem/Generated/Forem.Models.GetUserMeResponse.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace Forem
+{
+ public sealed partial class GetUserMeResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::Forem.GetUserMeResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::Forem.GetUserMeResponse),
+ jsonSerializerContext) as global::Forem.GetUserMeResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::Forem.GetUserMeResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::Forem.GetUserMeResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetUserMeResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/Forem/Generated/Forem.Models.GetUserMeResponse.g.cs b/src/libs/Forem/Generated/Forem.Models.GetUserMeResponse.g.cs
index ade50f2..7ce5163 100644
--- a/src/libs/Forem/Generated/Forem.Models.GetUserMeResponse.g.cs
+++ b/src/libs/Forem/Generated/Forem.Models.GetUserMeResponse.g.cs
@@ -15,91 +15,13 @@ public sealed partial class GetUserMeResponse
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
+ /// Initializes a new instance of the class.
///
- public static global::Forem.GetUserMeResponse? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public GetUserMeResponse(
+ )
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::Forem.GetUserMeResponse),
- jsonSerializerContext) as global::Forem.GetUserMeResponse;
}
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::Forem.GetUserMeResponse? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::Forem.GetUserMeResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::Forem.GetUserMeResponse;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStream(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync