-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix: go enum schema changes #189
Conversation
private Map<String, ModelsMap> filterOutEnumResults( Map<String, ModelsMap> results) { | ||
HashMap <String, ModelsMap> resultMap = new HashMap<>(); | ||
results.forEach((key ,value) -> { | ||
if (!key.contains("_enum_")) { |
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.
Is there a ticket in the backlog to revisit this?
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.
Nope, We will create it tomorrow and we will also create other improvement tickets for preview and alternative approach to enum name in OAI schema models
String[] value = property.dataType.split("Enum"); | ||
property.datatypeWithEnum = value[value.length-1]; | ||
property.dataType = "string"; | ||
property.isEnum = property.dataType == null;; |
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.
This would always be false.
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.
Yes, This should be property.isEnum = property.dataFormat == null;; Will fix it before merging
SonarCloud Quality Gate failed. |
Fixes
Added support to parse enum changes added in OAI spec for go as part of the PR: twilio/twilio-oai#71
updated to spec file for related enum changes
Checklist
make test-docker
python examples/build_twilio_go.py path/to/twilio-oai/spec/yaml path/to/twilio-go
and inspect the diffmake test
intwilio-go
twilio-go
If you have questions, please create a GitHub Issue in this repository.