Skip to content

Update Microsoft.AspNetCore.OData package reference to support v 9.2.1 #1129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/AspNetCore/OData/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)','$(MSBuildThisFileDirectory)../'))" />

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OData" Version="8.2.3" />
<PackageReference Include="Microsoft.AspNetCore.OData" Version="9.2.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ private void VisitAction( HttpActionDescriptor action )
var attributes = new List<EnableQueryAttribute>( controller.GetCustomAttributes<EnableQueryAttribute>( inherit: true ) );

attributes.AddRange( action.GetCustomAttributes<EnableQueryAttribute>( inherit: true ) );
VisitEnableQuery( attributes );
VisitEnableQuery( attributes.ToArray() );
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>8.1.0</VersionPrefix>
<AssemblyVersion>8.1.0.0</AssemblyVersion>
<VersionPrefix>8.2.0</VersionPrefix>
<AssemblyVersion>8.2.0.0</AssemblyVersion>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<RootNamespace>Asp.Versioning</RootNamespace>
<AssemblyTitle>ASP.NET Core API Versioning API Explorer for OData v4.0</AssemblyTitle>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Support OData 9.0 ([#1103](https://github.com/dotnet/aspnet-api-versioning/issues/1103))
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>8.1.0</VersionPrefix>
<AssemblyVersion>8.1.0.0</AssemblyVersion>
<VersionPrefix>8.2.0</VersionPrefix>
<AssemblyVersion>8.2.0.0</AssemblyVersion>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<RootNamespace>Asp.Versioning</RootNamespace>
<AssemblyTitle>ASP.NET Core API Versioning with OData v4.0</AssemblyTitle>
Expand All @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OData" Version="[8.0.2,9.0.0)" />
<PackageReference Include="Microsoft.AspNetCore.OData" Version="[8.0.2,10.0.0)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private static
return (metadataControllers, supported, deprecated);
}

private static ControllerModel? SelectBestMetadataController( IReadOnlyList<ControllerModel> controllers )
private static ControllerModel? SelectBestMetadataController( List<ControllerModel> controllers )
{
// note: there should be at least 2 metadata controllers, but there could be 3+
// if a developer defines their own custom controller. ultimately, there can be
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Support OData 9.0 ([#1103](https://github.com/dotnet/aspnet-api-versioning/issues/1103))
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ private static void AssertQueryOptionWithoutOData( ApiDescription description, s
parameter.ModelMetadata.Description.Should().EndWith( suffix + '.' );
}

private void PrintGroup( IReadOnlyList<ApiDescription> items )
private void PrintGroup( ApiDescription[] items )
{
for ( var i = 0; i < items.Count; i++ )
for ( var i = 0; i < items.Length; i++ )
{
var item = items[i];
console.WriteLine( $"[{item.GroupName}] {item.HttpMethod} {item.RelativePath}" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Asp.Versioning.ApplicationModels;
[CLSCompliant( false )]
public sealed class DefaultApiControllerFilter : IApiControllerFilter
{
private readonly IReadOnlyList<IApiControllerSpecification> specifications;
private readonly List<IApiControllerSpecification> specifications;

/// <summary>
/// Initializes a new instance of the <see cref="DefaultApiControllerFilter"/> class.
Expand All @@ -19,7 +19,7 @@ public sealed class DefaultApiControllerFilter : IApiControllerFilter
/// <see cref="IApiControllerSpecification">specifications</see> used by the filter
/// to identify API controllers.</param>
public DefaultApiControllerFilter( IEnumerable<IApiControllerSpecification> specifications ) =>
this.specifications = specifications.ToArray();
this.specifications = specifications.ToList();

/// <inheritdoc />
public IList<ControllerModel> Apply( IList<ControllerModel> controllers )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ private void VisitModel( IEdmStructuredType modelType )
VisitMaxTop( querySettings );
}

private void VisitEnableQuery( IReadOnlyList<EnableQueryAttribute> attributes )
private void VisitEnableQuery( EnableQueryAttribute[] attributes )
{
var @default = new EnableQueryAttribute();

for ( var i = 0; i < attributes.Count; i++ )
for ( var i = 0; i < attributes.Length; i++ )
{
var attribute = attributes[i];

Expand Down
Loading