2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
4
using System . Reflection ;
5
+ using System . Text . Json ;
5
6
using JsonApiDotNetCore . Configuration ;
6
7
using JsonApiDotNetCore . Resources ;
7
8
using JsonApiDotNetCore . Resources . Annotations ;
8
- using Swashbuckle . AspNetCore . Newtonsoft ;
9
9
using Swashbuckle . AspNetCore . SwaggerGen ;
10
10
11
11
namespace JsonApiDotNetCore . OpenApi . SwaggerComponents
12
12
{
13
13
/// <summary>
14
- /// For schema generation, we rely on <see cref="NewtonsoftDataContractResolver " /> from Swashbuckle for all but our own JSON:API types.
14
+ /// For schema generation, we rely on <see cref="JsonSerializerDataContractResolver " /> from Swashbuckle for all but our own JSON:API types.
15
15
/// </summary>
16
16
internal sealed class JsonApiDataContractResolver : ISerializerDataContractResolver
17
17
{
18
- private readonly NewtonsoftDataContractResolver _dataContractResolver ;
18
+ private readonly JsonSerializerDataContractResolver _dataContractResolver ;
19
19
private readonly IResourceGraph _resourceGraph ;
20
20
21
21
public JsonApiDataContractResolver ( IResourceGraph resourceGraph , IJsonApiOptions jsonApiOptions )
@@ -25,8 +25,8 @@ public JsonApiDataContractResolver(IResourceGraph resourceGraph, IJsonApiOptions
25
25
26
26
_resourceGraph = resourceGraph ;
27
27
28
- var serializerOptions = jsonApiOptions . SerializerOptions ;
29
- _dataContractResolver = new NewtonsoftDataContractResolver ( serializerOptions ) ;
28
+ JsonSerializerOptions serializerOptions = jsonApiOptions . SerializerOptions ;
29
+ _dataContractResolver = new JsonSerializerDataContractResolver ( serializerOptions ) ;
30
30
}
31
31
32
32
public DataContract GetDataContractForType ( Type type )
0 commit comments