Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
support deserialization of linkage objects
  • Loading branch information
Chris Santero committed Apr 16, 2015
commit a9f8c5372533e159d73ce50cd12f51d796b0c049
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"data": [
{
"type": "posts",
"id": "202",
"links": {
"author": {
"linkage": [ { "type": "users", "id": "403" } ]
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"id": "202",
"links": {
"tags": {
"data": []
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "202",
"links": {
"tags": {
"ids": [ "301" ]
"linkage": null
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"type": "posts",
"id": "202",
"links": {
"author": null
"author": {
"linkage": null
}
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"data": [
{
"type": "posts",
"id": "202",
"links": {
"tags": {
"linkage": { "type": "tags", "id": "301" }
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"data": [
{
"type": "posts",
"id": "202",
"links": {
"tags": {
"linkage": "301"
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "202",
"links": {
"author": {
"type": "users"
"linkage": "403"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "202",
"links": {
"tags": {
"type": "tags"
"linkage": []
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "202",
"links": {
"tags": {
"data": [
"linkage": [
{
"id": "301",
"type": "tags"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"data": [
{
"type": "posts",
"id": "202",
"links": {
"tags": {
"linkage": [ { "type": "tags" } ]
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"data": [
{
"type": "posts",
"id": "202",
"links": {
"tags": {
"linkage": [ { "id": "301" } ]
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"id": "202",
"links": {
"tags": {
"type": "tags",
"ids": ["301"]
"linkage": [ { "type": "tags", "id": "301" } ]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"data": [
{
"type": "posts",
"id": "202",
"links": {
"author": {
"linkage": { "type": "users" }
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "202",
"links": {
"author": {
"id": "403"
"linkage": { "id": "403" }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"id": "202",
"links": {
"author": {
"type": "users",
"id": "403"
"linkage": {
"type": "users",
"id": "403"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
"created": "2015-03-11T04:31:00+00:00",
"links": {
"author": {
"type": "users",
"id": "401"
"linkage": {
"type": "users",
"id": "401"

}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "Nothing was specified for the `type` property.",
"detail": "Expected an object value for `linkage` but got Array.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "The value of a to-many relationship must be an object.",
"detail": "Each relationship key on a links object must have an object value.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"errors": [
{
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "Expected an array value for `linkage` but no `linkage` key was found.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "Nothing was specified for the `id` property.",
"detail": "Expected an array value for `linkage` but got Null.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "If `data` is not specified, then `ids` must be specified.",
"detail": "Expected an array value for `linkage` but got Object.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "If `data` is not specified, then `type` must be specified.",
"detail": "Expected an array value for `linkage` but got String.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"errors": [
{
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "Expected an object value for `linkage` but got String.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "The value of a to-one relationship must be an object or null.",
"detail": "Each relationship key on a links object must have an object value.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"errors": [
{
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "Each linkage object must have a string value for the key `id`.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"errors": [
{
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "Each linkage object must have a string value for the key `type`.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"errors": [
{
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "Each linkage object must have a string value for the key `id`.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"errors": [
{
"id": "{{SOME_GUID}}",
"status": "500",
"title": "JSONAPI.Json.JsonApiFormatter+BadRequestException",
"detail": "Each linkage object must have a string value for the key `type`.",
"stackTrace": "{{STACK_TRACE}}",
"inner": null
}
]
}
Loading