Skip to content

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

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

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

Conversation

@YuriiMotov

@YuriiMotov YuriiMotov commented Jan 28, 2026

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
YuriiMotov force-pushed the add-missing-parameters-to-field branch from 3c3abd7 to df361ec Compare January 28, 2026 17:03
@github-actions

This comment was marked as resolved.

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

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 github-actions Bot removed the conflicts Automatically generated when a PR has a merge conflict label Apr 3, 2026
@slmnsh

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 github-actions Bot added the conflicts Automatically generated when a PR has a merge conflict label Aug 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts Automatically generated when a PR has a merge conflict feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants