diff --git a/README.md b/README.md index d8c8e1b..2b3506a 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ You can copying the contents of `pages.py` > **Note** +> > In the paths files, FastAPI's decorators are called with `@self.app.`, not just `@app.` @@ -154,12 +155,13 @@ and can be deleted or edited, except: are stored in `app/sql/crud.py` > **Note** +> > As the official FastAPI documentation recommends (the link is above), -there are two schemas — `User` and `UserCreate` — for one `User` SQLAlchemy model. +there are two schemas — `User` and `UserCreate` — for one `User` SQLAlchemy model. > The first one is needed for SELECT requests, -and the second one is for INSERT requests (creating users). +and the second one is for INSERT requests (creating users). > The first one contains all information about user, -but the second one (`UserCreate`) ommits `id` field, +but the second one (`UserCreate`) ommits `id` field, because we don't want to specify an ID when creating a new user, it will be generated automatically by the MariaDB server.