Skip to content
This repository was archived by the owner on Jan 18, 2026. It is now read-only.

fix: camel case for multiple capital letters#1149

Merged
alexander-fenster merged 1 commit intomainfrom
camel_really
Jun 17, 2022
Merged

fix: camel case for multiple capital letters#1149
alexander-fenster merged 1 commit intomainfrom
camel_really

Conversation

@alexander-fenster
Copy link
Contributor

Fixes googleapis/google-cloud-node-core#570, 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 sofisl June 17, 2022 22:43
@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 😱

Details

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

// 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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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