mirror of https://github.com/tiangolo/fastapi.git
Update docs/en/docs/tutorial/sql-databases.md
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
This commit is contained in:
parent
fbad9bc9e2
commit
581d111f86
|
|
@ -289,7 +289,6 @@ We receive in the request a `HeroCreate` *data model*, and from it, we create a
|
|||
This new *table model* `Hero` will have the fields sent by the client, and will also have an `id` generated by the database.
|
||||
|
||||
Then we return the same *table model* `Hero` as is from the function. But as we declare the `response_model` with the `HeroPublic` *data model*, **FastAPI** will use `HeroPublic` to validate and serialize the data.
|
||||
7
|
||||
{* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[61:67] hl[61:63] *}
|
||||
|
||||
/// tip
|
||||
|
|
|
|||
Loading…
Reference in New Issue