File tree 2 files changed +9
-0
lines changed
src/JsonApiDotNetCore.OpenApi/JsonApiMetadata
test/OpenApiTests/ExistingOpenApiIntegration
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1
1
using System . Linq ;
2
2
using System . Reflection ;
3
+ using JsonApiDotNetCore . Controllers ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Microsoft . AspNetCore . Mvc . Routing ;
5
6
@@ -11,6 +12,12 @@ internal sealed class EndpointResolver
11
12
{
12
13
ArgumentGuard . NotNull ( controllerAction , nameof ( controllerAction ) ) ;
13
14
15
+ if ( ! typeof ( CoreJsonApiController ) . IsAssignableFrom ( controllerAction . ReflectedType ) ||
16
+ typeof ( BaseJsonApiOperationsController ) . IsAssignableFrom ( controllerAction . ReflectedType ) )
17
+ {
18
+ return null ;
19
+ }
20
+
14
21
HttpMethodAttribute method = controllerAction . GetCustomAttributes ( true ) . OfType < HttpMethodAttribute > ( ) . FirstOrDefault ( ) ;
15
22
16
23
return ResolveJsonApiEndpoint ( method ) ;
Original file line number Diff line number Diff line change
1
+ using JetBrains . Annotations ;
1
2
using JsonApiDotNetCore . Configuration ;
2
3
using JsonApiDotNetCore . Resources . Annotations ;
3
4
using Microsoft . EntityFrameworkCore ;
6
7
7
8
namespace OpenApiTests . ExistingOpenApiIntegration
8
9
{
10
+ [ UsedImplicitly ( ImplicitUseKindFlags . InstantiatedNoFixedConstructorSignature ) ]
9
11
public sealed class ExistingOpenApiIntegrationStartup < TDbContext > : OpenApiStartup < TDbContext >
10
12
where TDbContext : DbContext
11
13
{
You can’t perform that action at this time.
0 commit comments