diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index 27434d337..b2cfe4d77 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -336,6 +336,15 @@ class SchemaGenerator(object): # Methods used when we generate a view instance from the raw callback... + def make_typical_path(self, path): + """ + Removes '/' from path and returns a linked value using '-'. + """ + ret = [ partial for partial in path.split('/') + if partial and '{' not in partial ] + return '-'.join(ret) + + def create_view(self, callback, method, request=None): """ Given a callback, return an actual view instance.