astrosat / django-astrosat-users

Common backend library for Astrosat projects' user management
GNU General Public License v3.0
2 stars 0 forks source link

chore(backend): updated swagger documentation #158

Closed allynt closed 3 years ago

allynt commented 3 years ago

Updated swagger documentation for UserViewSet

marksmall commented 3 years ago

I did a bit of investigation into these test failures and found a couple of tests failing

The former, in the to_representation overridden method, the self parameter when printed in the debugger states the AttributeError: 'tuple' object has no attribute 'items', and the error is thrown when we call the super().to_representation(instance)

The latter view test is when we test updating a user, since we have a new serializer, it cannot update it's nested fields. I'm not sure what we want here, should the customer in this case be read_only, or do we add an update method, to the UserSerializer class.

allynt commented 3 years ago

@marksmall - the errors occurred b/c I didn't include the class Meta section for my serializer. Oops. In the end, I refactored a bit more and wound up using a standard serializer (rather than a ModelSerializer) - since as of the refactoring that serializer is only used for swagger documentation purposes.

marksmall commented 3 years ago

@allynt I guess your branch might be out-of-date as there are Conflicting files. If you fix those, I'm more than happy to review.