marcgibbons/django-rest-swagger — pull request #180 by gdoumenc (2014-12-19 14:24:56+00:00)
Title: Version prefix

In case the REST URL is prefixed by variables, I've add a reduce_path function in SETTINGS to remove them from diaplaying urls.

For example, if URL begins with (?P[\w.]+)/(?P[\w-]+)/myurls, then SETTINGS = {
....
'api_path': '/0.1/partner/',
'reduce_path': lambda x: x[x.rfind('}')+1:]
....

The lambda function for reduction should be defined accordingly to prefix to be removed