parent
3d3b7899e5
commit
9ad55bac99
|
|
@ -3,6 +3,15 @@ Changelog
|
|||
#########
|
||||
|
||||
|
||||
*********
|
||||
**1.4.7**
|
||||
*********
|
||||
|
||||
*Release date: Mar 05, 2018*
|
||||
|
||||
- **FIXED:** prevent crashes caused by attempting to delete object attributes which do not exist in the first place
|
||||
(:issue:`76`)
|
||||
|
||||
*********
|
||||
**1.4.6**
|
||||
*********
|
||||
|
|
|
|||
|
|
@ -356,9 +356,9 @@ class OpenAPISchemaGenerator(object):
|
|||
|
||||
view_inspector = view_inspector_cls(view, path, method, components, request, overrides)
|
||||
operation = view_inspector.get_operation(operation_keys)
|
||||
if set(operation.consumes) == set(self.consumes):
|
||||
if 'consumes' in operation and set(operation.consumes) == set(self.consumes):
|
||||
del operation.consumes
|
||||
if set(operation.produces) == set(self.produces):
|
||||
if 'produces' in operation and set(operation.produces) == set(self.produces):
|
||||
del operation.produces
|
||||
return operation
|
||||
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@ class InlineSerializerInspector(SerializerInspector):
|
|||
properties=properties,
|
||||
required=required or None,
|
||||
)
|
||||
if not ref_name:
|
||||
if not ref_name and 'title' in result:
|
||||
# on an inline model, the title is derived from the field name
|
||||
# but is visually displayed like the model named, which is confusing
|
||||
# but is visually displayed like the model name, which is confusing
|
||||
# it is better to just remove title from inline models
|
||||
del result.title
|
||||
return result
|
||||
|
|
|
|||
Loading…
Reference in New Issue