From bc84571dedaa934568787da8104333d2da7ea5ae Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Sat, 2 Dec 2023 23:27:20 +0330 Subject: [PATCH 1/2] add verion --- .../EasyMicroservices.IdentityMicroservice.Clients.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj index e2f9639..fce7a81 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.4 + 0.0.0.5 client generated code. EasyMicroservices@gmail.com microservice,Identity,Identity,client From 971f976af355e4d0bed754c2cf2b1d21b9ef118d Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Sat, 2 Dec 2023 23:36:51 +0330 Subject: [PATCH 2/2] update client --- .../ConnectedService.json | 2 +- .../IdentityGeneratedServices/OpenAPI.cs | 2 +- .../IdentityGeneratedServices/OpenAPI.nswag | 2 +- ...rvices.IdentityMicroservice.Clients.csproj | 6 +---- .../SafeContractResolver.cs | 24 ------------------- 5 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/SafeContractResolver.cs diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/ConnectedService.json b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/ConnectedService.json index 3854835..621887e 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/ConnectedService.json +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/ConnectedService.json @@ -82,7 +82,7 @@ "HandleReferences": false, "GenerateImmutableArrayProperties": false, "GenerateImmutableDictionaryProperties": false, - "JsonSerializerSettingsTransformationMethod": "new EasyMicroservices.IdentityMicroservice.Clients.MyJsonSerializerSettings", + "JsonSerializerSettingsTransformationMethod": "new EasyMicroservices.Cores.Clients.CoreSerializerSettings", "InlineNamedArrays": false, "InlineNamedDictionaries": false, "InlineNamedTuples": true, diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.cs index 93d8cd7..df78846 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.cs @@ -34,7 +34,7 @@ public AuthenticationClient(string baseUrl, System.Net.Http.HttpClient httpClien private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { - var settings = new EasyMicroservices.IdentityMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + var settings = new EasyMicroservices.Cores.Clients.CoreSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); UpdateJsonSerializerSettings(settings); return settings; } diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.nswag b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.nswag index 8144db8..21487c7 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.nswag +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/Connected Services/IdentityGeneratedServices/OpenAPI.nswag @@ -78,7 +78,7 @@ "handleReferences": false, "generateImmutableArrayProperties": false, "generateImmutableDictionaryProperties": false, - "jsonSerializerSettingsTransformationMethod": "new EasyMicroservices.IdentityMicroservice.Clients.MyJsonSerializerSettings", + "jsonSerializerSettingsTransformationMethod": "new EasyMicroservices.Cores.Clients.CoreSerializerSettings", "inlineNamedArrays": false, "inlineNamedDictionaries": false, "inlineNamedTuples": true, diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj index fce7a81..90238ff 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/EasyMicroservices.IdentityMicroservice.Clients.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net6.0 AnyCPU;x64;x86 EasyMicroservices - true + true 0.0.0.5 client generated code. EasyMicroservices@gmail.com @@ -25,10 +25,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - \ No newline at end of file diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/SafeContractResolver.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/SafeContractResolver.cs deleted file mode 100644 index 5c1783f..0000000 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients/SafeContractResolver.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using System.Reflection; - -namespace EasyMicroservices.IdentityMicroservice.Clients -{ - internal class SafeContractResolver : DefaultContractResolver - { - protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) - { - var jsonProp = base.CreateProperty(member, memberSerialization); - jsonProp.Required = Required.Default; - return jsonProp; - } - } - - internal class MyJsonSerializerSettings : JsonSerializerSettings - { - public MyJsonSerializerSettings(JsonSerializerSettings settings) - { - this.ContractResolver = new SafeContractResolver(); - } - } -}