mirror of https://github.com/tiangolo/fastapi.git
✏️ Fix typos from @mariacamilagl 's review
This commit is contained in:
parent
8d29a28f82
commit
45ccf059ed
|
|
@ -83,7 +83,7 @@ You also get error checks for incorrect type operations:
|
|||
|
||||
<img src="/img/tutorial/body/image04.png">
|
||||
|
||||
This is not by chance, the whole framework was built around that desing.
|
||||
This is not by chance, the whole framework was built around that design.
|
||||
|
||||
And it was thoroughly tested at the design phase, before any implementation, to ensure it would work with all the editors.
|
||||
|
||||
|
|
|
|||
|
|
@ -59,13 +59,13 @@ But if you go to the browser at <a href="http://127.0.0.1:8000/items/foo" target
|
|||
|
||||
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 `foat` instead of an int, as in: <a href="http://127.0.0.1:8000/items/4.2" 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" target="_blank">http://127.0.0.1:8000/items/4.2</a>
|
||||
|
||||
|
||||
!!! check
|
||||
So, with the same Python type declaration, **FastAPI** gives you data validation.
|
||||
|
||||
Notice that the error also clearly states exactly the point where the validaton didn't pass.
|
||||
Notice that the error also clearly states exactly the point where the validation didn't pass.
|
||||
|
||||
This is incredibly helpful while developing and debugging code that interacts with your API.
|
||||
|
||||
|
|
@ -109,4 +109,4 @@ With **FastAPI**, by using short, intuitive and standard Python type declaration
|
|||
|
||||
And you only have to declare them once.
|
||||
|
||||
That's probably the main visible advantage of **FastAPI** compared to alternative frameworks (appart from the raw performance).
|
||||
That's probably the main visible advantage of **FastAPI** compared to alternative frameworks (apart from the raw performance).
|
||||
Loading…
Reference in New Issue