File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/JsonApiDotNetCore/Configuration Expand file tree Collapse file tree 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
6262 if ( configureInstance != null )
6363 {
6464 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." ) ;
6667 }
6768 }
6869 }
Original file line number Diff line number Diff line change 11#if ! NET8_0
22using FluentAssertions ;
33using JsonApiDotNetCore . Configuration ;
4+ using JsonApiDotNetCore . Errors ;
45using Microsoft . AspNetCore . Builder ;
56using Microsoft . AspNetCore . TestHost ;
67using Microsoft . Extensions . DependencyInjection ;
@@ -24,8 +25,9 @@ public async Task Throws_when_AspNet_OpenApi_is_registered()
2425 Action action = app . UseJsonApi ;
2526
2627 // 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." ) ;
2931 }
3032}
3133#endif
You can’t perform that action at this time.
0 commit comments