Skip to content

feat(internal/librarian/java): add decamelize utility for README generation - #6538

Merged
yangyzs merged 3 commits into
googleapis:mainfrom
yangyzs:java-readme-decamelize
Jun 25, 2026
Merged

yangyzs merged 3 commits into
googleapis:mainfrom
yangyzs:java-readme-decamelize

Conversation

@yangyzs

@yangyzs yangyzs commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

This utility splits CamelCase Java class names into space-separated words (e.g., 'IamPolicy' -> 'Iam Policy') to generate human-readable titles for the README code samples table.

Here is the list of READMEs that have "Code Samples" tables:

  1. google-cloud-storage
  2. google-cloud-spanner
  3. google-cloud-bigquery
  4. google-cloud-spanner-jdbc
  5. google-cloud-pubsub
  6. google-cloud-datastore
  7. google-cloud-bigtable
  8. google-cloud-bigquerystorage
  9. google-cloud-firestore
  10. google-cloud-logging
  11. google-cloud-logging-logback

For #6515

…ration

This utility splits CamelCase Java class names into space-separated
words (e.g., 'IamPolicy' -> 'Iam Policy') to generate human-readable
titles for the README code samples table.

For googleapis#6515
@yangyzs
yangyzs requested a review from a team as a code owner June 24, 2026 02:17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a decamelize utility function in the java package to convert CamelCase strings into space-separated strings, along with comprehensive unit tests. The review feedback suggests correcting an inaccurate example in a regular expression comment and updating the test assertion format to align with the repository's style guide for cmp.Diff error messages.

Comment thread internal/librarian/java/samples.go Resolved
Comment thread internal/librarian/java/samples_test.go Resolved
@yangyzs
yangyzs requested a review from JoeWang1127 June 24, 2026 03:15
@JoeWang1127

Copy link
Copy Markdown
Contributor

Could you add a link to the README.md that contains a sample table?

@yangyzs

yangyzs commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Could you add a link to the README.md that contains a sample table?

Sure. Added.

@JoeWang1127

JoeWang1127 commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Could you update the file name to readme.go and readme_test.go since they are helper functions to generate readme.

Renames samples.go and samples_test.go to readme.go and readme_test.go
to better reflect their role as README generation helpers, addressing
review feedback from Joe Wang.

For googleapis#6515
@yangyzs
yangyzs merged commit a6d950a into googleapis:main Jun 25, 2026
30 checks passed
haphungw pushed a commit to haphungw/librarian that referenced this pull request Jun 26, 2026
…ration (googleapis#6538)

This utility splits CamelCase Java class names into space-separated
words to generate human-readable titles for the README code samples table.

For googleapis#6515
@yangyzs
yangyzs deleted the java-readme-decamelize branch June 28, 2026 16:21
JoeWang1127 pushed a commit that referenced this pull request Jun 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.23.0](v0.22.0...v0.23.0)
(2026-06-29)


### Features

* **internal/librarian/java:** add decamelize utility for README
generation
([#6538](#6538))
([a6d950a](a6d950a)),
closes [#6515](#6515)
* **internal/librarian/java:** Add JSpecify dep to proto module template
([#6564](#6564))
([660ab2b](660ab2b))
* **internal/librarian/java:** add production sample filter
([#6545](#6545))
([df213ec](df213ec)),
closes [#6515](#6515)
* **internal/librarian/java:** add README sample extraction helpers
([#6574](#6574))
([500ba22](500ba22)),
closes [#6515](#6515)
* **internal/librarian/java:** add title override extractor
([#6546](#6546))
([0986d6a](0986d6a)),
closes [#6515](#6515)
* **internal/librarian/python:** update gapic-generator to 1.36.0
([#6548](#6548))
([a0930f4](a0930f4))
* **nodejs:** bump pnpm version to 11.7.0 and support v11+ global bin
layout ([#6494](#6494))
([1373628](1373628)),
closes [#6480](#6480)
* **sidekick/rust:** track recording error info for discovery LROs
([#6304](#6304))
([feb2ef2](feb2ef2)),
closes [#6286](#6286)
* **sidekick/swift:** generate synthetic messages
([#6530](#6530))
([7303648](7303648))
* **sidekick/swift:** handle clashing names
([#6543](#6543))
([56bf365](56bf365))
* **sidekick/swift:** swap client vs. protocol
([#6566](#6566))
([14e186c](14e186c))


### Bug Fixes

* **internal/librarian:** gracefully handle nil defaults in
applyDefaults
([#6571](#6571))
([3ee938a](3ee938a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
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.

2 participants