Skip to content

Add --http-timeout CLI option#2788

Merged
koxudaxi merged 2 commits intomainfrom
feature/http-timeout-option
Dec 24, 2025
Merged

Add --http-timeout CLI option#2788
koxudaxi merged 2 commits intomainfrom
feature/http-timeout-option

Conversation

@koxudaxi
Copy link
Copy Markdown
Owner

Fixes: #2073

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 24, 2025

Warning

Rate limit exceeded

@koxudaxi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between f3029e8 and 9f620cb.

📒 Files selected for processing (18)
  • docs/cli-reference/general-options.md
  • docs/cli-reference/index.md
  • docs/cli-reference/quick-reference.md
  • src/datamodel_code_generator/__init__.py
  • src/datamodel_code_generator/__main__.py
  • src/datamodel_code_generator/arguments.py
  • src/datamodel_code_generator/cli_options.py
  • src/datamodel_code_generator/http.py
  • src/datamodel_code_generator/parser/base.py
  • src/datamodel_code_generator/parser/graphql.py
  • src/datamodel_code_generator/parser/jsonschema.py
  • src/datamodel_code_generator/parser/openapi.py
  • src/datamodel_code_generator/prompt_data.py
  • tests/main/jsonschema/test_main_jsonschema.py
  • tests/main/openapi/test_main_openapi.py
  • tests/main/test_main_json.py
  • tests/parser/test_jsonschema.py
  • tests/test_main_kr.py
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/http-timeout-option

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.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Dec 24, 2025

CodSpeed Performance Report

Merging #2788 will not alter performance

Comparing feature/http-timeout-option (9f620cb) with main (f3029e8)

Summary

✅ 73 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 enabled auto-merge (squash) December 24, 2025 18:14
@koxudaxi koxudaxi merged commit f59786f into main Dec 24, 2025
36 checks passed
@koxudaxi koxudaxi deleted the feature/http-timeout-option branch December 24, 2025 18:15
@github-actions
Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: This PR adds a new --http-timeout CLI option and http_timeout parameter to the Python API. Both are purely additive changes with default values that maintain backward compatibility. The explicit default timeout of 30 seconds is actually more permissive than httpx's default timeout of 5 seconds, so existing workflows will continue to work without modification. No existing CLI options, API signatures, generated code, or default behaviors are changed in a way that would break existing users.


This analysis was performed by Claude Code Action

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.48%. Comparing base (5cceb4f) to head (9f620cb).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2788    +/-   ##
========================================
  Coverage   99.47%   99.48%            
========================================
  Files          88       88            
  Lines       13256    13365   +109     
  Branches     1557     1565     +8     
========================================
+ Hits        13187    13296   +109     
  Misses         36       36            
  Partials       33       33            
Flag Coverage Δ
unittests 99.48% <100.00%> (+<0.01%) ⬆️

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.

koxudaxi added a commit that referenced this pull request Dec 25, 2025
* Add --http-timeout CLI option for configurable HTTP request timeout

* docs: update CLI reference documentation and prompt data

🤖 Generated by GitHub Actions

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
koxudaxi added a commit that referenced this pull request Dec 25, 2025
* Add --collapse-root-models-name-strategy option

* docs: update CLI reference documentation and prompt data

🤖 Generated by GitHub Actions

* Add pragma no cover for defensive edge cases

* Achieve 100% diff coverage for collapse-root-models-name-strategy

* Use cast instead of type ignore comment

* Remove line comments from collapse-root-models implementation

* Add complex e2e tests for collapse-root-models-name-strategy

* Update reference metadata when renaming in parent strategy

* Refactor collapse-root-models tests to use parameterization for v1/v2

* Add schema path context to error messages (#2786)

* Return str or dict when output=None in generate() (#2787)

* Add --http-timeout CLI option (#2788)

* Add --http-timeout CLI option for configurable HTTP request timeout

* docs: update CLI reference documentation and prompt data

🤖 Generated by GitHub Actions

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Pass schema extensions to templates (#2790)

* Pass schema extensions to templates

* Move model_base import to top of file

* Add schema extensions documentation

Document how x-* schema extensions are passed to custom templates
via the extensions variable, with examples for database model
configuration and other use cases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* Add propertyNames and x-propertyNames support (#2789)

* Add propertyNames and x-propertyNames support

* Fix Pydantic v1 compatibility for x-propertyNames

Use the model_validate utility function from util module instead of
calling JsonSchemaObject.model_validate() directly, which only
exists in Pydantic v2.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* Add test for x-propertyNames non-dict branch coverage

Test that x-propertyNames with non-dict value (e.g., boolean) is
correctly ignored, achieving 100% diff coverage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* Add support for additional_imports in extra-template-data JSON (#2793)

* Update zensical to 0.0.15 (#2794)

* Add --use-field-description-example option (#2792)

* Add --use-field-description-example option

* docs: update CLI reference documentation and prompt data

🤖 Generated by GitHub Actions

* Add tests for complete branch coverage of docstring property

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix formatting in test file

---------

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

Too short timeout for fetching schema

1 participant