Skip to content

Commit 31247c3

Browse files
author
Chris Santero
committed
fix remaining tests
1 parent bf220f6 commit 31247c3

37 files changed

Lines changed: 894 additions & 457 deletions

File tree

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Heterogeneous/Responses/GetSearchResultsResponse.json

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,53 @@
33
{
44
"type": "posts",
55
"id": "201",
6-
"title": "Post 1",
7-
"content": "Post 1 content",
8-
"created": "2015-01-31T14:00:00+00:00",
9-
"links": {
10-
"author": "401",
11-
"comments": [ "101", "102", "103" ],
12-
"tags": [ "301", "302" ]
6+
"attributes": {
7+
"title": "Post 1",
8+
"content": "Post 1 content",
9+
"created": "2015-01-31T14:00:00+00:00"
10+
},
11+
"relationships": {
12+
"author": {
13+
"data": {
14+
"type": "users",
15+
"id": "401"
16+
}
17+
},
18+
"comments": {
19+
"data": [
20+
{ "type": "comments", "id": "101" },
21+
{ "type": "comments", "id": "102" },
22+
{ "type": "comments", "id": "103" }
23+
]
24+
},
25+
"tags": {
26+
"data": [
27+
{ "type": "tags", "id": "301" },
28+
{ "type": "tags", "id": "302" }
29+
]
30+
}
1331
}
1432
},
1533
{
1634
"type": "comments",
1735
"id": "101",
18-
"text": "Comment 1",
19-
"created": "2015-01-31T14:30:00+00:00",
20-
"links": {
21-
"post": "201",
22-
"author": "403"
36+
"attributes": {
37+
"text": "Comment 1",
38+
"created": "2015-01-31T14:30:00+00:00"
39+
},
40+
"relationships": {
41+
"post": {
42+
"data": {
43+
"type": "posts",
44+
"id": "201"
45+
}
46+
},
47+
"author": {
48+
"data": {
49+
"type": "users",
50+
"id": "403"
51+
}
52+
}
2353
}
2454
}
2555
]

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Payload/Responses/GetReturnsIPayloadResponse.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,27 @@
33
{
44
"type": "users",
55
"id": "6500",
6-
"firstName": "George",
7-
"lastName": "Washington",
8-
"links": {
9-
"comments": [ ],
10-
"posts": [ ],
11-
"userGroups": [ ]
6+
"attributes": {
7+
"firstName": "George",
8+
"lastName": "Washington"
9+
},
10+
"relationships": {
11+
"comments": { "data": [ ] },
12+
"posts": { "data": [ ] },
13+
"userGroups": { "data": [ ] }
1214
}
1315
},
1416
{
1517
"type": "users",
1618
"id": "6501",
17-
"firstName": "Abraham",
18-
"lastName": "Lincoln",
19-
"links": {
20-
"comments": [ ],
21-
"posts": [ ],
22-
"userGroups": [ ]
19+
"attributes": {
20+
"firstName": "Abraham",
21+
"lastName": "Lincoln"
22+
},
23+
"relationships": {
24+
"comments": { "data": [ ] },
25+
"posts": { "data": [ ] },
26+
"userGroups": { "data": [ ] }
2327
}
2428
}
2529
],

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Posts/Requests/PatchWithArrayForToOneLinkageRequest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
{
44
"type": "posts",
55
"id": "202",
6-
"links": {
6+
"relationships": {
77
"author": {
8-
"linkage": [ { "type": "users", "id": "403" } ]
8+
"data": [ { "type": "users", "id": "403" } ]
99
}
1010
}
1111
}

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Posts/Requests/PatchWithArrayRelationshipValueRequest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"type": "posts",
55
"id": "202",
6-
"links": {
6+
"relationships": {
77
"tags": ["301"]
88
}
99
}

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Posts/Requests/PatchWithAttributeUpdateRequest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
{
44
"type": "posts",
55
"id": "202",
6-
"title": "New post title"
6+
"attributes": {
7+
"title": "New post title"
8+
}
79
}
810
]
911
}

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Posts/Requests/PatchWithMissingToManyLinkageRequest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"type": "posts",
55
"id": "202",
6-
"links": {
6+
"relationships": {
77
"tags": {
88
}
99
}

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Posts/Requests/PatchWithNullForToManyLinkageRequest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
{
44
"type": "posts",
55
"id": "202",
6-
"links": {
6+
"relationships": {
77
"tags": {
8-
"linkage": null
8+
"data": null
99
}
1010
}
1111
}

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Posts/Requests/PatchWithNullToOneUpdateRequest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
{
44
"type": "posts",
55
"id": "202",
6-
"links": {
7-
"author": {
8-
"linkage": null
6+
"relationships": {
7+
"author": {
8+
"data": null
99
}
1010
}
1111
}

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Posts/Requests/PatchWithObjectForToManyLinkageRequest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
{
44
"type": "posts",
55
"id": "202",
6-
"links": {
6+
"relationships": {
77
"tags": {
8-
"linkage": { "type": "tags", "id": "301" }
8+
"data": { "type": "tags", "id": "301" }
99
}
1010
}
1111
}

JSONAPI.EntityFramework.Tests/Acceptance/Fixtures/Posts/Requests/PatchWithStringForToManyLinkageRequest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
{
44
"type": "posts",
55
"id": "202",
6-
"links": {
6+
"relationships": {
77
"tags": {
8-
"linkage": "301"
8+
"data": "301"
99
}
1010
}
1111
}

0 commit comments

Comments
 (0)