pydantic-core
pydantic-core copied to clipboard
Fix serialize_as_any with recursive ref
BaseModel.model_dump[_xxx](serialize_as_any = True) breaks with models with recursive attribute types (not values) https://github.com/pydantic/pydantic/issues/9670
Related issue number
fix https://github.com/pydantic/pydantic/issues/9670
Checklist
- [ ] Unit tests for the changes exist
- [ ] Documentation reflects the changes where applicable
- [ ] Pydantic tests pass with this
pydantic-core(except for expected changes) - [ ] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers