Fix ModelViewSet Nested bug (#65)
* Add todo repro app * Add explicit test against model named "Nested" * Force serializers named NestedSerializer to be output as inline models * Allow ref_name to rescue a NestedSerializer * Add tests and documentation
This commit is contained in:
@@ -234,7 +234,8 @@ class FieldInspector(BaseInspector):
|
||||
if default is not None:
|
||||
instance_kwargs['default'] = default
|
||||
|
||||
instance_kwargs.setdefault('title', title)
|
||||
if instance_kwargs.get('type', None) != openapi.TYPE_ARRAY:
|
||||
instance_kwargs.setdefault('title', title)
|
||||
instance_kwargs.setdefault('description', description)
|
||||
instance_kwargs.update(kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user