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 @@ -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);
}
}

}
}

Expand All @@ -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++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class RoleBasedTaskJsonConverter : global::System.Text.Json.Serialization
foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject())
{
__jsonProps.Add(__jsonProp.Name);

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public sealed partial class LseTask
public string AnnotationsResults { get; set; } = default!;

/// <summary>
/// Annotators IDs who annotated this task<br/>
/// Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display.<br/>
/// Included only in responses
/// </summary>
/// <default>default!</default>
[global::System.Text.Json.Serialization.JsonPropertyName("annotators")]
public global::System.Collections.Generic.IList<int> Annotators { get; set; } = default!;
public global::System.Collections.Generic.IList<object> Annotators { get; set; } = default!;

/// <summary>
/// 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.<br/>
Expand Down Expand Up @@ -399,7 +399,7 @@ public sealed partial class LseTask
/// Included only in responses
/// </param>
/// <param name="annotators">
/// Annotators IDs who annotated this task<br/>
/// Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display.<br/>
/// Included only in responses
/// </param>
/// <param name="annotatorsCount">
Expand Down Expand Up @@ -496,7 +496,7 @@ public LseTask(
string annotations = default!,
string annotationsIds = default!,
string annotationsResults = default!,
global::System.Collections.Generic.IList<int> annotators = default!,
global::System.Collections.Generic.IList<object> annotators = default!,
int annotatorsCount = default!,
global::System.Collections.Generic.IList<object> commentAuthors = default!,
int commentAuthorsCount = default!,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace LabelStudio
{
public sealed partial class LseTaskAnnotator
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
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;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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<global::LabelStudio.LseTaskAnnotator>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::LabelStudio.LseTaskAnnotator?> 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;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#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<global::LabelStudio.LseTaskAnnotator?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::LabelStudio.LseTaskAnnotator?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#nullable enable

namespace LabelStudio
{
/// <summary>
///
/// </summary>
public sealed partial class LseTaskAnnotator
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public sealed partial class LseTaskSerializerForReviewers
public string AnnotationsResults { get; set; } = default!;

/// <summary>
/// Annotators IDs who annotated this task<br/>
/// Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display.<br/>
/// Included only in responses
/// </summary>
/// <default>default!</default>
[global::System.Text.Json.Serialization.JsonPropertyName("annotators")]
public global::System.Collections.Generic.IList<int> Annotators { get; set; } = default!;
public global::System.Collections.Generic.IList<object> Annotators { get; set; } = default!;

/// <summary>
/// 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.<br/>
Expand Down Expand Up @@ -399,7 +399,7 @@ public sealed partial class LseTaskSerializerForReviewers
/// Included only in responses
/// </param>
/// <param name="annotators">
/// Annotators IDs who annotated this task<br/>
/// Who annotated this task; each item includes user_id plus minimal profile fields for Data Manager display.<br/>
/// Included only in responses
/// </param>
/// <param name="annotatorsCount">
Expand Down Expand Up @@ -496,7 +496,7 @@ public LseTaskSerializerForReviewers(
string annotations = default!,
string annotationsIds = default!,
string annotationsResults = default!,
global::System.Collections.Generic.IList<int> annotators = default!,
global::System.Collections.Generic.IList<object> annotators = default!,
int annotatorsCount = default!,
global::System.Collections.Generic.IList<object> commentAuthors = default!,
int commentAuthorsCount = default!,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace LabelStudio
{
public sealed partial class LseTaskSerializerForReviewersAnnotator
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
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;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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<global::LabelStudio.LseTaskSerializerForReviewersAnnotator>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::LabelStudio.LseTaskSerializerForReviewersAnnotator?> 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;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#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<global::LabelStudio.LseTaskSerializerForReviewersAnnotator?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::LabelStudio.LseTaskSerializerForReviewersAnnotator?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#nullable enable

namespace LabelStudio
{
/// <summary>
///
/// </summary>
public sealed partial class LseTaskSerializerForReviewersAnnotator
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
16 changes: 8 additions & 8 deletions src/libs/LabelStudio/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Loading