Skip to content

docs: add cross-links between CLI reference and usage documentation pages#2678

Merged
koxudaxi merged 1 commit intomainfrom
docs/add-cross-links-between-cli-reference-and-usage-pages
Dec 18, 2025
Merged

docs: add cross-links between CLI reference and usage documentation pages#2678
koxudaxi merged 1 commit intomainfrom
docs/add-cross-links-between-cli-reference-and-usage-pages

Conversation

@koxudaxi
Copy link
Copy Markdown
Owner

@koxudaxi koxudaxi commented Dec 18, 2025

Summary

  • Add bidirectional cross-links between auto-generated CLI reference pages and related usage documentation
  • Improve documentation navigation by connecting conceptual guides with CLI option details

Summary by CodeRabbit

  • Documentation
    • Added comprehensive cross-reference sections throughout documentation, linking related CLI options, configuration guides, and feature documentation
    • Improved navigation between complementary topics for better discoverability of related functionality and customization options

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 18, 2025

Walkthrough

This PR adds cross-reference navigation aids throughout the documentation by inserting "See Also" sections and a related documentation table. The changes link related topics and CLI options across various documentation files to improve discoverability without modifying any functional code.

Changes

Cohort / File(s) Summary
CLI Reference Navigation
docs/cli-reference/index.md
Added a "Related Documentation" table with links to OpenAPI, JSON Schema, GraphQL, pyproject.toml, custom templates, field aliases, and root models/type aliases guides.
CLI Reference Cross-References
docs/cli-reference/{field-customization,general-options,openapi-only-options,template-customization,typing-customization}.md
Added "See Also" tip blocks and admonitions linking to related documentation topics and configurations (e.g., field aliases, constraints, pyproject.toml guidance).
Feature Documentation Cross-References
docs/{aliases,custom-formatters,custom_template,field-constraints,formatting,graphql,jsonschema,openapi,pyproject_toml,root-model-and-type-alias,what_is_the_difference_between_v1_and_v2}.md
Added "See Also" sections with bullet links to related CLI reference options and feature guides throughout the feature documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • Rationale: Changes are homogeneous and follow a consistent cross-referencing pattern across many files, reducing cognitive overhead per file. Review primarily involves verifying link accuracy, semantic appropriateness of cross-references, and consistent formatting/placement.
  • Areas requiring attention:
    • Verify all internal links (relative paths) resolve correctly
    • Confirm "See Also" sections are placed logically within each document's structure
    • Check for any duplicate or circular references across documentation files

Poem

🐰 With See Also whispers, we weave the docs together,
Links bloom like clover in perfect fair weather,
From OpenAPI gardens to GraphQL streams,
Cross-references guide through knowledge dreams! 🌿

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding cross-links between CLI reference and usage documentation pages across multiple documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/add-cross-links-between-cli-reference-and-usage-pages

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0857ae7 and 372a981.

📒 Files selected for processing (17)
  • docs/aliases.md (1 hunks)
  • docs/cli-reference/field-customization.md (2 hunks)
  • docs/cli-reference/general-options.md (2 hunks)
  • docs/cli-reference/index.md (1 hunks)
  • docs/cli-reference/openapi-only-options.md (1 hunks)
  • docs/cli-reference/template-customization.md (3 hunks)
  • docs/cli-reference/typing-customization.md (1 hunks)
  • docs/custom-formatters.md (1 hunks)
  • docs/custom_template.md (1 hunks)
  • docs/field-constraints.md (1 hunks)
  • docs/formatting.md (1 hunks)
  • docs/graphql.md (1 hunks)
  • docs/jsonschema.md (1 hunks)
  • docs/openapi.md (1 hunks)
  • docs/pyproject_toml.md (1 hunks)
  • docs/root-model-and-type-alias.md (1 hunks)
  • docs/what_is_the_difference_between_v1_and_v2.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: py312-black23 on Ubuntu
  • GitHub Check: 3.10 on macOS
  • GitHub Check: py312-black22 on Ubuntu
  • GitHub Check: 3.11 on Ubuntu
  • GitHub Check: py312-isort7 on Ubuntu
  • GitHub Check: 3.9 on Windows
  • GitHub Check: 3.11 on Windows
  • GitHub Check: 3.12 on Windows
  • GitHub Check: 3.10 on Ubuntu
  • GitHub Check: 3.14 on Ubuntu
  • GitHub Check: benchmarks
🔇 Additional comments (19)
docs/cli-reference/openapi-only-options.md (1)

3-4: Documentation navigation enhancement approved.

The "Related Documentation" block correctly uses Material for MkDocs admonition syntax and provides a helpful cross-link to the OpenAPI usage guide. Placement and formatting are consistent with best practices.

docs/custom-formatters.md (1)

25-29: "See Also" section enhances navigation.

The cross-reference links to related CLI options and the Formatting guide are well-structured with clear descriptions. Format is consistent and improves documentation discoverability without cluttering the main content.

docs/cli-reference/typing-customization.md (1)

1829-1830: "See Also" tip placement enhances option documentation.

The cross-link to "Root Models and Type Aliases" guide is appropriately placed before the Usage section for --use-type-alias, providing users with contextual related reading. Syntax and formatting are correct.

docs/custom_template.md (1)

62-65: "See Also" section improves template documentation usability.

The cross-links to related CLI options (--custom-template-dir and --extra-template-data) are appropriately placed and clearly described. Format is consistent with other "See Also" sections in the documentation.

