File tree 2 files changed +6
-3
lines changed
src/JsonApiDotNetCore/Configuration
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ private static void AssertAspNetCoreOpenApiIsNotRegistered(IServiceProvider serv
62
62
if ( configureInstance != null )
63
63
{
64
64
throw new InvalidConfigurationException ( "JsonApiDotNetCore is incompatible with ASP.NET OpenAPI. " +
65
- "Replace 'services.AddOpenApi()' with 'services.AddOpenApiForJsonApi()' from the JsonApiDotNetCore.OpenApi.Swashbuckle NuGet package." ) ;
65
+ "Remove 'services.AddOpenApi()', or replace it by calling 'services.AddOpenApiForJsonApi()' after 'services.AddJsonApi()' " +
66
+ "from the JsonApiDotNetCore.OpenApi.Swashbuckle NuGet package." ) ;
66
67
}
67
68
}
68
69
}
Original file line number Diff line number Diff line change 1
1
#if ! NET8_0
2
2
using FluentAssertions ;
3
3
using JsonApiDotNetCore . Configuration ;
4
+ using JsonApiDotNetCore . Errors ;
4
5
using Microsoft . AspNetCore . Builder ;
5
6
using Microsoft . AspNetCore . TestHost ;
6
7
using Microsoft . Extensions . DependencyInjection ;
@@ -24,8 +25,9 @@ public async Task Throws_when_AspNet_OpenApi_is_registered()
24
25
Action action = app . UseJsonApi ;
25
26
26
27
// Assert
27
- action . Should ( ) . ThrowExactly < InvalidOperationException > ( ) . WithMessage ( "JsonApiDotNetCore is incompatible with ASP.NET OpenAPI. " +
28
- "Replace 'services.AddOpenApi()' with 'services.AddOpenApiForJsonApi()' from the JsonApiDotNetCore.OpenApi.Swashbuckle NuGet package." ) ;
28
+ action . Should ( ) . ThrowExactly < InvalidConfigurationException > ( ) . WithMessage ( "JsonApiDotNetCore is incompatible with ASP.NET OpenAPI. " +
29
+ "Remove 'services.AddOpenApi()', or replace it by calling 'services.AddOpenApiForJsonApi()' after 'services.AddJsonApi()' " +
30
+ "from the JsonApiDotNetCore.OpenApi.Swashbuckle NuGet package." ) ;
29
31
}
30
32
}
31
33
#endif
You can’t perform that action at this time.
0 commit comments