Skip to content

Drop the expected paths of the other client generation tests - #7284

Merged
Koudai Aono (koxudaxi) merged 1 commit into
drop-expected-paths-b8afrom
drop-expected-paths-b8
Nov 21, 2026
Merged

Koudai Aono (koxudaxi) merged 1 commit into
drop-expected-paths-b8afrom
drop-expected-paths-b8

Conversation

@koxudaxi

@koxudaxi Koudai Aono (koxudaxi) commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Tests
    • Expanded client-generation coverage across supported backends, including checks for generated modules, documentation, configuration options, and regeneration output.
    • Updated expected-output comparisons to use inline results and refreshed fixtures for generated client examples.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Client-generation tests now use inline assertions and updated generated fixtures. Documentation examples read from the client-generation fixture tree. The frozen-violation allowlist no longer includes a removed fixture path.

Changes: Client-generation fixture updates

Layer / File(s) Summary
Update client-generation expectations
tests/api_generation/test_client_generation.refs, tests/api_generation/test_client_generation.py, tests/assert_helper_allowlists.py, scripts/build_docs_examples.py
Tests check reports and generated output inline, and fixture references point to generated client outputs. Documentation examples read protocol and caching documentation from the client-generation fixture tree. The allowlist drops a removed fixture path.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to c7f58

This change reorganizes client-generation test fixtures and updates documentation example paths. It has no runtime product impact, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title says the PR drops expected paths for the other client generation tests. The raw summary confirms that the EXPECTED path constant was removed and that client-generation tests now assert again…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title says the PR drops expected paths for the other client generation tests. The raw summary confirms that the EXPECTED path constant was removed and that client-generation tests now assert against inline expected output instead of checked-in expected-file paths. The title matches the main change, though it does not mention the reference file updates or the removed allowlist entry.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6d252f1 and c7f580b.

Files ignored due to path filters: 110

  • tests/data/expected/api_generation/client_generation/client_api.txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[auth-invalid].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[auth-unknown].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[auth-values].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[body-field-names-invalid].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[body-fields-invalid].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[compression-invalid].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[invalid-parameter-names].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[invalid-shapes].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[invalid-urls].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[invalid-values].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[reserved-type-name].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[retry-conflicting-controls].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[retry-invalid].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[retry-unknown-field].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config[values].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config_python_keys[body-field-keys].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config_python_keys[parameter-name-keys].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config_python_keys[parameter-name-none-key].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_config_python_keys[runtime-keys].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[asyncapi-events]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[asyncapi-events]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[asyncapi-market-v3]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[asyncapi-market-v3]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[auth]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[auth]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[caching]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[caching]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[compression]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[compression]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[default-server]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[default-server]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[empty]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[empty]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[fields-both]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[fields-both]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[media]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[media]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[ndjson-split]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[ndjson-split]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[ndjson]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[ndjson]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[pagination-counts]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[pagination-counts]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[pagination-links]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[pagination-links]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[pagination]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[pagination]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[pets-unpack]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[pets-unpack]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[polling]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[polling]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[retries]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[retries]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[sockets]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[sockets]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[stream-resume]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[stream-resume]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[streams]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[streams]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[templates]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[templates]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[uploads]/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_documentation[uploads]/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_input[input-aliases].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_input[input-cycle-dict].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_input[input-cycle-list].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_input[input-cycle-mutual].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_input[input-cycle-reference].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-cache-bodyless].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-cache-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-cache-errors].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-deep-limit].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-disabled].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-names].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-ndjson-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-pagination-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-pagination-count-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-pagination-errors].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-pagination-link-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-pagination-querystring-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-pagination-resume-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-pagination-strict-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-pagination-wrapper-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-polling-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-polling-errors].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-querystring-target-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-querystring].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-references].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-reserved-arguments].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-shared-errors].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-socket-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-socket-errors].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-socket-scope].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-stream-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-stream-errors].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-stream-resume-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-stream-scope].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-unmodeled].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-unsupported-kinds].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-unsupported].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-upload-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-upload-errors].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-webhook-checks].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_protocols[protocols-webhook-errors].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_regenerate_unchanged[default].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/api_generation/client_generation/client_template_fallback[webhooks-True].documents/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_template_fallback[webhooks-True].documents/client/_generated_docs/runtime.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_template_fallback[webhooks-unsigned-True].documents/client/README.md is excluded by none and included by none
  • tests/data/expected/api_generation/client_generation/client_template_fallback[webhooks-unsigned-True].documents/client/_generated_docs/runtime.md is excluded by none and included by none
Files selected for processing: 11

  • scripts/build_docs_examples.py
  • tests/api_generation/test_client_generation.py
  • tests/api_generation/test_client_generation.refs
  • tests/assert_helper_allowlists.py
  • tests/data/expected/api_generation/client_generation/client_output_options[black-isort].py
  • tests/data/expected/api_generation/client_generation/client_output_options[builtin-line-length].py
  • tests/data/expected/api_generation/client_generation/client_output_options[custom-formatter].py
  • tests/data/expected/api_generation/client_generation/client_output_options[encoding].py
  • tests/data/expected/api_generation/client_generation/client_output_options[header-quotes].py
  • tests/data/expected/api_generation/client_generation/client_output_options[ruff-latin-1].py
  • tests/data/expected/api_generation/client_generation/client_output_options[ruff-line-length].py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T10:33:48.584930Z c7f580b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

@codspeed

codspeed Bot commented Nov 21, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.01%

1 warning

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

❌ 3 regressed benchmarks
✅ 50 untouched benchmarks
⏩ 98 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_perf_large_models_pydantic_v2_builtin_double_quotes 824.5 ms 931.8 ms -11.52%
❌ test_perf_aws_style_openapi_pydantic_v2 1.1 s 1.3 s -10.95%
❌ test_perf_load_yaml_openapi_large 17.3 ms 19.3 ms -10.56%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing drop-expected-paths-b8 (c7f580b) with drop-expected-paths-b8a (6d252f1)

Open in CodSpeed

Footnotes

  1. 98 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. ↩

@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@koxudaxi
Koudai Aono (koxudaxi) merged commit 4cf6021 into main Nov 21, 2026
116 of 117 checks passed
@koxudaxi
Koudai Aono (koxudaxi) deleted the drop-expected-paths-b8 branch November 21, 2026 10:53
@github-actions

Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: The PR only touches test infrastructure and a docs build script. It moves expected-output fixtures from tests/data/expected/main/generation_platform/client to tests/data/expected/api_generation/client_generation, and every rename is at 100 percent similarity. It updates test_client_generation.py so assert_output and assert_generated_modules_output find their expected paths automatically, switches parametrize to ids, rewrites the refs file, removes one allowlist entry in tests/assert_helper_allowlists.py, and points scripts/build_docs_examples.py at the new fixture paths. No source files under the datamodel_code_generator package change, so there are no changes to the CLI, the Python API, templates, defaults, Python version support or error handling. The behaviour diff gate lists only both-fail cells and no accepted or violation cells, which confirms that default generated output does not change.


This analysis was produced by the release draft workflow

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Released in 0.100.0

This PR is now available in the latest release. See the release notes for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant