Please, clarify for me:
The spec declare that:
document MUST contain at least one of the following top-level members:
data
: the document’s “primary data”errors
: an array of [error objects]meta
: a [meta object] that contains non-standard meta-information.
I don’t found any mentions that it is only for responses.
Creating Resources
The request MUST include a single [resource object] as primary data. The [resource object] MUST contain at least atype
member.
These lines don’t say that request must contain only a single resource object
So is it will be ok to allow send some meta for post/patch requests?
POST /photos HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
{
"data": {
"type": "photos",
"attributes": {
"title": "Ember Hamster",
"src": "http://example.com/images/productivity.png"
},
"meta": {
"transform": false,
"makeThumb: true
}
}
}