Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum list generation does not work from Enum::class (placed in enum, ref) for several cases #2439

Open
upsetcode opened this issue Feb 4, 2025 · 1 comment
Labels

Comments

@upsetcode
Copy link

Version

v.5 beta6

Description

Enum list generation does not work from Enum::class (placed in enum, ref) for several cases in OA\Property

Cases for v.5 beta6:

    1. attribute on class Object #[OA\Schema ... new OA\Property(... enum: EnumBacked::class) - don't generate enum list (but it works on route's property attributes) - need to work like in route's property attributes
    1. attribute on class Object #[OA\Schema ... new OA\Property(... ref: new NAAtr\Model(type: EnumPure::class) ..) - don't generate list in ref component (but it works on backed Enum) - need list of case's names
    1. in class on comment property by /** @var MyCustomEnumBacked::class / ( or /* @var EnumBacked::class */ ) - falls with exception " u need use @var on property ..." (but it worked on v4.36.1 and had creating componet schema properly)
    1. in class property attribyt #[OA\Property(..., enum: EnumAnyType::class, ...) - don't work

Cases for v4.36.1:
- any variants on attribute on class(or on class property) Object #[OA\Schema ... (ref, enum): on EnumAnyType::class) - don't work

JSON OpenApi

No response

Additional context

No response

@upsetcode upsetcode added the bug label Feb 4, 2025
@upsetcode upsetcode changed the title Enum list generation does not work from Enum::class (placed in enum, ref) for several cases Enum list generation does not work from Enum::class (placed in enum, ref) for several cases Feb 4, 2025
@mario-fehr
Copy link

@upsetcode can you make your description more clear to reproduce or maybe create a repo with a reproducer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants