-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into andrueastman/fixmutipleparams
- Loading branch information
Showing
53 changed files
with
1,820 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
....Builder/Configuration/ClientOperation.cs → ...uilder/Configuration/ConsumerOperation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
namespace Kiota.Builder.Configuration; | ||
public enum ClientOperation | ||
public enum ConsumerOperation | ||
{ | ||
Add, | ||
Edit, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/Kiota.Builder/OpenApiExtensions/OpenApiAiReasoningInstructionsExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.OpenApi; | ||
using Microsoft.OpenApi.Any; | ||
using Microsoft.OpenApi.Interfaces; | ||
using Microsoft.OpenApi.Writers; | ||
|
||
namespace Kiota.Builder.OpenApiExtensions; | ||
|
||
public class OpenApiAiReasoningInstructionsExtension : IOpenApiExtension | ||
{ | ||
public static string Name => "x-ai-reasoning-instructions"; | ||
#pragma warning disable CA1002 // Do not expose generic lists | ||
public List<string> ReasoningInstructions { get; init; } = []; | ||
#pragma warning restore CA1002 // Do not expose generic lists | ||
public void Write(IOpenApiWriter writer, OpenApiSpecVersion specVersion) | ||
{ | ||
ArgumentNullException.ThrowIfNull(writer); | ||
if (ReasoningInstructions != null && | ||
ReasoningInstructions.Count != 0) | ||
{ | ||
writer.WriteStartArray(); | ||
foreach (var instruction in ReasoningInstructions) | ||
{ | ||
writer.WriteValue(instruction); | ||
} | ||
writer.WriteEndArray(); | ||
} | ||
} | ||
public static OpenApiAiReasoningInstructionsExtension Parse(IOpenApiAny source) | ||
{ | ||
if (source is not OpenApiArray rawArray) throw new ArgumentOutOfRangeException(nameof(source)); | ||
var result = new OpenApiAiReasoningInstructionsExtension(); | ||
result.ReasoningInstructions.AddRange(rawArray.OfType<OpenApiString>().Select(x => x.Value)); | ||
return result; | ||
} | ||
} |
Oops, something went wrong.