Skip to content

Commit 93f8b5f

Browse files
fix(jsonapi): return empty data array for empty relation (#6270)
1 parent ba1c61f commit 93f8b5f

File tree

6 files changed

+196
-4
lines changed

6 files changed

+196
-4
lines changed

features/http_cache/tag_collector_service.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ Feature: Cache invalidation through HTTP Cache tags (custom TagCollector service
107107
"type": "RelatedDummy",
108108
"id": "/related_dummies/1"
109109
}
110+
},
111+
"related": {
112+
"data": []
110113
}
111114
}
112115
}

features/jsonapi/absolute_url.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Feature: IRI should contain Absolute URL
5656
"type": "AbsoluteUrlRelationDummy",
5757
"attributes": {
5858
"_id": 2
59+
},
60+
"relationships": {
61+
"absoluteUrlDummies": {
62+
"data": []
63+
}
5964
}
6065
}
6166
}

features/jsonapi/jsonapi.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ Feature: JSON API basic support
205205
"type": "ThirdLevel",
206206
"id": "/third_levels/1"
207207
}
208+
},
209+
"relatedToDummyFriend": {
210+
"data": []
208211
}
209212
}
210213
}

features/jsonapi/network_path.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Feature: IRI should contain network path
5656
"type": "NetworkPathRelationDummy",
5757
"attributes": {
5858
"_id": 2
59+
},
60+
"relationships": {
61+
"networkPathDummies": {
62+
"data": []
63+
}
5964
}
6065
}
6166
}

0 commit comments

Comments
 (0)