[PATCHv2 04/10] REST: Add Persons to the API

Andy Doan andy.doan at linaro.org
Thu May 19 13:25:08 AEST 2016

On 05/17/2016 07:31 AM, Finucane, Stephen wrote:
>> +class PersonSerializer(ModelSerializer):
>> >+    class Meta:
>> >+        model = Person
>> >+
> I think if we're not planning to expose a 'users' endpoint, we could
> definitely drop the 'user' field. If possible though, we could include
> the 'user.name' field, rather than the 'user.id', as this would be
> something people likely care about. Don't know how easy this is to do,
> but I imagine it would require use of the prefetch option once again.

I came up with an easy way to expose "username" in v3.

More information about the Patchwork mailing list