diff --git a/src/libs/AutoSDK/Helpers/OpenApi31Support.cs b/src/libs/AutoSDK/Helpers/OpenApi31Support.cs index 661a0c2379..1870aec8bd 100644 --- a/src/libs/AutoSDK/Helpers/OpenApi31Support.cs +++ b/src/libs/AutoSDK/Helpers/OpenApi31Support.cs @@ -74,94 +74,97 @@ private static void ConvertJsonNode(JsonObject node) } string keyString = entry.Key; - // if (keyString == "anyOf" && - // entry.Value is JsonArray anyOfList && anyOfList.Count == 2 && - // anyOfList.Any(v => - // v is JsonObject objects && - // objects.ContainsKey("type") && - // objects["type"] == null)) - // { - // var first = anyOfList[0] as JsonObject; - // var second = anyOfList[1] as JsonObject; - // var firstType = first?["type"]; - // var secondType = second?["type"]; - // - // if (firstType == null || secondType == null) - // { - // // Replace "anyOf" with "type: string, nullable: true" - // node["type"] = firstType?.ToString() ?? secondType?.ToString(); - // node["nullable"] = true; - // - // var nonNullObject = firstType != null ? first : second; - // foreach (var kvp in nonNullObject) - // { - // node[kvp.Key] = kvp.Value; - // } - // - // node.Remove(keyString); - // } - // } if (keyString == "openapi") { node["openapi"] = "3.0.3"; } - // if (keyString == "exclusiveMinimum" && entry.Value is not JsonValue) - // { - // node["minimum"] = entry.Value; - // node["exclusiveMinimum"] = true; - // } - // if (keyString == "exclusiveMaximum" && entry.Value is not JsonValue) - // { - // node["maximum"] = entry.Value; - // node["exclusiveMaximum"] = true; - // } - // - // // Identify "type" that is a list containing "string" and "null" - // if (keyString == "type" && - // entry.Value is JsonArray typeList && - // typeList.Contains(null)) - // { - // // Replace "type" with "string" and add "nullable: true" - // node["type"] = typeList.First(v => v != null).ToString(); - // node["nullable"] = true; - // - // // If there's an "enum", remove the "null" from its values - // if (node.TryGetPropertyValue("enum", out var enumValue) && enumValue is JsonArray enumList) - // { - // node["enum"] = new JsonArray(enumList.Where(v => v != null).ToArray()); - // } - // } - // - // // Replace "examples" with single "example" - // if (keyString == "examples" && entry.Value is JsonArray { Count: > 0 } examplesList) - // { - // node.Remove(keyString); - // node["example"] = examplesList[0]; - // } - // - // // Fix "example" node when "items" is missing and "example" is a list - // if (keyString == "example" && entry.Value is JsonArray { Count: > 0 } exampleList && !node.ContainsKey("items")) - // { - // node["example"] = exampleList[0]; - // } - // - // // Identify "const" node for removal and convert to "enum" if "enum" is missing - // if (keyString == "const") - // { - // if (!node.ContainsKey("enum")) - // { - // node["enum"] = new JsonArray(entry.Value); - // } - // node.Remove(keyString); - // } - // - // // Fix "items" node when "$ref" is present and "items" is a list - // if (keyString == "items" && entry.Value is JsonArray itemsNode && - // itemsNode.ElementAtOrDefault(0) is JsonObject itemsValue && - // itemsValue.ElementAtOrDefault(0).Key == "$ref") - // { - // node["items"] = itemsValue; - // } + + if (keyString == "anyOf" && + entry.Value is JsonArray anyOfList && anyOfList.Count == 2 && + anyOfList.Any(v => + v is JsonObject objects && + objects.ContainsKey("type") && + objects["type"] == null)) + { + var first = anyOfList[0] as JsonObject; + var second = anyOfList[1] as JsonObject; + var firstType = first?["type"]; + var secondType = second?["type"]; + + if (firstType == null || secondType == null) + { + // Replace "anyOf" with "type: string, nullable: true" + node["type"] = firstType?.ToString() ?? secondType?.ToString(); + node["nullable"] = true; + + var nonNullObject = firstType != null ? first : second; + foreach (var kvp in nonNullObject!) + { + node[kvp.Key] = kvp.Value; + } + + node.Remove(keyString); + } + } + + if (keyString == "exclusiveMinimum" && entry.Value is not JsonValue) + { + node["minimum"] = entry.Value; + node["exclusiveMinimum"] = true; + } + + if (keyString == "exclusiveMaximum" && entry.Value is not JsonValue) + { + node["maximum"] = entry.Value; + node["exclusiveMaximum"] = true; + } + + // Identify "type" that is a list containing "string" and "null" + if (keyString == "type" && + entry.Value is JsonArray typeList && + typeList.Contains(null)) + { + // Replace "type" with "string" and add "nullable: true" + node["type"] = typeList.First(v => v != null)?.ToString(); + node["nullable"] = true; + + // If there's an "enum", remove the "null" from its values + if (node.TryGetPropertyValue("enum", out var enumValue) && enumValue is JsonArray enumList) + { + node["enum"] = new JsonArray(enumList.Where(v => v != null).ToArray()); + } + } + + // Replace "examples" with single "example" + if (keyString == "examples" && entry.Value is JsonArray { Count: > 0 } examplesList) + { + node.Remove(keyString); + node["example"] = examplesList[0]?.DeepClone(); + } + + // Fix "example" node when "items" is missing and "example" is a list + if (keyString == "example" && entry.Value is JsonArray { Count: > 0 } exampleList && !node.ContainsKey("items")) + { + node["example"] = exampleList[0]?.DeepClone(); + } + + // Identify "const" node for removal and convert to "enum" if "enum" is missing + if (keyString == "const") + { + if (!node.ContainsKey("enum")) + { + node["enum"] = new JsonArray(entry.Value); + } + node.Remove(keyString); + } + + // Fix "items" node when "$ref" is present and "items" is a list + if (keyString == "items" && entry.Value is JsonArray itemsNode && + itemsNode.ElementAtOrDefault(0) is JsonObject itemsValue && + itemsValue.ElementAtOrDefault(0).Key == "$ref") + { + node["items"] = itemsValue.DeepClone(); + } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.IVoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.IVoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs index 304290e38b..4fdec2f7ce 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.IVoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.IVoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs @@ -28,13 +28,16 @@ public partial interface IVoiceGenerationClient /// Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website. /// /// - /// Name to use for the created voice. + /// Name to use for the created voice.
+ /// Example: Little squeaky mouse /// /// - /// Description to use for the created voice. + /// Description to use for the created voice.
+ /// Example: A sassy little squeaky mouse /// /// - /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet. + /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet.
+ /// Example: 37HceQefKmEi3bGovXjL /// /// /// List of voice ids that the user has played but not selected. Used for RLHF.
diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.IVoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.IVoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs index 98946b0248..9fd06ad98a 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.IVoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.IVoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs @@ -40,7 +40,8 @@ public partial interface IVoiceGenerationClient /// The strength of the accent of the generated voice. Has to be between 0.3 and 2.0. /// /// - /// Text to generate, text length has to be between 100 and 1000. + /// Text to generate, text length has to be between 100 and 1000.
+ /// Example: Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. /// /// The token to cancel the operation with /// diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.Models.BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.Models.BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs index 28acd4beed..b11767cd62 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.Models.BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.Models.BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs @@ -10,19 +10,22 @@ namespace G public sealed partial class BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost { /// - /// Name to use for the created voice. + /// Name to use for the created voice.
+ /// Example: Little squeaky mouse ///
[global::Newtonsoft.Json.JsonProperty("voice_name", Required = global::Newtonsoft.Json.Required.Always)] public string VoiceName { get; set; } = default!; /// - /// Description to use for the created voice. + /// Description to use for the created voice.
+ /// Example: A sassy little squeaky mouse ///
[global::Newtonsoft.Json.JsonProperty("voice_description", Required = global::Newtonsoft.Json.Required.Always)] public string VoiceDescription { get; set; } = default!; /// - /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet. + /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet.
+ /// Example: 37HceQefKmEi3bGovXjL ///
[global::Newtonsoft.Json.JsonProperty("generated_voice_id", Required = global::Newtonsoft.Json.Required.Always)] public string GeneratedVoiceId { get; set; } = default!; diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.Models.BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.Models.BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs index 9949ccb60d..3fe0949883 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.Models.BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.Models.BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs @@ -34,7 +34,8 @@ public sealed partial class BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoi public double AccentStrength { get; set; } = default!; /// - /// Text to generate, text length has to be between 100 and 1000. + /// Text to generate, text length has to be between 100 and 1000.
+ /// Example: Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. ///
[global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] public string Text { get; set; } = default!; diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.VoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.VoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs index 4d2faf80ba..97ef9d09af 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.VoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.VoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs @@ -122,13 +122,16 @@ partial void ProcessCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoiceP /// Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website. /// /// - /// Name to use for the created voice. + /// Name to use for the created voice.
+ /// Example: Little squeaky mouse /// /// - /// Description to use for the created voice. + /// Description to use for the created voice.
+ /// Example: A sassy little squeaky mouse /// /// - /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet. + /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet.
+ /// Example: 37HceQefKmEi3bGovXjL /// /// /// List of voice ids that the user has played but not selected. Used for RLHF.
diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.VoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.VoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs index 2e4ddc515d..44de506ccf 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.VoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/NewtonsoftJson/_#G.VoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs @@ -134,7 +134,8 @@ partial void ProcessGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostRespon /// The strength of the accent of the generated voice. Has to be between 0.3 and 2.0. /// /// - /// Text to generate, text length has to be between 100 and 1000. + /// Text to generate, text length has to be between 100 and 1000.
+ /// Example: Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. /// /// The token to cancel the operation with /// diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.IVoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.IVoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs index 304290e38b..4fdec2f7ce 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.IVoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.IVoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs @@ -28,13 +28,16 @@ public partial interface IVoiceGenerationClient /// Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website. /// /// - /// Name to use for the created voice. + /// Name to use for the created voice.
+ /// Example: Little squeaky mouse /// /// - /// Description to use for the created voice. + /// Description to use for the created voice.
+ /// Example: A sassy little squeaky mouse /// /// - /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet. + /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet.
+ /// Example: 37HceQefKmEi3bGovXjL /// /// /// List of voice ids that the user has played but not selected. Used for RLHF.
diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.IVoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.IVoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs index 98946b0248..9fd06ad98a 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.IVoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.IVoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs @@ -40,7 +40,8 @@ public partial interface IVoiceGenerationClient /// The strength of the accent of the generated voice. Has to be between 0.3 and 2.0. /// /// - /// Text to generate, text length has to be between 100 and 1000. + /// Text to generate, text length has to be between 100 and 1000.
+ /// Example: Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. /// /// The token to cancel the operation with /// diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.Models.BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.Models.BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs index e5f3a0e2d7..8a1674966a 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.Models.BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.Models.BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs @@ -10,21 +10,24 @@ namespace G public sealed partial class BodyCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost { /// - /// Name to use for the created voice. + /// Name to use for the created voice.
+ /// Example: Little squeaky mouse ///
[global::System.Text.Json.Serialization.JsonPropertyName("voice_name")] [global::System.Text.Json.Serialization.JsonRequired] public required string VoiceName { get; set; } /// - /// Description to use for the created voice. + /// Description to use for the created voice.
+ /// Example: A sassy little squeaky mouse ///
[global::System.Text.Json.Serialization.JsonPropertyName("voice_description")] [global::System.Text.Json.Serialization.JsonRequired] public required string VoiceDescription { get; set; } /// - /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet. + /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet.
+ /// Example: 37HceQefKmEi3bGovXjL ///
[global::System.Text.Json.Serialization.JsonPropertyName("generated_voice_id")] [global::System.Text.Json.Serialization.JsonRequired] diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.Models.BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.Models.BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs index b2620e5d97..3742dd860b 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.Models.BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.Models.BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs @@ -40,7 +40,8 @@ public sealed partial class BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoi public required double AccentStrength { get; set; } /// - /// Text to generate, text length has to be between 100 and 1000. + /// Text to generate, text length has to be between 100 and 1000.
+ /// Example: Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. ///
[global::System.Text.Json.Serialization.JsonPropertyName("text")] [global::System.Text.Json.Serialization.JsonRequired] diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.VoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.VoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs index 6b75ba09c3..5360408828 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.VoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.VoiceGenerationClient.CreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoicePost.g.verified.cs @@ -122,13 +122,16 @@ partial void ProcessCreateAPreviouslyGeneratedVoiceV1VoiceGenerationCreateVoiceP /// Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website. /// /// - /// Name to use for the created voice. + /// Name to use for the created voice.
+ /// Example: Little squeaky mouse /// /// - /// Description to use for the created voice. + /// Description to use for the created voice.
+ /// Example: A sassy little squeaky mouse /// /// - /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet. + /// The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don't have one yet.
+ /// Example: 37HceQefKmEi3bGovXjL /// /// /// List of voice ids that the user has played but not selected. Used for RLHF.
diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.VoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.VoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs index 50fcf0facf..44f99f099c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.VoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/elevenlabs/SystemTextJson/_#G.VoiceGenerationClient.GenerateARandomVoiceV1VoiceGenerationGenerateVoicePost.g.verified.cs @@ -134,7 +134,8 @@ partial void ProcessGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostRespon /// The strength of the accent of the generated voice. Has to be between 0.3 and 2.0. /// /// - /// Text to generate, text length has to be between 100 and 1000. + /// Text to generate, text length has to be between 100 and 1000.
+ /// Example: Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. /// /// The token to cancel the operation with /// diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/elevenlabs.json/ValidationTests.Validation_NewErrors.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/elevenlabs.json/ValidationTests.Validation_NewErrors.verified.txt index e7441ce704..6fef4e1270 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/elevenlabs.json/ValidationTests.Validation_NewErrors.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/elevenlabs.json/ValidationTests.Validation_NewErrors.verified.txt @@ -15,22 +15,6 @@ Message: include_in_schema is not a valid property at #/components/schemas/Body_Add_project_v1_projects_add_post/properties/callback_url, Pointer: }, - { - Message: examples is not a valid property at #/components/schemas/Body_Create_a_previously_generated_voice_v1_voice_generation_create_voice_post/properties/voice_name, - Pointer: - }, - { - Message: examples is not a valid property at #/components/schemas/Body_Create_a_previously_generated_voice_v1_voice_generation_create_voice_post/properties/voice_description, - Pointer: - }, - { - Message: examples is not a valid property at #/components/schemas/Body_Create_a_previously_generated_voice_v1_voice_generation_create_voice_post/properties/generated_voice_id, - Pointer: - }, - { - Message: examples is not a valid property at #/components/schemas/Body_Create_a_previously_generated_voice_v1_voice_generation_create_voice_post/properties/labels, - Pointer: - }, { Message: name is not a valid property at #/components/schemas/Body_Create_a_previously_generated_voice_v1_voice_generation_create_voice_post/properties/labels, Pointer: @@ -39,10 +23,6 @@ Message: emded is not a valid property at #/components/schemas/Body_Dub_a_video_or_an_audio_file_v1_dubbing_post/properties/use_profanity_filter, Pointer: }, - { - Message: examples is not a valid property at #/components/schemas/Body_Generate_a_random_voice_v1_voice_generation_generate_voice_post/properties/text, - Pointer: - }, { Message: include_in_schema is not a valid property at #/components/schemas/Body_Text_to_speech_streaming_v1_text_to_speech__voice_id__stream_post/properties/use_pvc_as_ivc, Pointer: diff --git a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/elevenlabs.json/_.verified.txt b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/elevenlabs.json/_.verified.txt index 063d73c68d..1ea12c686e 100644 --- a/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/elevenlabs.json/_.verified.txt +++ b/src/tests/AutoSDK.UnitTests/Snapshots/Validation/ConvertedSpecs/elevenlabs.json/_.verified.txt @@ -5209,25 +5209,19 @@ "type": "string", "title": "Voice Name", "description": "Name to use for the created voice.", - "examples": [ - "Little squeaky mouse" - ] + "example": "Little squeaky mouse" }, "voice_description": { "type": "string", "title": "Voice Description", "description": "Description to use for the created voice.", - "examples": [ - "A sassy little squeaky mouse" - ] + "example": "A sassy little squeaky mouse" }, "generated_voice_id": { "type": "string", "title": "Generated Voice Id", "description": "The generated_voice_id to create, call POST /v1/voice-generation/generate-voice and fetch the generated_voice_id from the response header if don\u0027t have one yet.", - "examples": [ - "37HceQefKmEi3bGovXjL" - ] + "example": "37HceQefKmEi3bGovXjL" }, "played_not_selected_voice_ids": { "items": { @@ -5245,12 +5239,10 @@ "type": "object", "title": "Labels", "description": "Optional, metadata to add to the created voice. Defaults to None.", - "examples": [ - { - "language": "en" - } - ], - "name": "Voice metadata" + "name": "Voice metadata", + "example": { + "language": "en" + } } }, "type": "object", @@ -5560,9 +5552,7 @@ "minLength": 100, "title": "Text", "description": "Text to generate, text length has to be between 100 and 1000.", - "examples": [ - "Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted." - ] + "example": "Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted." } }, "type": "object",