File tree 1 file changed +3
-6
lines changed
src/AspNetCore/OData/src/Asp.Versioning.OData/OData
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -116,15 +116,12 @@ static void NoConfig( IServiceCollection sc )
116
116
// 2. OData adds a SelectorModel per EDM
117
117
// 3. ApiVersionMetadata has already be computed and added to EndpointMetadata
118
118
//
119
- // this only becomes a problem when there are multiple EDMs and a single action implementation
120
- // maps to more than one EDM.
119
+ // this becomes a problem when there are multiple EDMs and a single action implementation
120
+ // maps to more than one EDM or a dynamically added OData endpoint is added without ApiVersionMetadata .
121
121
//
122
122
// REF: https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.Core/src/ApplicationModels/ActionAttributeRouteModel.cs
123
123
// REF: https://github.com/OData/AspNetCoreOData/blob/main/src/Microsoft.AspNetCore.OData/Extensions/ActionModelExtensions.cs#L148
124
- if ( mapping . Count > 1 )
125
- {
126
- CopyApiVersionEndpointMetadata ( context . Result . Controllers ) ;
127
- }
124
+ CopyApiVersionEndpointMetadata ( context . Result . Controllers ) ;
128
125
129
126
versionedODataOptions . Mapping = mapping ;
130
127
}
You can’t perform that action at this time.
0 commit comments