From 6195d29e20f817cb2b840dfe8dfe60a954e7c25a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 Apr 2026 21:42:46 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...o.JsonConverters.MaybeExpandedComment.g.cs | 26 ++++++ ...elStudio.JsonConverters.RoleBasedTask.g.cs | 1 + .../Generated/LabelStudio.Models.LseTask.g.cs | 8 +- ...elStudio.Models.LseTaskAnnotator.Json.g.cs | 92 +++++++++++++++++++ .../LabelStudio.Models.LseTaskAnnotator.g.cs | 18 ++++ ....Models.LseTaskSerializerForReviewers.g.cs | 8 +- ...kSerializerForReviewersAnnotator.Json.g.cs | 92 +++++++++++++++++++ ...seTaskSerializerForReviewersAnnotator.g.cs | 18 ++++ src/libs/LabelStudio/openapi.yaml | 16 ++-- 9 files changed, 263 insertions(+), 16 deletions(-) create mode 100644 src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskAnnotator.Json.g.cs create mode 100644 src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskAnnotator.g.cs create mode 100644 src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewersAnnotator.Json.g.cs create mode 100644 src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewersAnnotator.g.cs diff --git a/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.MaybeExpandedComment.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.MaybeExpandedComment.g.cs index 2b7a463..07eb7d1 100644 --- a/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.MaybeExpandedComment.g.cs +++ b/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.MaybeExpandedComment.g.cs @@ -23,6 +23,14 @@ public class MaybeExpandedCommentJsonConverter : global::System.Text.Json.Serial foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) { __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + } } @@ -46,6 +54,24 @@ public class MaybeExpandedCommentJsonConverter : global::System.Text.Json.Serial if (__jsonProps.Contains("classifications")) __score1++; if (__jsonProps.Contains("created_at")) __score1++; if (__jsonProps.Contains("created_by")) __score1++; + if (__jsonProps.Contains("created_by.active_organization")) __score1++; + if (__jsonProps.Contains("created_by.active_organization_meta")) __score1++; + if (__jsonProps.Contains("created_by.allow_newsletters")) __score1++; + if (__jsonProps.Contains("created_by.avatar")) __score1++; + if (__jsonProps.Contains("created_by.custom_hotkeys")) __score1++; + if (__jsonProps.Contains("created_by.date_joined")) __score1++; + if (__jsonProps.Contains("created_by.email")) __score1++; + if (__jsonProps.Contains("created_by.first_name")) __score1++; + if (__jsonProps.Contains("created_by.id")) __score1++; + if (__jsonProps.Contains("created_by.initials")) __score1++; + if (__jsonProps.Contains("created_by.last_activity")) __score1++; + if (__jsonProps.Contains("created_by.last_name")) __score1++; + if (__jsonProps.Contains("created_by.lse_fields")) __score1++; + if (__jsonProps.Contains("created_by.org_membership")) __score1++; + if (__jsonProps.Contains("created_by.organization_membership")) __score1++; + if (__jsonProps.Contains("created_by.pause")) __score1++; + if (__jsonProps.Contains("created_by.phone")) __score1++; + if (__jsonProps.Contains("created_by.username")) __score1++; if (__jsonProps.Contains("draft")) __score1++; if (__jsonProps.Contains("id")) __score1++; if (__jsonProps.Contains("is_resolved")) __score1++; diff --git a/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.RoleBasedTask.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.RoleBasedTask.g.cs index 81d7e90..c5dc59d 100644 --- a/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.RoleBasedTask.g.cs +++ b/src/libs/LabelStudio/Generated/LabelStudio.JsonConverters.RoleBasedTask.g.cs @@ -23,6 +23,7 @@ public class RoleBasedTaskJsonConverter : global::System.Text.Json.Serialization foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) { __jsonProps.Add(__jsonProp.Name); + } } diff --git a/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTask.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTask.g.cs index cbbe488..c6d9e33 100644 --- a/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTask.g.cs +++ b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTask.g.cs @@ -59,12 +59,12 @@ public sealed partial class LseTask public string AnnotationsResults { get; set; } = default!; /// - /// Annotators IDs who annotated this task
+ /// Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display.
/// Included only in responses ///
/// default! [global::System.Text.Json.Serialization.JsonPropertyName("annotators")] - public global::System.Collections.Generic.IList Annotators { get; set; } = default!; + public global::System.Collections.Generic.IList Annotators { get; set; } = default!; /// /// The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations.
@@ -399,7 +399,7 @@ public sealed partial class LseTask /// Included only in responses /// /// - /// Annotators IDs who annotated this task
+ /// Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display.
/// Included only in responses /// /// @@ -496,7 +496,7 @@ public LseTask( string annotations = default!, string annotationsIds = default!, string annotationsResults = default!, - global::System.Collections.Generic.IList annotators = default!, + global::System.Collections.Generic.IList annotators = default!, int annotatorsCount = default!, global::System.Collections.Generic.IList commentAuthors = default!, int commentAuthorsCount = default!, diff --git a/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskAnnotator.Json.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskAnnotator.Json.g.cs new file mode 100644 index 0000000..676410c --- /dev/null +++ b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskAnnotator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace LabelStudio +{ + public sealed partial class LseTaskAnnotator + { + /// + /// 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::LabelStudio.LseTaskAnnotator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::LabelStudio.LseTaskAnnotator), + jsonSerializerContext) as global::LabelStudio.LseTaskAnnotator; + } + + /// + /// 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::LabelStudio.LseTaskAnnotator? 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::LabelStudio.LseTaskAnnotator), + jsonSerializerContext).ConfigureAwait(false)) as global::LabelStudio.LseTaskAnnotator; + } + + /// + /// 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/LabelStudio/Generated/LabelStudio.Models.LseTaskAnnotator.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskAnnotator.g.cs new file mode 100644 index 0000000..0dc26b3 --- /dev/null +++ b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskAnnotator.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace LabelStudio +{ + /// + /// + /// + public sealed partial class LseTaskAnnotator + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewers.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewers.g.cs index fa8ad5d..2c87bb6 100644 --- a/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewers.g.cs +++ b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewers.g.cs @@ -59,12 +59,12 @@ public sealed partial class LseTaskSerializerForReviewers public string AnnotationsResults { get; set; } = default!; /// - /// Annotators IDs who annotated this task
+ /// Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display.
/// Included only in responses ///
/// default! [global::System.Text.Json.Serialization.JsonPropertyName("annotators")] - public global::System.Collections.Generic.IList Annotators { get; set; } = default!; + public global::System.Collections.Generic.IList Annotators { get; set; } = default!; /// /// The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations.
@@ -399,7 +399,7 @@ public sealed partial class LseTaskSerializerForReviewers /// Included only in responses /// /// - /// Annotators IDs who annotated this task
+ /// Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display.
/// Included only in responses /// /// @@ -496,7 +496,7 @@ public LseTaskSerializerForReviewers( string annotations = default!, string annotationsIds = default!, string annotationsResults = default!, - global::System.Collections.Generic.IList annotators = default!, + global::System.Collections.Generic.IList annotators = default!, int annotatorsCount = default!, global::System.Collections.Generic.IList commentAuthors = default!, int commentAuthorsCount = default!, diff --git a/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewersAnnotator.Json.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewersAnnotator.Json.g.cs new file mode 100644 index 0000000..17c141f --- /dev/null +++ b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewersAnnotator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace LabelStudio +{ + public sealed partial class LseTaskSerializerForReviewersAnnotator + { + /// + /// 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::LabelStudio.LseTaskSerializerForReviewersAnnotator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::LabelStudio.LseTaskSerializerForReviewersAnnotator), + jsonSerializerContext) as global::LabelStudio.LseTaskSerializerForReviewersAnnotator; + } + + /// + /// 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::LabelStudio.LseTaskSerializerForReviewersAnnotator? 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::LabelStudio.LseTaskSerializerForReviewersAnnotator), + jsonSerializerContext).ConfigureAwait(false)) as global::LabelStudio.LseTaskSerializerForReviewersAnnotator; + } + + /// + /// 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/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewersAnnotator.g.cs b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewersAnnotator.g.cs new file mode 100644 index 0000000..bef27f6 --- /dev/null +++ b/src/libs/LabelStudio/Generated/LabelStudio.Models.LseTaskSerializerForReviewersAnnotator.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace LabelStudio +{ + /// + /// + /// + public sealed partial class LseTaskSerializerForReviewersAnnotator + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/LabelStudio/openapi.yaml b/src/libs/LabelStudio/openapi.yaml index b9e92a7..6a084f4 100644 --- a/src/libs/LabelStudio/openapi.yaml +++ b/src/libs/LabelStudio/openapi.yaml @@ -31499,12 +31499,12 @@ components: readOnly: true type: string annotators: - description: Annotators IDs who annotated this task + description: Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display. items: - title: User IDs - type: integer + title: Annotator + type: object readOnly: true - title: Annotators IDs + title: Annotators type: array annotators_count: description: The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations. @@ -32065,12 +32065,12 @@ components: readOnly: true type: string annotators: - description: Annotators IDs who annotated this task + description: Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display. items: - title: User IDs - type: integer + title: Annotator + type: object readOnly: true - title: Annotators IDs + title: Annotators type: array annotators_count: description: The annotators_count is calculated as the number of users with annotations (can be repeated, so same as the number of annotations) + the number of assignees without annotations.