Skip to content

Commit cc3e7bf

Browse files
committed
fix: Fixed project.
1 parent 5e9dd9c commit cc3e7bf

File tree

47 files changed

+2969
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2969
-8
lines changed

CSharpToJsonSchema.sln

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ Global
8080
{6167F915-83EB-42F9-929B-AD4719A55811}.Debug|Any CPU.Build.0 = Debug|Any CPU
8181
{6167F915-83EB-42F9-929B-AD4719A55811}.Release|Any CPU.ActiveCfg = Release|Any CPU
8282
{6167F915-83EB-42F9-929B-AD4719A55811}.Release|Any CPU.Build.0 = Release|Any CPU
83+
{1942E3E5-F151-4C90-BECE-140AAD8C66DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
84+
{1942E3E5-F151-4C90-BECE-140AAD8C66DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
85+
{DC07C90E-A58C-44B3-82D2-E2EB8F777B92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
86+
{DC07C90E-A58C-44B3-82D2-E2EB8F777B92}.Debug|Any CPU.Build.0 = Debug|Any CPU
8387
EndGlobalSection
8488
GlobalSection(SolutionProperties) = preSolution
8589
HideSolutionNode = FALSE

src/libs/CSharpToJsonSchema.Generators/CSharpToJsonSchema.Generators.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PrivateAssets>all</PrivateAssets>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>
26-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
26+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" PrivateAssets="all" />
2727
<PackageReference Include="H.Generators.Extensions" Version="1.24.2" PrivateAssets="all" />
2828

2929
</ItemGroup>

src/libs/CSharpToJsonSchema.Generators/JsonGen/Base/SyntaxValueProviderExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Immutable;
22
using System.Diagnostics;
3+
using CSharpToJsonSchema.Generators.JsonGen.Helpers;
34
using Microsoft.CodeAnalysis;
45
using Microsoft.CodeAnalysis.CSharp;
56

src/libs/CSharpToJsonSchema/CSharpToJsonSchema.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<ItemGroup>
2020
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.3.0-preview.1.25114.11" />
21-
<PackageReference Include="System.Text.Json" Version="9.0.0" />
21+
<PackageReference Include="System.Text.Json" Version="9.0.2" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

src/tests/AotConsole/Services/StudentRecordService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ public class StudentRecordService
66
[System.ComponentModel.Description("Get student record for the year")]
77
[FunctionTool(MeaiFunctionTool = true)]
88

9-
public async Task<StudentRecord> GetStudentRecordAsync(QueryStudentRecordRequest query, CancellationToken cancellationToken = default)
9+
public Task<StudentRecord> GetStudentRecordAsync(QueryStudentRecordRequest query, CancellationToken cancellationToken = default)
1010
{
11-
return new StudentRecord
11+
return Task.FromResult(new StudentRecord
1212
{
1313
StudentId = "12345",
1414
FullName = query.FullName,
@@ -22,7 +22,7 @@ public async Task<StudentRecord> GetStudentRecordAsync(QueryStudentRecordRequest
2222
},
2323
EnrollmentDate = new DateTime(2020, 9, 1),
2424
IsActive = true
25-
};
25+
});
2626
}
2727
}
2828

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//HintName: IVariousTypesTools.Boolean.g.cs
2+
// <auto-generated/>
3+
4+
#nullable enable annotations
5+
#nullable disable warnings
6+
7+
// Suppress warnings about [Obsolete] member usage in generated code.
8+
#pragma warning disable CS0612, CS0618
9+
10+
namespace CSharpToJsonSchema.IntegrationTests
11+
{
12+
public partial class VariousTypesToolsExtensionsJsonSerializerContext
13+
{
14+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool>? _Boolean;
15+
16+
/// <summary>
17+
/// Defines the source generated JSON serialization contract metadata for a given type.
18+
/// </summary>
19+
#nullable disable annotations // Marking the property type as nullable-oblivious.
20+
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool> Boolean
21+
#nullable enable annotations
22+
{
23+
get => _Boolean ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool>)Options.GetTypeInfo(typeof(bool));
24+
}
25+
26+
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool> Create_Boolean(global::System.Text.Json.JsonSerializerOptions options)
27+
{
28+
if (!TryGetTypeInfoForRuntimeCustomConverter<bool>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<bool> jsonTypeInfo))
29+
{
30+
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<bool>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.BooleanConverter);
31+
}
32+
33+
jsonTypeInfo.OriginatingResolver = this;
34+
return jsonTypeInfo;
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)