This pull request introduces changes to the add_field method in the fern_aware_pydantic_model.py file. The method now returns the field variable and adds a new section to handle transitive circular dependencies.
Changes:
The add_field method now returns the field variable.
A new section is added to handle transitive circular dependencies. This section retrieves type IDs for a type reference, checks if they exist, and then iterates over them to update forward references for transitive circular dependencies.
The _add_update_forward_ref_for_transitive_circular_dependencies method is modified to handle self-referencing dependencies from non-union types. It retrieves these dependencies, iterates over them, and updates forward references accordingly.
The finish method is updated to handle transitive circular dependencies for extended types.
This pull request introduces changes to the
add_field
method in thefern_aware_pydantic_model.py
file. The method now returns thefield
variable and adds a new section to handle transitive circular dependencies.Changes:
add_field
method now returns thefield
variable._add_update_forward_ref_for_transitive_circular_dependencies
method is modified to handle self-referencing dependencies from non-union types. It retrieves these dependencies, iterates over them, and updates forward references accordingly.finish
method is updated to handle transitive circular dependencies for extended types.