Skip to content

📝 Update docs for Query Params and String Validations, remove obsolete Ellipsis docs (...)#13377

Merged
tiangolo merged 6 commits into
masterfrom
ellipsis
Feb 15, 2025
Merged

📝 Update docs for Query Params and String Validations, remove obsolete Ellipsis docs (...)#13377
tiangolo merged 6 commits into
masterfrom
ellipsis

Conversation

@tiangolo

@tiangolo tiangolo commented Feb 15, 2025

Copy link
Copy Markdown
Member

📝 Update docs for Query Params and String Validations, remove obsolete Ellipsis docs (...)

Pydantic and FastAPI discourage the use of Ellipsis (...) for a while now, any code using Ellipsis should be updated to instead not have any default parameter, which conveys the same meaning of making the parameter required.

The docs have been updated to not use nor recommend Ellipsis and instead use the more modern and supported form (just not declaring a default value).

The old examples were targetting Pydantic v1 only, and were not tested, so this hasn't been fully supported for a while.

This also updates and modernizes those same docs, to use the newer version of the syntax in the examples, prioritizing Python 3.10+.

@github-actions github-actions Bot added the docs Documentation about how to use FastAPI label Feb 15, 2025
@tiangolo tiangolo marked this pull request as ready for review February 15, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation about how to use FastAPI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant