Skip to content

Commit

Permalink
[ODS-6492] Update RestSharp package (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
axelmarquezh authored Oct 16, 2024
1 parent f404d81 commit dd998d2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Utilities/DataLoading/EdFi.LoadTools/EdFi.LoadTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="JsonSubTypes" Version="2.0.1" />
<PackageReference Include="Polly" Version="8.4.1" />
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="RestSharp" Version="112.0.0" />
<PackageReference Include="Sandwych.QuickGraph.Core" Version="1.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public DateTimePropertyBuilder(IPropertyInfoMetadataLookup metadataLookup)

public override bool BuildProperty(object obj, PropertyInfo propertyInfo)
{
if (!IsTypeMatch<DateTime>(propertyInfo))
if (!IsTypeMatch<DateTime>(propertyInfo) && !IsTypeMatch<DateOnly>(propertyInfo))
{
return false;
}
Expand All @@ -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<DateOnly>(propertyInfo)
? DateOnly.FromDateTime(randomDate)
: randomDate);
}

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dependencies>
<dependency id="NewtonSoft.Json" version="13.0.3" />
<dependency id="JsonSubTypes" version="2.0.1" />
<dependency id="RestSharp" version="110.2.0" />
<dependency id="RestSharp" version="112.0.0" />
<dependency id="Polly" version="8.1.0" />
</dependencies>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion Utilities/SdkGen/EdFi.SdkGen.Console/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down

0 comments on commit dd998d2

Please sign in to comment.