API Platform version(s) affected: 2.6.1
Description
If we use a Symfony name converter, the docs page is broken. The Authorize button on the top left which has been introduced in the version 2.6 is not shown. Also the Request Body section (between Parameters and Responses) under the endpoints are completely missing. So, you cannot also try out any endpoints as this section is completely missing
How to reproduce
Configure Api Platform to use the Symfony's camel-to-snake case converter as documented here
Activate the service:
# api/config/services.yaml
services:
'Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter': ~
and then use it:
# api/config/packages/api_platform.yaml
api_platform:
name_converter: 'Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter'
Now go and try some of your endpoints from the OpenApi (Swagger) docs. The Request Body section will no more show up. And the endpoints cannot be tested anymore.
Possible Solution
Not yet looked into it but my assumption is, something is breaking when this name converter is run. Didn't try yet with custom name convertor.
Additional Context
When trying with some API testing clients like Postman, both the parameters createdAt as well as created_at are working.
API Platform version(s) affected: 2.6.1
Description
If we use a Symfony name converter, the docs page is broken. The
Authorizebutton on the top left which has been introduced in the version 2.6 is not shown. Also theRequest Bodysection (betweenParametersandResponses) under the endpoints are completely missing. So, you cannot also try out any endpoints as this section is completely missingHow to reproduce
Configure Api Platform to use the Symfony's camel-to-snake case converter as documented here
Activate the service:
and then use it:
Now go and try some of your endpoints from the OpenApi (Swagger) docs. The
Request Bodysection will no more show up. And the endpoints cannot be tested anymore.Possible Solution
Not yet looked into it but my assumption is, something is breaking when this name converter is run. Didn't try yet with custom name convertor.
Additional Context
When trying with some API testing clients like Postman, both the parameters
createdAtas well ascreated_atare working.