mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-04 20:33:16 +03:00
FIX: openapi schema title should be a string not a tuple (#6259)
This commit is contained in:
parent
11edf572c5
commit
5a54f897ec
|
@ -948,7 +948,7 @@ class _BaseOpenAPIRenderer:
|
||||||
schema = {}
|
schema = {}
|
||||||
if instance.__class__ in CLASS_TO_TYPENAME:
|
if instance.__class__ in CLASS_TO_TYPENAME:
|
||||||
schema['type'] = CLASS_TO_TYPENAME[instance.__class__]
|
schema['type'] = CLASS_TO_TYPENAME[instance.__class__]
|
||||||
schema['title'] = instance.title,
|
schema['title'] = instance.title
|
||||||
schema['description'] = instance.description
|
schema['description'] = instance.description
|
||||||
if hasattr(instance, 'enum'):
|
if hasattr(instance, 'enum'):
|
||||||
schema['enum'] = instance.enum
|
schema['enum'] = instance.enum
|
||||||
|
|
Loading…
Reference in New Issue
Block a user