API Platform version(s) affected: 3.2.20
Description
When using a Backed Enum class as an API resource, any example value provided in the ApiProperty attribute is ignored and does not appear in the OpenAPI documentation.
This is true for example: 'foo' and openapiContext: ['example' => 'foo'].
On API resources that are Doctrine entities, the supplied example values appear in the OpenAPI documentation.
How to reproduce
https://github.com/gnito-org/problem-replicator-api-platform-enum-example
Possible Solution
Additional Context
API Platform version(s) affected: 3.2.20
Description
When using a Backed Enum class as an API resource, any
examplevalue provided in theApiPropertyattribute is ignored and does not appear in the OpenAPI documentation.This is true for
example: 'foo'andopenapiContext: ['example' => 'foo'].On API resources that are Doctrine entities, the supplied example values appear in the OpenAPI documentation.
How to reproduce
https://github.com/gnito-org/problem-replicator-api-platform-enum-example
Possible Solution
Additional Context