docs/cli-reference/index.md (1)

7-17: "Related Documentation" table serves as excellent navigation hub.

The new table effectively cross-references all major documentation topics (schema types, configuration, customization features) with clear descriptions. Table format is clean, scannable, and strategically placed. Relative paths are correct and consistent.

docs/root-model-and-type-alias.md (1)

266-269: "See Also" section appropriately concludes guide with CLI references.

The cross-links to --use-type-alias and --target-python-version are thematically relevant and clearly described. Placement at the end of the guide provides helpful pointers to related CLI options. Format is consistent with other documentation sections.

docs/field-constraints.md (1)

92-94: "See Also" section bridges examples to detailed CLI reference.

The single cross-link to --field-constraints in the CLI reference is contextually perfect, with description text highlighting the availability of additional detailed examples. Placement and format are appropriate.

docs/cli-reference/field-customization.md (2)

37-38: "See Also" tip directs users to detailed Field Aliases guide.

Cross-link to the Field Aliases guide is appropriately placed immediately after the --aliases option description, with clear directive to see the related usage documentation. Syntax and relative path are correct.


859-860: "See Also" tip highlights mypy compatibility benefit of field constraints.

Cross-link to the Field Constraints guide is well-placed and the description text explicitly mentions the mypy compatibility benefit, guiding users to valuable related information. Syntax and relative path are correct.

docs/cli-reference/general-options.md (2)

1392-1393: Proper MkDocs admonition syntax for cross-reference.

The "See Also" tip uses standard MkDocs formatting and is well-placed within the --generate-pyproject-config option documentation. Verify that the anchor reference resolves correctly in your documentation build.


1601-1602: Consistent cross-reference formatting in --ignore-pyproject section.

This "See Also" tip mirrors the one in the --generate-pyproject-config section, maintaining consistency across related CLI options. Both link to the same pyproject.toml configuration guide, which is appropriate.

docs/aliases.md (1)

111-113: Verify the CLI reference link is correctly anchored.

The "See Also" section is well-placed and clearly formatted. Confirm that docs/cli-reference/field-customization.md contains an #aliases section anchor so the link resolves correctly.

docs/graphql.md (1)

197-201: Well-organized cross-references connecting GraphQL docs to CLI options.

The "See Also" section appropriately links to general CLI reference, typing customization, and the specific --extra-template-data option (which directly relates to custom scalar types discussed in the document). All linked sections exist and anchors are correctly configured.

docs/formatting.md (1)

30-34: Cross-references verified and correct.

All target files exist with properly defined anchors. The "See Also" links correctly reference CLI options in template-customization.md using valid anchor syntax ({#formatters} and {#use-double-quotes}) and link to the existing custom-formatters.md guide.

docs/openapi.md (1)

349-352: Strategic placement of OpenAPI-specific CLI references.

The "See Also" section logically connects the OpenAPI documentation to both OpenAPI-specific options and base configuration options, allowing readers to discover relevant CLI parameters. Both target files exist and are correctly referenced with appropriate descriptions.

docs/jsonschema.md (1)

65-70: Comprehensive "See Also" section connecting JSON Schema documentation to CLI and data type references.

These four links provide good navigation paths from the JSON Schema usage guide to related CLI options and supporting documentation. The inclusion of supported-data-types.md is particularly relevant since data type support is central to JSON Schema generation. All target files exist and cross-references are valid.

docs/what_is_the_difference_between_v1_and_v2.md (1)

29-32: Links to model customization and output type selection are valid.

Both cross-references are correctly formatted with valid targets:

  • docs/cli-reference/model-customization.md file exists
  • The #output-model-type anchor is properly defined in the referenced file
  • Links will successfully navigate to the intended documentation sections
docs/pyproject_toml.md (1)

117-121: Well-organized bidirectional cross-links to CLI options.

The "See Also" section creates a logical hub connecting pyproject.toml documentation to the three most relevant CLI options (--ignore-pyproject, --generate-pyproject-config, --generate-cli-command). All anchor references in general-options.md are present and correctly linked.

docs/cli-reference/template-customization.md (1)

474-475: All linked documentation files exist and relative paths resolve correctly. The three target files are confirmed:

  • docs/custom-formatters.md
  • docs/custom_template.md
  • docs/formatting.md

Note: The file naming uses a mix of kebab-case (custom-formatters.md, formatting.md) and snake_case (custom_template.md). This inconsistency exists in the repository structure pre-PR, so the links accurately reflect actual filenames.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@koxudaxi koxudaxi marked this pull request as ready for review December 18, 2025 01:08
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (0857ae7) to head (372a981).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2678   +/-   ##
=======================================
  Coverage   99.52%   99.52%           
=======================================
  Files          79       79           
  Lines       11172    11172           
  Branches     1348     1348           
=======================================
  Hits        11119    11119           
  Misses         32       32           
  Partials       21       21           
Flag Coverage Δ
unittests 99.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Dec 18, 2025

CodSpeed Performance Report

Merging #2678 will not alter performance

Comparing docs/add-cross-links-between-cli-reference-and-usage-pages (372a981) with main (0857ae7)

Summary

✅ 52 untouched
⏩ 10 skipped1

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@koxudaxi koxudaxi merged commit c8f8744 into main Dec 18, 2025
39 checks passed
@koxudaxi koxudaxi deleted the docs/add-cross-links-between-cli-reference-and-usage-pages branch December 18, 2025 01:25
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.

1 participant