-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[avro-schema] fix: enum logic (sanitize, remove collisions) #19549
Conversation
"symbols": [ | ||
"a", | ||
"b", | ||
"uh_oh", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
to _
"a", | ||
"b", | ||
"uh_oh", | ||
"_0h_oh", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefixed with _
"uh_oh", | ||
"_0h_oh", | ||
"coll_ision", | ||
"coll_ision2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count suffix
thanks for the PR. cc @sgadouar |
@@ -0,0 +1,26 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to express this in unit tests instead if you prefer @sgadouar
Currently, enums in Avro schemas are generated directly from the model, whether they are valid or not.
Unfortunately, Avro schema values follow tighter rules.
This pull request sanitizes enum values from the Swagger spec to follow the Avro schema by:
_
_
PR checklist
master
(upcoming 7.6.0 minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)