nilportugues / php-json-api

JSON API transformer outputting valid (PSR-7) API Responses.
http://nilportugues.com
MIT License
71 stars 35 forks source link

DataAssertions requires an Attributes member #94

Open GregoryAveryWeir opened 6 years ago

GregoryAveryWeir commented 6 years ago

At https://github.com/nilportugues/php-json-api/blob/f72538b770f71c49fd75e4637d782edba1f5cbb9/src/Server/Data/DataAssertions.php#L38 , each request is validated to ensure it has an attributes member. However, the JSON API spec says resource objects MAY contain an attributes member. There are cases where you might want to leave it out of a request, as when you don't want to modify any attributes but do have meta properties to PATCH.