mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Add --urlconf to the generateschema command (#6696)
This commit is contained in:
parent
4d228257ac
commit
809a6acd36
|
@ -23,6 +23,7 @@ class Command(BaseCommand):
|
|||
parser.add_argument('--format', dest="format", choices=['openapi', 'openapi-json', 'corejson'], default='openapi', type=str)
|
||||
else:
|
||||
parser.add_argument('--format', dest="format", choices=['openapi', 'openapi-json'], default='openapi', type=str)
|
||||
parser.add_argument('--urlconf', dest="urlconf", default=None, type=str)
|
||||
parser.add_argument('--generator_class', dest="generator_class", default=None, type=str)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
@ -33,7 +34,8 @@ class Command(BaseCommand):
|
|||
generator = generator_class(
|
||||
url=options['url'],
|
||||
title=options['title'],
|
||||
description=options['description']
|
||||
description=options['description'],
|
||||
urlconf=options['urlconf'],
|
||||
)
|
||||
schema = generator.get_schema(request=None, public=True)
|
||||
renderer = self.get_renderer(options['format'])
|
||||
|
|
Loading…
Reference in New Issue
Block a user