tnc-ba / strongTNC

BYOD TNC Database Management Tool
GNU Affero General Public License v3.0
0 stars 0 forks source link

API: Parameter to limit returned fields #201

Closed dbrgn closed 10 years ago

dbrgn commented 10 years ago

Is this possible with DRF?

See https://stackoverflow.com/questions/23643204/django-rest-framework-dynamically-return-subset-of-fields.

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-17.44%) when pulling d708b2440ecb600d3732108abf139f2339829abf on issue201 into f67eb13e9320ab1288aa6fe81d6a194b2abfb966 on master.

dbrgn commented 10 years ago

Ready to test, @d22 or @cfaessler!

The API now allows a new fields parameter that can filter returned fields per document.

The fields need to be comma separated, without any spaces.

Nested entities can be shown or hidden, but their fields cannot be filtered.

coveralls commented 10 years ago

Coverage Status

Coverage increased (+0.23%) when pulling 75a61ca0dfc9cd472f445fd06f595801b47d4fbf on issue201 into f67eb13e9320ab1288aa6fe81d6a194b2abfb966 on master.

cfaessler commented 10 years ago

Very nice! Good to merge!