mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-11 13:06:43 +00:00
✏️ Fix typo in Tutorial - Path Parameters (#2231)
This commit is contained in:
parent
3fb6d2982f
commit
733218f199
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ But if you go to the browser at <a href="http://127.0.0.1:8000/items/foo" class=
|
||||||
|
|
||||||
because the path parameter `item_id` had a value of `"foo"`, which is not an `int`.
|
because the path parameter `item_id` had a value of `"foo"`, which is not an `int`.
|
||||||
|
|
||||||
The same error would appear if you provided a `float` instead of an int, as in: <a href="http://127.0.0.1:8000/items/4.2" class="external-link" target="_blank">http://127.0.0.1:8000/items/4.2</a>
|
The same error would appear if you provided a `float` instead of an `int`, as in: <a href="http://127.0.0.1:8000/items/4.2" class="external-link" target="_blank">http://127.0.0.1:8000/items/4.2</a>
|
||||||
|
|
||||||
!!! check
|
!!! check
|
||||||
So, with the same Python type declaration, **FastAPI** gives you data validation.
|
So, with the same Python type declaration, **FastAPI** gives you data validation.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue