From dd998d23d1fbf8b926f072b10fcbc5dbdcc485bc Mon Sep 17 00:00:00 2001 From: Axel Marquez <158314644+axelmarquezh@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:36:29 -0600 Subject: [PATCH] [ODS-6492] Update RestSharp package (#1164) --- Utilities/DataLoading/EdFi.LoadTools/EdFi.LoadTools.csproj | 2 +- .../SmokeTest/PropertyBuilders/DateTimePropertyBuilder.cs | 7 +++++-- .../PropertyBuilders/DescriptorPropertyBuilder.cs | 2 +- .../SmokeTest/PropertyBuilders/NamespacePropertyBuilder.cs | 2 +- .../SdkGen/EdFi.SdkGen.Console/EdFi.OdsApi.Sdk.nuspec | 2 +- Utilities/SdkGen/EdFi.SdkGen.Console/Options.cs | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Utilities/DataLoading/EdFi.LoadTools/EdFi.LoadTools.csproj b/Utilities/DataLoading/EdFi.LoadTools/EdFi.LoadTools.csproj index 57bb499e00..ade04432a6 100644 --- a/Utilities/DataLoading/EdFi.LoadTools/EdFi.LoadTools.csproj +++ b/Utilities/DataLoading/EdFi.LoadTools/EdFi.LoadTools.csproj @@ -31,7 +31,7 @@ - + diff --git a/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/DateTimePropertyBuilder.cs b/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/DateTimePropertyBuilder.cs index 5578787487..18ff7ac0d2 100644 --- a/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/DateTimePropertyBuilder.cs +++ b/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/DateTimePropertyBuilder.cs @@ -23,7 +23,7 @@ public DateTimePropertyBuilder(IPropertyInfoMetadataLookup metadataLookup) public override bool BuildProperty(object obj, PropertyInfo propertyInfo) { - if (!IsTypeMatch(propertyInfo)) + if (!IsTypeMatch(propertyInfo) && !IsTypeMatch(propertyInfo)) { return false; } @@ -34,7 +34,10 @@ public override bool BuildProperty(object obj, PropertyInfo propertyInfo) ? DateTime.Today.AddDays(-Random.Next(5 * 365, 99 * 365)) : DateTime.Today.AddDays(Random.Next(100)); - propertyInfo.SetValue(obj, randomDate); + propertyInfo.SetValue( + obj, IsTypeMatch(propertyInfo) + ? DateOnly.FromDateTime(randomDate) + : randomDate); } return true; diff --git a/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/DescriptorPropertyBuilder.cs b/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/DescriptorPropertyBuilder.cs index b57fc01b86..50042fd405 100644 --- a/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/DescriptorPropertyBuilder.cs +++ b/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/DescriptorPropertyBuilder.cs @@ -60,7 +60,7 @@ public override bool BuildProperty(object obj, PropertyInfo propertyInfo) .GetValue(lookup).ToString(); var uri = lookup.GetType() - .GetProperty($"Var{EdFiConstants.Namespace}") + .GetProperty(EdFiConstants.Namespace) .GetValue(lookup); var descriptorValue = uri != null && !string.IsNullOrEmpty(uri.ToString()) diff --git a/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/NamespacePropertyBuilder.cs b/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/NamespacePropertyBuilder.cs index ea006d2b7b..25b89e555e 100644 --- a/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/NamespacePropertyBuilder.cs +++ b/Utilities/DataLoading/EdFi.LoadTools/SmokeTest/PropertyBuilders/NamespacePropertyBuilder.cs @@ -27,7 +27,7 @@ public override bool BuildProperty(object obj, PropertyInfo propertyInfo) { var typeName = obj.GetType().Name; - if (propertyInfo.PropertyType != typeof(string) || propertyInfo.Name != $"Var{EdFiConstants.Namespace}") + if (propertyInfo.PropertyType != typeof(string) || propertyInfo.Name != EdFiConstants.Namespace) { return false; } diff --git a/Utilities/SdkGen/EdFi.SdkGen.Console/EdFi.OdsApi.Sdk.nuspec b/Utilities/SdkGen/EdFi.SdkGen.Console/EdFi.OdsApi.Sdk.nuspec index 967e7f074a..6ee7993f87 100644 --- a/Utilities/SdkGen/EdFi.SdkGen.Console/EdFi.OdsApi.Sdk.nuspec +++ b/Utilities/SdkGen/EdFi.SdkGen.Console/EdFi.OdsApi.Sdk.nuspec @@ -15,7 +15,7 @@ - + diff --git a/Utilities/SdkGen/EdFi.SdkGen.Console/Options.cs b/Utilities/SdkGen/EdFi.SdkGen.Console/Options.cs index 5e2aca2b33..cc7bcd88b3 100644 --- a/Utilities/SdkGen/EdFi.SdkGen.Console/Options.cs +++ b/Utilities/SdkGen/EdFi.SdkGen.Console/Options.cs @@ -28,7 +28,7 @@ public sealed class Options [Option( 'v', "cliVersion", - Default = "7.2.0", + Default = "7.9.0", HelpText = "the version of openapi-codegen-cli to download")] public string CliVersion { get; set; }