Closed DipenAVDEVS closed 1 week ago
Still facing same issue . i try with sudo composer update and its update version to 4.23.1(nelmio/api-doc-bundle) but then also its show same error
Do you also have this issue with the latest version?
Yes , when i try with composer update its update to 4.23 and show me same error.
I'm seeing this when I override the type with JMS to enforce a backed enum to be serialized with its name. This looks as follows:
#[Type('enum<' . ActiveCampaignListStatusEnum::class .', name>')]
This is caused due to the type not being just a string, but an array:
So, it looks like this:
As that comes from JMS and is handled in JMS correctly, I believe it should be handled here as well. PR incoming!
It is only partly handled in JMS, because for this particular type annotation you apparently are required to wrap the type with quotes. So, for the example above it should become:
#[Type('enum<\'' . ActiveCampaignListStatusEnum::class .'\', 'name'>')]
or
#[Type("enum<'". ActiveCampaignListStatusEnum::class . "', 'name'>')]
Then it works as it should. Another PR will be made at JMS to solve this inconsistency.
Version
4.23
Description
When i update version from 4.10 to 4.23 . i am getting above issue
JSON OpenApi
JSON OpenApi
```json Replace this text with your JSON (`bin/console nelmio:apidoc:dump`) ```Additional context
nelmio_api_doc: models: use_jms: true