-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.Net: Remove JsonSchema.Net dependency from Microsoft.SemanticKernel.…
…Abstractions/Core (#5635) This removes the dependency, substituting in a lighter-weight schema generator that better aligns with System.Text.Json and which is likely to be built-in to STJ in a future release. All of these get removed: <img width="520" alt="image" src="https://github.com/microsoft/semantic-kernel/assets/2642209/d14005f8-f7a7-418f-ada4-a5faecb4d7ff"> The JsonSchema.Net dependency still exists from Microsoft.SemanticKernel.Plugins.OpenApi in support of the validation used in https://github.com/microsoft/semantic-kernel/blob/9ab95132b5f460f1bf9a1d1e387fb18453a037f4/dotnet/src/Functions/Functions.OpenApi/Extensions/RestApiOperationResponseExtensions.cs#L48-L51 and we can subsequently decide what to do about that. Note that the replacement highlighted some important issues with the schema previously being generated. In particular, it didn't align with how state would actually be serialized/deserialized, e.g. the schema included public fields even though the JsonSerializerOptions being used would ignore such fields. This does incur one notable reduction in functionality: today KernelJsonSchema validates that supplied text is indeed a valid JSON schema... with this change, it only validates that it's valid JSON. I think that's a reasonable tradeoff for now, and we should be able to add back the stricter validation in the future when STJ provides support for it. I don't have a good alternative right now other than keeping the significant dependency.
- Loading branch information
1 parent
9b8a218
commit 0a9e74a
Showing
22 changed files
with
2,331 additions
and
54 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Suppressing code analysis diagnostics for code included as a source copy | ||
[*.cs] | ||
dotnet_diagnostic.CA1852.severity = none | ||
dotnet_diagnostic.IDE0005.severity = none | ||
dotnet_diagnostic.IDE0009.severity = none | ||
dotnet_diagnostic.IDE0055.severity = none | ||
dotnet_diagnostic.IDE0161.severity = none | ||
dotnet_diagnostic.IDE1006.severity = none | ||
dotnet_diagnostic.RCS1211.severity = none |
Oops, something went wrong.