Skip to content

Replace deprecated schema() with model_json_schema() - #32

Open
xyf5432 wants to merge 1 commit into
chenfengxu714:masterfrom
xyf5432:fix/pydantic-schema-deprecation
Open

Replace deprecated schema() with model_json_schema()#32
xyf5432 wants to merge 1 commit into
chenfengxu714:masterfrom
xyf5432:fix/pydantic-schema-deprecation

Conversation

@xyf5432

@xyf5432 xyf5432 commented Aug 26, 2026

Copy link
Copy Markdown

Fix #31

Replace the deprecated BaseModel.schema() calls in demo/main.py with
model_json_schema() (available since pydantic 2.0.0, identical output),
removing the PydanticDeprecatedSince20 warning emitted on every
/api/settings request.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace deprecated schema() with model_json_schema()

1 participant