Permalink
Browse files

Update schema to require relationship keys.

According to the documentation, both

```
relationships: { author: {} }
relationships: { author: null }
```

Are invalid. However, they validate against the current schema. This
ensures a relationship object is only valid when one of meta/links/data
are present.

See: #1092
  • Loading branch information...
1 parent 4e4205f commit ff222faee41260d80cb8054e75fb0d33c5f8e51b Lee Richmond committed Sep 19, 2016
Showing with 5 additions and 0 deletions.
  1. +5 −0 schema
View
@@ -225,6 +225,11 @@
"$ref": "#/definitions/meta"
}
},
+ "anyOf": [
+ {"required": ["data"]},
+ {"required": ["meta"]},
+ {"required": ["links"]}
+ ],
"additionalProperties": false
}
},

0 comments on commit ff222fa

Please sign in to comment.