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

fix: camel case for multiple capital letters #1149

Merged
merged 1 commit into from
Jun 17, 2022
Merged

Conversation

alexander-fenster
Copy link
Contributor

Fixes #1148, googleapis/nodejs-os-config#173.

protobuf.js and @grpc/grpc-js use somewhat different logic when camel-casing strings like CreateOSPolicy, where multiple capital letters form a word. In our current code, it will be camel-cased as createOSPolicy, while these libraries expect createOsPolicy.

Implementing a special mode to use internally for this specific case. External interfaces of the generated libraries should not be affected in any way.

@alexander-fenster alexander-fenster requested a review from a team as a code owner June 17, 2022 22:43
@snippet-bot
Copy link

snippet-bot bot commented Jun 17, 2022

Here is the summary of possible violations 😱

There is a possible violation for not having product prefix.

The end of the violation section. All the stuff below is FYI purposes only.


Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@@ -240,7 +240,7 @@ export class NamingClient {
// Iterate over each of the methods that the service provides
// and create an API call method for each.
const namingStubMethods =
['paginatedMethod', 'paginatedMethodStream', 'paginatedMethodAsync', 'longRunning', 'checkLongRunningProgress', 'initialize', 'servicePath', 'apiEndpoint', 'port', 'scopes', 'getProjectId', 'getReservedWord'];
['paginatedMethod', 'paginatedMethodStream', 'paginatedMethodAsync', 'longRunning', 'checkLongRunningProgress', 'initialize', 'servicePath', 'apiEndpoint', 'port', 'scopes', 'getProjectId', 'getReservedWord', 'createAbcdeSomething'];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the main change: if you scroll to the right, the last element of this list is createAbcdeSomething. It would've been createABCDESomething without the fix.

@alexander-fenster alexander-fenster merged commit cdf4c71 into main Jun 17, 2022
@alexander-fenster alexander-fenster deleted the camel_really branch June 17, 2022 23:23
alexander-fenster added a commit that referenced this pull request Jul 1, 2022
* fix: follow case convention #1149 in generated tests

* fix: one more place
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.

bug: searching for method names incorrectly when there's an acronym
2 participants