mirror of
https://github.com/fastapi/sqlmodel.git
synced 2026-01-06 09:29:57 -06:00
📝 Update documentation to refer to list instead of List (#1147)
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> Co-authored-by: svlandeg <svlandeg@github.com>
This commit is contained in:
@@ -38,7 +38,7 @@ For example, we can pass the same `Hero` **SQLModel** class (because it is also
|
||||
|
||||
We can also use other type annotations, the same way we can use with Pydantic fields. For example, we can pass a list of `Hero`s.
|
||||
|
||||
First, we import `List` from `typing` and then we declare the `response_model` with `List[Hero]`:
|
||||
To do so, we declare the `response_model` with `list[Hero]`:
|
||||
|
||||
{* ./docs_src/tutorial/fastapi/response_model/tutorial001_py310.py ln[40:44] hl[40] *}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user