mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 08:59:54 +03:00
Update rest_framework/schemas/openapi.py
Co-Authored-By: Xavier Ordoquy <xordoquy@linovia.com>
This commit is contained in:
parent
30c91a6aef
commit
89383fca57
|
@ -462,7 +462,7 @@ class AutoSchema(ViewInspector):
|
|||
|
||||
content = self._map_serializer(serializer)
|
||||
# No required fields for PATCH
|
||||
if method == 'PATCH' and content.get('required'):
|
||||
if method == 'PATCH' and 'required' in content:
|
||||
del content['required']
|
||||
# No read_only fields for request.
|
||||
for name, schema in content['properties'].copy().items():
|
||||
|
|
Loading…
Reference in New Issue
Block a user