Closed jsjohnst closed 6 years ago
I think this handles the situation a bit more cleanly and doesn't need the extra req.method checks that https://github.com/jsonapi-suite/jsonapi_compliable/pull/50 has. For GET/HEAD requests, there isn't a body to deserialize, so those extra checks on the req.method would never be invoked as best as I can tell. Also, as a friend has been bitten multiple times by forgetting to set the content-type header in Postman, I felt a warning there was appropriate. If you would prefer that be a hard error instead of the warning, happy to make that change.
Thanks @jsjohnst! I think this looks good for now and I'll have to update graphiti with something similar. Beta comes this week!
Released in 0.11.31
@payload
anddata
to not return nils