marcgibbons/django-rest-swagger — pull request #115 by lukas-hetzenecker (2014-09-14 04:18:14+00:00)
Title: ported request-response-serializer feature

Successor of #19
---

It is now possible to use different serializers for the request and the response.
I introduced *request_serializer_class* and *response_serializer_class* attributes. If they are not found, it still falls back to *serializer_class*

```python
class PlacesPrefetchRequest(APIView):
"""
Request Body -- Places as JSON [required] [body]
"""

request_serializer_class = serializers.SimplePlacesSerializer
response_serializer_class = serializers.PlacesSerializer

def post(self, request, *args, **kwargs):
[...]
```