Skip to content

djangorestframework_camel_case.camelize_serializer_fields does not handle "ignore_keys" #945

@tomashchuk

Description

@tomashchuk

drf_spectacular.contrib.djangorestframework_camel_case.camelize_serializer_fields does not handle "ignore_keys"

Define for example

REST_FRAMEWORK = {
    "JSON_UNDERSCOREIZE": {
          "ignore_keys": ("version_8test", ),
    },
} 

then add

SPECTACULAR_SETTINGS = {
    'POSTPROCESSING_HOOKS': [
        'drf_spectacular.contrib.djangorestframework_camel_case.camelize_serializer_fields'
    ],
}

Actual behavior
{"version8test": 4294967295}

Expected behavior
{"version_8test": 4294967295}

Let me know if it is expected behavior by default otherwise, I will create a PR with the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfix confirmation pendingissue has been fixed and confirmation from issue reporter is pending

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions