Commit 53f48d15 by Aarni Koskela

Allow customizing DefaultRouter's schema generator class

parent 51a6c076
......@@ -316,6 +316,7 @@ class DefaultRouter(SimpleRouter):
default_schema_renderers = None
APIRootView = APIRootView
APISchemaView = SchemaView
SchemaGenerator = SchemaGenerator
def __init__(self, *args, **kwargs):
if 'schema_title' in kwargs:
......@@ -342,7 +343,7 @@ class DefaultRouter(SimpleRouter):
"""
Return a schema root view.
"""
schema_generator = SchemaGenerator(
schema_generator = self.SchemaGenerator(
title=self.schema_title,
url=self.schema_url,
patterns=api_urls
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment