Skip to content

Commit 987e65a

Browse files
authored
Merge branch 'main' into merge
2 parents 3d79725 + 084d741 commit 987e65a

File tree

16 files changed

+79
-23
lines changed

16 files changed

+79
-23
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<!-- If this is your first PR in the ASP.NET API Versioning repo, please run through the checklist below to ensure a smooth review and merge process for your PR. -->
66

7-
- [ ] You've read the [Contributor Guide](https://github.com/dotnet/aspnet-api-versioning/blob/main/CONTRIBUTING.md) and [Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
7+
- [ ] You've read the [Contributor Guide](https://github.com/dotnet/aspnet-api-versioning/blob/main/docs/CONTRIBUTING.md) and [Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
88
- [ ] You've included unit or integration tests for your change, where applicable.
99
- [ ] You've included inline docs for your change, where applicable.
1010
- [ ] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

examples/AspNetCore/OData/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Import Project="$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)','$(MSBuildThisFileDirectory)../'))" />
55

66
<ItemGroup>
7-
<PackageReference Include="Microsoft.AspNetCore.OData" Version="8.2.3" />
7+
<PackageReference Include="Microsoft.AspNetCore.OData" Version="9.2.1" />
88
</ItemGroup>
99

1010
</Project>

src/AspNetCore/Acceptance/Asp.Versioning.Mvc.Acceptance.Tests/OData/Basic/given a versioned ODataController/when using a query string.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public async Task then_get_should_return_400_for_an_unspecified_version()
4949
// assert
5050
response.StatusCode.Should().Be( BadRequest );
5151
problem.Type.Should().Be( ProblemDetailsDefaults.Unspecified.Type );
52+
problem.Extensions["code"].ToString().Should().Be( "ApiVersionUnspecified" );
5253
}
5354

5455
public when_using_a_query_string( BasicFixture fixture, ITestOutputHelper console )

src/AspNetCore/OData/src/Asp.Versioning.OData.ApiExplorer/Asp.Versioning.OData.ApiExplorer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>8.1.0</VersionPrefix>
5-
<AssemblyVersion>8.1.0.0</AssemblyVersion>
4+
<VersionPrefix>8.2.0</VersionPrefix>
5+
<AssemblyVersion>8.2.0.0</AssemblyVersion>
66
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning API Explorer for OData v4.0</AssemblyTitle>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-

1+
Support OData 9.0 ([#1103](https://github.com/dotnet/aspnet-api-versioning/issues/1103))

src/AspNetCore/OData/src/Asp.Versioning.OData/Asp.Versioning.OData.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>8.1.0</VersionPrefix>
5-
<AssemblyVersion>8.1.0.0</AssemblyVersion>
4+
<VersionPrefix>8.2.0</VersionPrefix>
5+
<AssemblyVersion>8.2.0.0</AssemblyVersion>
66
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning with OData v4.0</AssemblyTitle>
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Microsoft.AspNetCore.OData" Version="[8.0.2,9.0.0)" />
18+
<PackageReference Include="Microsoft.AspNetCore.OData" Version="[8.0.2,10.0.0)" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

src/AspNetCore/OData/src/Asp.Versioning.OData/OData/ODataApplicationModelProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private static
141141
return (metadataControllers, supported, deprecated);
142142
}
143143

144-
private static ControllerModel? SelectBestMetadataController( ControllerModel[] controllers )
144+
private static ControllerModel? SelectBestMetadataController( List<ControllerModel> controllers )
145145
{
146146
// note: there should be at least 2 metadata controllers, but there could be 3+
147147
// if a developer defines their own custom controller. ultimately, there can be
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-

1+
Support OData 9.0 ([#1103](https://github.com/dotnet/aspnet-api-versioning/issues/1103))

src/AspNetCore/WebApi/src/Asp.Versioning.Http/Routing/EndpointProblem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal static ProblemDetailsContext New( HttpContext context, ProblemDetailsIn
2525
},
2626
};
2727

28-
if ( string.IsNullOrEmpty( code ) )
28+
if ( !string.IsNullOrEmpty( code ) )
2929
{
3030
newContext.ProblemDetails.Extensions[nameof( code )] = code;
3131
}

src/AspNetCore/WebApi/src/Asp.Versioning.Mvc/ApplicationModels/DefaultApiControllerFilter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Asp.Versioning.ApplicationModels;
1010
[CLSCompliant( false )]
1111
public sealed class DefaultApiControllerFilter : IApiControllerFilter
1212
{
13-
private readonly IApiControllerSpecification[] specifications;
13+
private readonly List<IApiControllerSpecification> specifications;
1414

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

2424
/// <inheritdoc />
2525
public IList<ControllerModel> Apply( IList<ControllerModel> controllers )

0 commit comments

Comments
 (0)