silverstripe / silverstripe-restfulserver

RestfulServer module for Silverstripe CMS
http://www.silverstripe.org/restfulserver-module/
BSD 3-Clause "New" or "Revised" License
45 stars 48 forks source link

Remove fields functionality is not called #85

Open phptek opened 4 years ago

phptek commented 4 years ago

Neither DataFormatter::setRemoveFields() nor DataFormatter::getRemoveFields() is called or referenced from anywhere.

Any fix for this should allow for the default returned field "ID" to be removed (See DataFormatter::getFieldsForObj():329.

emteknetnz commented 4 years ago

We could possibly look to deprecate these methods rather than outright remove them

Presumably though they're currently not doing any harm or presenting a security risk right now by being there?

phptek commented 4 years ago

Correct. But for those of us who use the source code for docs, it's misleading to have them. Maybe mark as @unused or @deprecated?