Skip to content

Example documentation is ignored for Enum resources #6317

Description

@gnito-org

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

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions