Skip to content

Commit 34da9a7

Browse files
committed
feat: add included object to documents
1 parent abc7de0 commit 34da9a7

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/JsonApiDotNetCore/Models/Document.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Collections.Generic;
12
using Newtonsoft.Json;
23

34
namespace JsonApiDotNetCore.Models
@@ -6,5 +7,8 @@ public class Document
67
{
78
[JsonProperty("data")]
89
public DocumentData Data { get; set; }
10+
11+
[JsonProperty("included")]
12+
public List<DocumentData> Included { get; set; }
913
}
1014
}

src/JsonApiDotNetCore/Models/DocumentData.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public string Type
2020

2121
[JsonProperty("attributes")]
2222
public Dictionary<string, object> Attributes { get; set; }
23-
2423

2524
[JsonProperty("relationships")]
2625
public Dictionary<string, RelationshipData> Relationships { get; set; }

src/JsonApiDotNetCore/Models/Documents.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ public class Documents
77
{
88
[JsonProperty("data")]
99
public List<DocumentData> Data { get; set; }
10+
11+
[JsonProperty("included")]
12+
public List<DocumentData> Included { get; set; }
1013
}
1114
}

0 commit comments

Comments
 (0)