mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 11:00:13 +03:00
FIX: openapi schema title should be a string not a tuple
This commit is contained in:
parent
9d001cd84c
commit
28c4d1e222
|
@ -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