Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public partial interface IStatsClient
/// Get ground truth agreement statistics for a specific user within a project.
/// </summary>
/// <param name="id"></param>
/// <param name="perLabel"></param>
/// <param name="perLabel">
/// Default Value: false
/// </param>
/// <param name="userPk"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
Expand All @@ -37,7 +39,9 @@ public partial interface IStatsClient
/// Get ground truth agreement statistics for a specific user within a project.
/// </summary>
/// <param name="id"></param>
/// <param name="perLabel"></param>
/// <param name="perLabel">
/// Default Value: false
/// </param>
/// <param name="userPk"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,38 @@ partial void ProcessTotalAgreementResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
//
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
global::System.Exception? __exception_400 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
}
}
catch (global::System.Exception __ex)
{
__exception_400 = __ex;
}


throw global::LabelStudio.ApiException.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
responseBody: __content_400,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}

if (__effectiveReadResponseAsString)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ partial void ProcessUserGroundTruthAgreementResponseContent(
/// Get ground truth agreement statistics for a specific user within a project.
/// </summary>
/// <param name="id"></param>
/// <param name="perLabel"></param>
/// <param name="perLabel">
/// Default Value: false
/// </param>
/// <param name="userPk"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
Expand Down Expand Up @@ -89,7 +91,9 @@ partial void ProcessUserGroundTruthAgreementResponseContent(
/// Get ground truth agreement statistics for a specific user within a project.
/// </summary>
/// <param name="id"></param>
/// <param name="perLabel"></param>
/// <param name="perLabel">
/// Default Value: false
/// </param>
/// <param name="userPk"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
Expand Down
7 changes: 5 additions & 2 deletions src/libs/LabelStudio/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13619,7 +13619,7 @@ paths:
required: true
schema:
type: string
- description: Per label
- description: Calculate agreement per label. Not supported for projects using dimension-based agreement (Agreement V2), which returns HTTP 400.
in: query
name: per_label
schema:
Expand Down Expand Up @@ -14318,6 +14318,8 @@ paths:
description: Total agreement
'204':
description: No data to compute agreement
'400':
description: Agreement V1 API is not supported for Agreement V2 projects
security:
- Token: []
summary: ✨ Get total agreement for project
Expand Down Expand Up @@ -14955,10 +14957,11 @@ paths:
required: true
schema:
type: integer
- description: Calculate agreement per label
- description: Calculate agreement per label. Not supported for projects using dimension-based agreement (Agreement V2), which returns HTTP 400.
in: query
name: per_label
schema:
default: false
type: boolean
- in: path
name: user_pk
Expand Down