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

Support Multiple Enums class-names in Schema::enum property #1460

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

vad0s94
Copy link
Contributor

@vad0s94 vad0s94 commented Jul 31, 2023

The expression:

new OA\Items(description: 'Event name', type: 'string', enum: [
      EnumFoo::class,
      EnumBar::class,
      'random-string',
])

will be parsed into:

items:
  description: 'Event name'
  type: string
  enum:
    - EnumFooCase1
    - EnumFooCase2
    - EnumFooCase3
    - EnumBarCase1
    - EnumBarCase2
    - random-string

@DerManoMann
Copy link
Collaborator

Looks like this is breaking existing tests. Also a new test to cover this change would be great, thanks.

Extend expandEnumClassStringFixtures DataProvider
@vad0s94
Copy link
Contributor Author

vad0s94 commented Aug 2, 2023

@DerManoMann, done with the tests. Run actions again pls

@DerManoMann DerManoMann merged commit 048ea9d into zircote:master Aug 3, 2023
18 checks passed
@DerManoMann
Copy link
Collaborator

Thanks @vad0s94

@vad0s94 vad0s94 deleted the multiple-enums-in-schema branch August 4, 2023 06:19
@vad0s94
Copy link
Contributor Author

vad0s94 commented Aug 4, 2023

@DerManoMann thanks! Can you update versions on Packagist?

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

Successfully merging this pull request may close these issues.

2 participants