mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:47:22 +00:00
Generated the JSON contracts of providers, the runtime, and services at compile time (#1150)
This commit is contained in:
1 parent
e954881fda
commit
24e3c22db3
140 files changed
+1415
-292
No files matched your search
@@ -0,0 +1,15 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace AIStudio.Tests.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// A request in the fixtures, together with how AI Studio builds it and the options it writes it with.
|
||||
/// </summary>
|
||||
/// <param name="FileName">The name of the file in the folder Fixtures next to the tests, which holds the request as it got sent before.</param>
|
||||
/// <param name="Create">Builds the request the way AI Studio does.</param>
|
||||
/// <param name="Options">The options AI Studio writes the request with.</param>
|
||||
public sealed record JsonGoldenRequest(string FileName, Func<object> Create, JsonSerializerOptions Options)
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string ToString() => this.FileName;
|
||||
}
|
||||
Reference in new issue
Block a user