Open phptek opened 6 years ago
@phptek Is there any documentation on how to configure the fields for the has_many?
Do you want me to update the README and push that up? Let me know.
@phptek That would be nice. Thanx!
Any word on this yet? It would also be nice to have the option to remove those base fields as well - what's the reason for them? Perhaps these fields should just be the ones as defined in $api_access['index'].
any news on this?
In
JSONDataFormatter
line 119 and 151 a baked-in set of three fields are returned for each object in a has_xxx relation which doesn't allow for much in the way of customisation, viz:We should allow developers to specify additional fields to return here, declared in YML config viz:
Note the use of
array_replace()
so that userland config can also override the defaults, not simply append to them (Not completely sure the latter is a good idea...)PR