Describe the bug
EDIT: Scratch that, I didn't realise djangorestframework_camel_case was its own package.
Docs should explain that djangorestframework_camel_case would need to be installed to use 'CAMEL_CASE'
OLD ISSUE BELOW:
Import error when using camel_case postprocessor.
To Reproduce
Follow the docs to set CAMELIZE_NAME and add the camel_case postprocessor hooks:
# Camelize names like operationId and path parameter names
# Camelization of the operation schema itself requires the addition of
# 'drf_spectacular.contrib.djangorestframework_camel_case.camelize_serializer_fields'
# to POSTPROCESSING_HOOKS
'CAMELIZE_NAMES': False,
Settings.py:
...
'CAMELIZE_NAMES': True,
'POSTPROCESSING_HOOKS': ['drf_spectacular.contrib.djangorestframework_camel_case.camelize_serializer_fields'],
...
- Try to load up the /redoc/ api view.
- See the error:
ModuleNotFoundError: No module named 'djangorestframework_camel_case'
I think the code should read:
from .util import camelize, camelize_re, underscore_to_camel
Describe the bug
EDIT: Scratch that, I didn't realise
djangorestframework_camel_casewas its own package.Docs should explain that djangorestframework_camel_case would need to be installed to use 'CAMEL_CASE'
OLD ISSUE BELOW:
Import error when using camel_case postprocessor.
To Reproduce
Follow the docs to set CAMELIZE_NAME and add the camel_case postprocessor hooks:
Settings.py:
ModuleNotFoundError: No module named 'djangorestframework_camel_case'I think the code should read: