Skip to content

fix(python): support self-referential object models - #138

Merged
adamcavendish merged 1 commit into
mainfrom
adamcavendish/fix-recursive-model-references
Jul 22, 2026
Merged

fix(python): support self-referential object models#138
adamcavendish merged 1 commit into
mainfrom
adamcavendish/fix-recursive-model-references

Conversation

@adamcavendish

Copy link
Copy Markdown
Collaborator

Summary

  • prevent generated Python httpx and requests models from importing their own
    module for recursive schema references
  • share schema-aware Python type rendering while preserving the existing public
    helper paths
  • add self-referential Foo and Bar golden coverage across every supported
    non-TypeScript backend

Testing

  • RUSTUP_TOOLCHAIN=stable just test-all (1,289 tests)
  • RUSTUP_TOOLCHAIN=stable cargo clippy --workspace --all-targets --all-features -- -D warnings
  • generated-client builds for Go, Rust reqwest, Rust ureq, Rust aioduct,
    Python httpx, Python requests, Java, and Kotlin

- Keep recursive Python model references local for httpx and requests
- Add cross-language golden coverage for self-referential object schemas
@adamcavendish
adamcavendish merged commit 72bdef4 into main Jul 22, 2026
24 checks passed
@adamcavendish
adamcavendish deleted the adamcavendish/fix-recursive-model-references branch July 22, 2026 09:24
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.15385% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/generators/python/type_names.rs 84.21% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

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