Skip to content

Commit f22d932

Browse files
committed
refactor: routing convention implements controller mapping interface
1 parent b4baf91 commit f22d932

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/JsonApiDotNetCore/Builders/JsonApiApplicationBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void ConfigureMvc()
7373

7474
var routingConvention = intermediateProvider.GetRequiredService<IJsonApiRoutingConvention>();
7575
_mvcBuilder.AddMvcOptions(opt => opt.Conventions.Insert(0, routingConvention));
76-
_services.AddSingleton((IControllerResourceMapping)routingConvention);
76+
_services.AddSingleton<IControllerResourceMapping>(routingConvention);
7777
}
7878

7979
/// <summary>

src/JsonApiDotNetCore/Internal/IJsonApiRoutingConvention.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ namespace JsonApiDotNetCore.Internal
66
/// Service for specifying which routing convention to use. This can be overriden to customize
77
/// the relation between controllers and mapped routes.
88
/// </summary>
9-
public interface IJsonApiRoutingConvention : IApplicationModelConvention { }
9+
public interface IJsonApiRoutingConvention : IApplicationModelConvention, IControllerResourceMapping { }
1010
}

0 commit comments

Comments
 (0)