FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

✨ Add `strict`, `examples`, `deprecated`, `exclude_if` and `field_title_generator` parameters to `Field` by YuriiMotov · Pull Request #1725 · fastapi/sqlmodel · GitHub

Repository navigation

✨ Add strict, examples, deprecated, exclude_if and field_title_generator parameters to Field - #1725

Open
YuriiMotov wants to merge 12 commits into
mainfrom
add-missing-parameters-to-field
Open

YuriiMotov wants to merge 12 commits into
mainfrom
add-missing-parameters-to-field

Conversation

YuriiMotov commented Jan 28, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

These parameters are not currently supported by sqlmodel.Field and people have to use workaround passing them via schema_extra.

This PR will still support that workaround, but will emit a warning encouraging to pass such parameters directly to Field.


exclude_if is only supported by Pydantic version 2.12+.
I parameterized tests to skip if version is less than 2.12. Do we need to handle this in Field and emit warning?

YuriiMotov force-pushed the add-missing-parameters-to-field branch from 3c3abd7 to df361ec Compare January 28, 2026 17:03

This comment was marked as resolved.

github-actions Bot added the conflicts Automatically generated when a PR has a merge conflict label Feb 20, 2026
github-actions Bot removed the conflicts Automatically generated when a PR has a merge conflict label Feb 20, 2026
github-actions Bot added the conflicts Automatically generated when a PR has a merge conflict label Apr 3, 2026

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has a merge conflict that needs to be resolved.

github-actions Bot removed the conflicts Automatically generated when a PR has a merge conflict label Apr 3, 2026

slmnsh commented Apr 13, 2026

Copy link
Copy Markdown

Hey @YuriiMotov, I was trying to generate proper API Doc with sqlmodel and fastapi and I saw that this is missing from pydantic. Can I help you with this?

github-actions Bot added the conflicts Automatically generated when a PR has a merge conflict label Aug 28, 2026

Copy link
Copy Markdown
Contributor

This pull request has a merge conflict that needs to be resolved.

github-actions Bot removed the conflicts Automatically generated when a PR has a merge conflict label Aug 28, 2026
github-actions Bot added the conflicts Automatically generated when a PR has a merge conflict label Sep 21, 2026

This comment was marked as resolved.

github-actions Bot removed the conflicts Automatically generated when a PR has a merge conflict label Sep 22, 2026
Comment thread tests/test_pydantic/test_field.py Outdated
Comment thread tests/test_pydantic/test_field.py Outdated
Fix typo in `exlude_id`

Co-authored-by: Yurii Motov <109919500+YuriiMotov@users.noreply.github.com>

This branch has not been deployed

No deployments
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

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL