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

Add enum description to route parameter if possible. #2062

Merged
merged 6 commits into from
Jan 4, 2023

Conversation

lhausammann
Copy link
Contributor

@lhausammann lhausammann commented Dec 9, 2022

Adds an "enum" schema to route parameters if the routing requirements consists only of a simple OR regex epression.
It skips complex expression.
The schema "pattern" field still contains the original regex.
This is mainly useful to display enum values in the Swagger UI gui as select boxes rather than text boxes.

@GuilhemN GuilhemN merged commit 1aa2cbd into nelmio:master Jan 4, 2023
@GuilhemN
Copy link
Collaborator

GuilhemN commented Jan 4, 2023

Nice addition @lhausammann, thank you!

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.

None yet

2 participants