From 8e39fb85c5ef9b502a903462bb5efddc6b91e23a Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 8 Mar 2025 10:28:12 +0100 Subject: [PATCH] Improved the ERI client to raise an error when the server responds with additional JSON data --- app/MindWork AI Studio/Tools/ERIClient/ERIClientBase.cs | 3 ++- app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Tools/ERIClient/ERIClientBase.cs b/app/MindWork AI Studio/Tools/ERIClient/ERIClientBase.cs index 18f5d2ed..58811b07 100644 --- a/app/MindWork AI Studio/Tools/ERIClient/ERIClientBase.cs +++ b/app/MindWork AI Studio/Tools/ERIClient/ERIClientBase.cs @@ -9,9 +9,10 @@ public abstract class ERIClientBase(string baseAddress) : IDisposable { WriteIndented = true, AllowTrailingCommas = true, + PropertyNameCaseInsensitive = true, PropertyNamingPolicy = JsonNamingPolicy.CamelCase, DictionaryKeyPolicy = JsonNamingPolicy.CamelCase, - PropertyNameCaseInsensitive = true, + UnmappedMemberHandling = JsonUnmappedMemberHandling.Disallow, Converters = { new JsonStringEnumConverter(JsonNamingPolicy.SnakeCaseUpper), diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md index b1797bd4..fafe029a 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.32.md @@ -1,3 +1,4 @@ # v0.9.32, build 207 (2025-03-xx xx:xx UTC) - Added the "Community & Code" section to the about page. It includes links to the GitHub repositories and the project website. -- Improved the ERI client to expect JSON responses and send JSON requests using camel case. \ No newline at end of file +- Improved the ERI client to expect JSON responses and send JSON requests using camel case. +- Improved the ERI client to raise an error when the server responds with additional JSON data that is not expected. \ No newline at end of file