marcgibbons/django-rest-swagger — pull request #19 by lukas-hetzenecker (2013-09-10 19:14:23+00:00)
Title: different request and response serializers

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):
[...]
```