Skip to content

Commit 5281350

Browse files
committed
fix: public setters to allow testing
1 parent 1be2236 commit 5281350

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections.Generic;
23
using JsonApiDotNetCore.Models;
34
using JsonApiDotNetCore.Models.Links;
@@ -8,21 +9,21 @@ namespace JsonApiDotNetCore.Serialization.Client
89
/// TODO: Currently <see cref="ResourceLinks"/> and <see cref="RelationshipLinks"/>
910
/// information is ignored by the serializer. This is out of scope for now because
1011
/// it is not considered mission critical for v4.
11-
public class DeserializedResponseBase
12+
public abstract class DeserializedResponseBase
1213
{
13-
public TopLevelLinks Links { get; internal set; }
14-
public Dictionary<string, object> Meta { get; internal set; }
15-
public object Errors { get; internal set; }
16-
public object JsonApi { get; internal set; }
14+
public TopLevelLinks Links { get; set; }
15+
public Dictionary<string, object> Meta { get; set; }
16+
public object Errors { get; set; }
17+
public object JsonApi { get; set; }
1718
}
1819

1920
/// <summary>
2021
/// Represents a deserialized document with "single data".
2122
/// </summary>
2223
/// <typeparam name="TResource">Type of the resource in the primary data</typeparam>
2324
public class DeserializedSingleResponse<TResource> : DeserializedResponseBase where TResource : class, IIdentifiable
24-
{
25-
public TResource Data { get; internal set; }
25+
{
26+
public TResource Data { get; set; }
2627
}
2728

2829
/// <summary>
@@ -31,6 +32,6 @@ public class DeserializedSingleResponse<TResource> : DeserializedResponseBase wh
3132
/// <typeparam name="TResource">Type of the resource(s) in the primary data</typeparam>
3233
public class DeserializedListResponse<TResource> : DeserializedResponseBase where TResource : class, IIdentifiable
3334
{
34-
public List<TResource> Data { get; internal set; }
35+
public List<TResource> Data { get; set; }
3536
}
3637
}

0 commit comments

Comments
 (0)