nilportugues / php-json-api

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

implement support for getRequiredFields() #74

Closed jeremymlane closed 8 years ago

jeremymlane commented 8 years ago

This fixes nilportugues/laravel5-jsonapi#70.

nilportugues commented 8 years ago

@jeremymlane

Changing the interface to add this feature is required, for sure. And will push up the semver number to next major as it introduces a break. As the Mapping Interface will have to ask for this data too. This being release 3.0.0. And it needs to happen. So that's OK :+1:.

For packages using this library, well it's a BC too, so all will need to jump to the next major. Not a problem either.

The changes, well, looks like it's the place but not quite agree with the execution, as I'd do it in the getProperties() and write a test for it before submitting a PR.

Let me review it and take on from your proposal

nilportugues commented 8 years ago

@jeremymlane https://github.com/nilportugues/php-json-api/tree/getRequiredFields follow here if interested