-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
String enums validate tags do not handle spaces in enum values #267
Comments
geoffreybauduin
added a commit
to geoffreybauduin/asyncapi-codegen
that referenced
this issue
Mar 5, 2025
This commit introduces management of spaces within enum values when using validation tags. Spaces are handled by adding single quotes around the enum value Relates to lerenn#267
geoffreybauduin
added a commit
to geoffreybauduin/asyncapi-codegen
that referenced
this issue
Mar 10, 2025
This commit introduces management of spaces within enum values when using validation tags. Spaces are handled by adding single quotes around the enum value Relates to lerenn#267
lerenn
pushed a commit
that referenced
this issue
Mar 10, 2025
This commit introduces management of spaces within enum values when using validation tags. Spaces are handled by adding single quotes around the enum value Relates to #267
Associated PR is merged, so I think this is good. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the spec contains an enum value with spaces, the validation tags does not handle those spaces.
By default, enum values are separated by spaces in the
validate
tag, which conflicts with spaces within the enum value itself.In order to solve this, enum values can be encapsulated within single quotes (see go-playground/validator#541)
Submitting PR
The text was updated successfully, but these errors were encountered: