Skip to content

Conversation

tiangolo
Copy link
Member

@tiangolo tiangolo commented Feb 15, 2025

📝 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
@tiangolo tiangolo merged commit 9ec452a into master Feb 15, 2025
52 checks passed
@tiangolo tiangolo deleted the ellipsis branch February 15, 2025 16:24
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