Skip to content

docs: fix generated rustdoc links#575

Merged
Byron merged 2 commits into
Byron:mainfrom
wyf027:docs/fix-rustdoc-readme-links-297
Jun 17, 2026
Merged

docs: fix generated rustdoc links#575
Byron merged 2 commits into
Byron:mainfrom
wyf027:docs/fix-rustdoc-readme-links-297

Conversation

@wyf027

@wyf027 wyf027 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Closes #297.

Summary

  • update generated README Rustdoc links from api::Type to current docs.rs paths like api/struct.Type.html
  • link common marker traits to google-apis-common/latest documentation
  • refresh gen/sheets4/README.md so the reported Sheets API links resolve now

Verification

  • git diff --check
  • PYTHONPATH=src uv run --with mako --with inflect python - <<'PY' ... Template(filename='src/generator/templates/api/lib/lib.mako') ... PY
  • checked 28 unique docs.rs links in gen/sheets4/README.md; all updated google-sheets4/google-apis-common links returned HTTP 200

Note: an existing yup-oauth2/*/trait.AuthenticatorDelegate.html link still 404s because current yup-oauth2 no longer exposes that trait; this PR stays focused on the generated Rustdoc links reported for the Sheets API README.

@Byron Byron left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks a lot.

I validated some of these newly generated links and they work, whereas the old ones don't.
Why it works a little bit puzzling to me still, and I'd like to see lib.rs regenerated as well as ${lib.docs(...) is called from there as well.

@wyf027

wyf027 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the requested lib.rs regeneration in d3623ee.

What changed:

  • Regenerated gen/sheets4/src/lib.rs so the hub references now use api::Sheets, matching the generator/template behavior already reflected in gen/sheets4/README.md.
  • Left unrelated regenerated api.rs formatting noise out of the commit.

Validation:

  • cargo check --manifest-path gen/sheets4/Cargo.toml passed.
  • cargo doc --manifest-path gen/sheets4/Cargo.toml --no-deps passed; it still emits pre-existing generated API warnings for unrelated Sheets schema text links/bare URL.

@Byron Byron left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks a lot!

I still don't really understand how this works. To my mind that change should duplicate a line but apparently it doesn't. I also don't want to spend more time on it (and validate it locally), so let's just merge - in the worst case links in markdown files are more broken or docs don't build, something that CI might actually be doing as well.

@Byron Byron merged commit 970c637 into Byron:main Jun 17, 2026
6 checks passed
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.

Sheets4 Api docs link broken

2 participants