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

bug: ruby to use url instead of mount_name for mapping #622

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

manisha1997
Copy link
Contributor

@manisha1997 manisha1997 commented Nov 14, 2024

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

  • I acknowledge that all my contributions will be made under the project's license
  • Run make test-docker
  • Verify affected language:
    • Generate twilio-go from our OpenAPI specification using the build_twilio_go.py using python examples/build_twilio_go.py path/to/twilio-oai/spec/yaml path/to/twilio-go and inspect the diff
    • Run make test in twilio-go
    • Create a pull request in twilio-go
    • Provide a link below to the pull request
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please create a GitHub Issue in this repository.

@manisha1997 manisha1997 changed the title bug: fix ruby bug bug: ruby to use url instead of mount_name for mapping Nov 15, 2024
@manisha1997 manisha1997 linked an issue Nov 15, 2024 that may be closed by this pull request
return input;
}

Pattern pattern = Pattern.compile("\\{([a-z0-9_]+)\\}");
Copy link
Contributor

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 ?

Copy link
Contributor Author

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())
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link

sonarcloud bot commented Nov 21, 2024

Copy link

sonarcloud bot commented Nov 21, 2024

Copy link

sonarcloud bot commented Nov 21, 2024

Copy link

sonarcloud bot commented Nov 21, 2024

Copy link

sonarcloud bot commented Nov 21, 2024

@manisha1997
Copy link
Contributor Author

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.

Sync not working since version 7.1.0
2 participants