✨ Support merging FieldInfo values from multiple Field objects#1281
Closed
ryangalamb wants to merge 3 commits intofastapi:mainfrom
Closed
✨ Support merging FieldInfo values from multiple Field objects#1281ryangalamb wants to merge 3 commits intofastapi:mainfrom
FieldInfo values from multiple Field objects#1281ryangalamb wants to merge 3 commits intofastapi:mainfrom
Conversation
ryangalamb
commented
Jan 28, 2025
| field_infos.append(default_field_info) | ||
|
|
||
| # HACK: Quick and dirty way of merging into a new sqlmodel.FieldInfo object. | ||
| with mock.patch("pydantic.fields.FieldInfo", FieldInfo): |
Author
There was a problem hiding this comment.
This call to mock.patch is no longer necessary. I'll implement the merging logic in sqlmodel before marking this PR as ready.
(I wanted to get feedback on the overall approach before taking the time to re-implement the pydantic logic.)
FieldInfo values from multiple Pydantic Field objects
FieldInfo values from multiple Pydantic Field objectsFieldInfo values from multiple Field objects
Contributor
|
This pull request has a merge conflict that needs to be resolved. |
Contributor
|
As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1278