-
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
bug: ruby to use url instead of mount_name for mapping #622
base: main
Are you sure you want to change the base?
Conversation
return input; | ||
} | ||
|
||
Pattern pattern = Pattern.compile("\\{([a-z0-9_]+)\\}"); |
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.
If this is a direct toCamelCase conversion, can we use a library to do it? example
If its not what format does it return ?
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 function takes input of format /v1/Services/{account_sid}/List
to /v1/Services/{AccountSid}/List
The CaseUtils.toCamelCase() does not have this exact usecase fulfilled.
@@ -222,7 +223,7 @@ private void updateContextResourceDependents(Map<String, String> dependentsForOp | |||
if(listObjs != null) { | |||
for (DirectoryStructureService.ContextResource cr : listObjs) { | |||
String value = (dependentsForOperation.containsKey(cr.getFilename())) ? dependentsForOperation.get(cr.getFilename()) |
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.
Do we not need to change this line also? since we are modifying the mapOperationsDependents to always have resource_url
as key?
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.
There are some use cases where dependentsForOperation.get(cr.getFileName()) has some data. How it is populated, will have to dig in further. So, as to not break the existing flow, I have kept it here.
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.
The values in dependentProperties would be of different formats like abc.json from file name and v1/something/abc via path, will that work fine? Can you add some testcases too? it'd be easier to understand the behaviour.
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, after this change, filename is no longer used to set mapping. Hence, removed it.
Quality Gate passed for 'twilio-oai-generator-ruby'Issues Measures |
Quality Gate passed for 'twilio-oai-generator-php'Issues Measures |
Quality Gate passed for 'twilio-oai-generator-java'Issues Measures |
Quality Gate passed for 'twilio-oai-generator-python'Issues Measures |
Quality Gate passed for 'twilio-oai-generator-node'Issues Measures |
new validation check: https://buildkite.com/twilio/twilio-librarian-status-checks/builds/12123 |
Fixes
This implementation stops using mount_name and uses url to do the mapping
Validation check pipeline: https://buildkite.com/twilio/twilio-librarian-status-checks/builds/11963#_
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.