You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to know if there is an easy way to modify the patch to mask the response fields by a query parameter (like /api/users?fields=email,name), I've tried the restplus approach with the X-Fields but that no longer works with the patch.
There is no built-in functionality at the moment, though I see the value in such a feature. Currently, given you may not want to spend too much time on this, I would recommend you add a parameter to the users endpoint accepting fields (marshmallow List field type will match your needs) and then in the endpoint itself you return a serialized output:
Perfect, sounds fine. It did seem a little tricky to route the request object down to the response decorator, you're probably right, this would be time consuming.
Hi,
I'd like to know if there is an easy way to modify the patch to mask the response fields by a query parameter (like /api/users?fields=email,name), I've tried the restplus approach with the X-Fields but that no longer works with the patch.
I thought the way to go would be to use a schema factory as shown in then marshmallow docs:
http://webargs.readthedocs.io/en/latest/advanced.html. But I don't understand the code base enough to intervene.
The text was updated successfully, but these errors were encountered: