Skip to content

Input DTOs are not being passed through the name converter #7705

Description

@mbeccati

API Platform version(s) affected: 4.2.x-dev (since #7691)

Description
API platform isn't using the name converter on input DTOs

How to reproduce
Set name converter according to the documentation in api_platform.yaml
Run test suite

Additional Context
Manually setting the name converter also on the symfony side (framework.yaml) fixes the issue, so it seems that decoding the input JSON is happening via the default Symfony serializer, whose name converter is not automatically configured any more.

api_platform:
    name_converter: 'serializer.name_converter.camel_case_to_snake_case'
framework:
    serializer:
#        name_converter: 'serializer.name_converter.camel_case_to_snake_case'

        named_serializers:
            foo:
                name_converter: null
                default_context:
                    skip_null_values: true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions