Skip to content
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

Add support for odata v9 #1108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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.0.0" />
</ItemGroup>

</Project>
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>9.0.0</VersionPrefix>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<TargetFrameworks>$(DefaultTargetFramework);netstandard1.0;netstandard2.0</TargetFrameworks>
<AssemblyTitle>API Versioning Abstractions</AssemblyTitle>
<Description>The abstractions library for API versioning.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,15 @@ protected virtual void ExploreQueryOptions( IEnumerable<ApiDescription> apiDescr
{
var localODataOptions = ODataOptions;
var localQueryOptions = Options.QueryOptions;
#pragma warning disable CS0618 // Type or member is obsolete
var settings = new ODataQueryOptionSettings()
{
NoDollarPrefix = localODataOptions.EnableNoDollarQueryOptions,
DescriptionProvider = localQueryOptions.DescriptionProvider,
DefaultQuerySettings = localODataOptions.QuerySettings,
ModelMetadataProvider = ModelMetadataProvider,
};
#pragma warning restore CS0618 // Type or member is obsolete

localQueryOptions.ApplyTo( apiDescriptions, settings );
}
Expand Down Expand Up @@ -309,10 +311,14 @@ private void ExpandNavigationPropertyLinks(
switch ( template[i] )
{
case EntitySetSegmentTemplate segment:
#pragma warning disable CS0618 // Type or member is obsolete
entity = segment.EntitySet.EntityType();
#pragma warning restore CS0618 // Type or member is obsolete
break;
case SingletonSegmentTemplate segment:
#pragma warning disable CS0618 // Type or member is obsolete
entity = segment.Singleton.EntityType();
#pragma warning restore CS0618 // Type or member is obsolete
break;
}
}
Expand Down
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>9.0.0</VersionPrefix>
<AssemblyVersion>9.0.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,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>8.1.0</VersionPrefix>
<AssemblyVersion>8.1.0.0</AssemblyVersion>
<VersionPrefix>9.0.0</VersionPrefix>
<AssemblyVersion>9.0.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
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>8.1.0</VersionPrefix>
<AssemblyVersion>8.1.0.0</AssemblyVersion>
<VersionPrefix>9.0.0</VersionPrefix>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<RootNamespace>Asp.Versioning</RootNamespace>
<AssemblyTitle>ASP.NET Core API Versioning</AssemblyTitle>
Expand Down
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>9.0.0</VersionPrefix>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<RootNamespace>Asp.Versioning.ApiExplorer</RootNamespace>
<AssemblyTitle>ASP.NET Core API Versioning API Explorer</AssemblyTitle>
Expand Down
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>9.0.0</VersionPrefix>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<RootNamespace>Asp.Versioning</RootNamespace>
<AssemblyTitle>ASP.NET Core API Versioning</AssemblyTitle>
Expand Down
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>9.0.0</VersionPrefix>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<TargetFrameworks>$(DefaultTargetFramework);netstandard1.1;netstandard2.0</TargetFrameworks>
<RootNamespace>Asp.Versioning.Http</RootNamespace>
<AssemblyTitle>API Versioning Client Extensions</AssemblyTitle>
Expand Down