minism/django-tastypie-swagger — pull request #18 by davidmiller (2013-02-04 14:56:10+00:00)
Title: Allow the documentation of custom filtering

On occasion I need to write custom filters for resources that are hard to generalise into an all-purpose heuristic.

When this happens, I would like to be able to declaratively state the documentation output I want on my Resource class, and then have that passed through to the Swagger JSON endpoint. e.g.:

```Python
class AwesomeResource(ModelResource):
class Meta:
model = Awesome
queryset = Awesome.objects.all()
filtering = {
"awesome_code": ALL,
}
custom_filtering = {
'granularity': {
'dataType': 'string',
'required': True,
'description': 'Granularity of the data you want to retrieve'
}
}
```

...where custom_filtering becomes a query parameter in the swagger docs