Skip to content

Commit

Permalink
feat: Added generation of AdditionalProperties schemas.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Oct 11, 2024
1 parent 3c27be2 commit ddd8358
Show file tree
Hide file tree
Showing 47 changed files with 9,440 additions and 8,246 deletions.
18 changes: 9 additions & 9 deletions src/libs/AutoSDK/Models/SchemaContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ public static IReadOnlyList<SchemaContext> FromSchema(
hint: Models.Hint.ArrayItem,
depth: depth + 1));
}
// if (schema.AdditionalProperties != null)
// {
// children.AddRange(FromSchema(
// schema: schema.AdditionalProperties,
// settings: settings,
// parent: context,
// hint: Models.Hint.AdditionalProperties,
// depth: depth + 1));
// }
if (schema.AdditionalProperties != null)
{
children.AddRange(FromSchema(
schema: schema.AdditionalProperties,
settings: settings,
parent: context,
hint: Models.Hint.AdditionalProperties,
depth: depth + 1));
}

var i = 0;
foreach (var property in schema.Properties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,111 +355,111 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::G.TranscriptIabCategories? Type84 { get; set; }
public global::G.SeverityScoreSummary? Type84 { get; set; }
/// <summary>
///
/// </summary>
public global::G.OneOf<global::G.TopicDetectionModelResult, object>? Type85 { get; set; }
public global::G.TranscriptIabCategories? Type85 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TopicDetectionModelResult? Type86 { get; set; }
public global::G.OneOf<global::G.TopicDetectionModelResult, object>? Type86 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::G.TopicDetectionResult>? Type87 { get; set; }
public global::G.TopicDetectionModelResult? Type87 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TopicDetectionResult? Type88 { get; set; }
public global::System.Collections.Generic.IList<global::G.TopicDetectionResult>? Type88 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::G.TopicDetectionResultLabel>? Type89 { get; set; }
public global::G.TopicDetectionResult? Type89 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TopicDetectionResultLabel? Type90 { get; set; }
public global::System.Collections.Generic.IList<global::G.TopicDetectionResultLabel>? Type90 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TopicDetectionModelResultSummary? Type91 { get; set; }
public global::G.TopicDetectionResultLabel? Type91 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptCustomSpelling2? Type92 { get; set; }
public global::G.TopicDetectionModelResultSummary? Type92 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptAutoChapters? Type93 { get; set; }
public global::G.TranscriptCustomSpelling2? Type93 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptChapters? Type94 { get; set; }
public global::G.TranscriptAutoChapters? Type94 { get; set; }
/// <summary>
///
/// </summary>
public global::G.Chapter? Type95 { get; set; }
public global::G.TranscriptChapters? Type95 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptSummaryType? Type96 { get; set; }
public global::G.Chapter? Type96 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptSummaryModel? Type97 { get; set; }
public global::G.TranscriptSummaryType? Type97 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptSummary? Type98 { get; set; }
public global::G.TranscriptSummaryModel? Type98 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptCustomTopics? Type99 { get; set; }
public global::G.TranscriptSummary? Type99 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptSentimentAnalysis? Type100 { get; set; }
public global::G.TranscriptCustomTopics? Type100 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptSentimentAnalysisResults? Type101 { get; set; }
public global::G.TranscriptSentimentAnalysis? Type101 { get; set; }
/// <summary>
///
/// </summary>
public global::G.SentimentAnalysisResult? Type102 { get; set; }
public global::G.TranscriptSentimentAnalysisResults? Type102 { get; set; }
/// <summary>
///
/// </summary>
public global::G.Sentiment? Type103 { get; set; }
public global::G.SentimentAnalysisResult? Type103 { get; set; }
/// <summary>
///
/// </summary>
public global::G.SentimentAnalysisResultSpeaker? Type104 { get; set; }
public global::G.Sentiment? Type104 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptEntityDetection? Type105 { get; set; }
public global::G.SentimentAnalysisResultSpeaker? Type105 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptEntities? Type106 { get; set; }
public global::G.TranscriptEntityDetection? Type106 { get; set; }
/// <summary>
///
/// </summary>
public global::G.Entity? Type107 { get; set; }
public global::G.TranscriptEntities? Type107 { get; set; }
/// <summary>
///
/// </summary>
public global::G.EntityType? Type108 { get; set; }
public global::G.Entity? Type108 { get; set; }
/// <summary>
///
/// </summary>
public global::G.TranscriptThrottled? Type109 { get; set; }
public global::G.EntityType? Type109 { get; set; }
/// <summary>
///
/// </summary>
public global::G.SeverityScoreSummary? Type110 { get; set; }
public global::G.TranscriptThrottled? Type110 { get; set; }
/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//HintName: G.Models.ClassifyResponseClassificationLabels2.g.cs

#nullable enable

namespace G
{
/// <summary>
/// Included only in responses
/// </summary>
public sealed partial class ClassifyResponseClassificationLabels2
{
/// <summary>
/// Included only in responses
/// </summary>
[global::Newtonsoft.Json.JsonProperty("confidence")]
public float? Confidence { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::Newtonsoft.Json.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
@@ -0,0 +1,37 @@
//HintName: G.Models.ToolParameterDefinitions2.g.cs

#nullable enable

namespace G
{
/// <summary>
///
/// </summary>
public sealed partial class ToolParameterDefinitions2
{
/// <summary>
/// The description of the parameter.
/// </summary>
[global::Newtonsoft.Json.JsonProperty("description")]
public string? Description { get; set; }

/// <summary>
/// The type of the parameter. Must be a valid Python type.
/// </summary>
[global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)]
public string Type { get; set; } = default!;

/// <summary>
/// Denotes whether the parameter is always present (required) or not. Defaults to not required.<br/>
/// Default Value: false
/// </summary>
[global::Newtonsoft.Json.JsonProperty("required")]
public bool? Required { get; set; } = false;

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::Newtonsoft.Json.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
@@ -0,0 +1,24 @@
//HintName: G.Models.ClassifyResponseClassificationLabels2.g.cs

#nullable enable

namespace G
{
/// <summary>
/// Included only in responses
/// </summary>
public sealed partial class ClassifyResponseClassificationLabels2
{
/// <summary>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("confidence")]
public float? Confidence { get; set; }

/// <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
@@ -0,0 +1,38 @@
//HintName: G.Models.ToolParameterDefinitions2.g.cs

#nullable enable

namespace G
{
/// <summary>
///
/// </summary>
public sealed partial class ToolParameterDefinitions2
{
/// <summary>
/// The description of the parameter.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("description")]
public string? Description { get; set; }

/// <summary>
/// The type of the parameter. Must be a valid Python type.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Type { get; set; }

/// <summary>
/// Denotes whether the parameter is always present (required) or not. Defaults to not required.<br/>
/// Default Value: false
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("required")]
public bool? Required { get; set; } = false;

/// <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>();
}
}
Loading

0 comments on commit ddd8358

Please sign in to comment.