mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Add schema overriding support for coerced fields
This commit is contained in:
parent
fc0d55000d
commit
8ff567a06a
|
@ -75,7 +75,7 @@ class PKOnlyObject(object):
|
||||||
# rather than the parent serializer.
|
# rather than the parent serializer.
|
||||||
MANY_RELATION_KWARGS = (
|
MANY_RELATION_KWARGS = (
|
||||||
'read_only', 'write_only', 'required', 'default', 'initial', 'source',
|
'read_only', 'write_only', 'required', 'default', 'initial', 'source',
|
||||||
'label', 'help_text', 'style', 'error_messages', 'allow_empty',
|
'label', 'help_text', 'schema', 'style', 'error_messages', 'allow_empty',
|
||||||
'html_cutoff', 'html_cutoff_text'
|
'html_cutoff', 'html_cutoff_text'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ from rest_framework.relations import Hyperlink, PKOnlyObject # NOQA # isort:ski
|
||||||
# rather than the parent serializer.
|
# rather than the parent serializer.
|
||||||
LIST_SERIALIZER_KWARGS = (
|
LIST_SERIALIZER_KWARGS = (
|
||||||
'read_only', 'write_only', 'required', 'default', 'initial', 'source',
|
'read_only', 'write_only', 'required', 'default', 'initial', 'source',
|
||||||
'label', 'help_text', 'style', 'error_messages', 'allow_empty',
|
'label', 'help_text', 'schema', 'style', 'error_messages', 'allow_empty',
|
||||||
'instance', 'data', 'partial', 'context', 'allow_null'
|
'instance', 'data', 'partial', 'context', 'allow_null'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1174,7 +1174,7 @@ class ModelSerializer(Serializer):
|
||||||
valid_kwargs = set((
|
valid_kwargs = set((
|
||||||
'read_only', 'write_only',
|
'read_only', 'write_only',
|
||||||
'required', 'default', 'initial', 'source',
|
'required', 'default', 'initial', 'source',
|
||||||
'label', 'help_text', 'style',
|
'label', 'help_text', 'schema', 'style',
|
||||||
'error_messages', 'validators', 'allow_null', 'allow_blank',
|
'error_messages', 'validators', 'allow_null', 'allow_blank',
|
||||||
'choices'
|
'choices'
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user