From 9823ef0960b8d5f47522b1ce21e40f7071dbaa94 Mon Sep 17 00:00:00 2001 From: moonso Date: Tue, 28 Sep 2021 10:17:33 +0200 Subject: [PATCH 1/2] Fixes small typos --- docs/tutorial/fastapi/multiple-models.md | 2 +- docs/tutorial/fastapi/simple-hero-api.md | 2 +- docs/tutorial/many-to-many/index.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/fastapi/multiple-models.md b/docs/tutorial/fastapi/multiple-models.md index 5cac6dda91..f0d3334123 100644 --- a/docs/tutorial/fastapi/multiple-models.md +++ b/docs/tutorial/fastapi/multiple-models.md @@ -336,7 +336,7 @@ And because we can't leave the empty space when creating a new class, but we don This means that there's nothing else special in this class apart from the fact that it is named `HeroCreate` and that it inherits from `HeroBase`. -As an alternative, we could use `HeroBase` directly in the API code instead of `HeroCreate`, but it would show up in the auomatic docs UI with that name "`HeroBase`" which could be **confusing** for clients. Instead, "`HeroCreate`" is a bit more explicit about what it is for. +As an alternative, we could use `HeroBase` directly in the API code instead of `HeroCreate`, but it would show up in the automatic docs UI with that name "`HeroBase`" which could be **confusing** for clients. Instead, "`HeroCreate`" is a bit more explicit about what it is for. On top of that, we could easily decide in the future that we want to receive **more data** when creating a new hero apart from the data in `HeroBase` (for example a password), and now we already have the class to put those extra fields. diff --git a/docs/tutorial/fastapi/simple-hero-api.md b/docs/tutorial/fastapi/simple-hero-api.md index 8759bce2c2..8676136a46 100644 --- a/docs/tutorial/fastapi/simple-hero-api.md +++ b/docs/tutorial/fastapi/simple-hero-api.md @@ -152,7 +152,7 @@ It will be called when a user sends a request with a `POST` **operation** to the ## The **SQLModel** Advantage -Here's where having our **SQLModel** class models be both **SQLAlchemy** models and **Pydantic** models at the same tieme shine. ✨ +Here's where having our **SQLModel** class models be both **SQLAlchemy** models and **Pydantic** models at the same time shine. ✨ Here we use the **same** class model to define the **request body** that will be received by our API. diff --git a/docs/tutorial/many-to-many/index.md b/docs/tutorial/many-to-many/index.md index 24d7824fe0..e2e34777c0 100644 --- a/docs/tutorial/many-to-many/index.md +++ b/docs/tutorial/many-to-many/index.md @@ -60,7 +60,7 @@ Notice that each hero can only have **one** connection. But each team can receiv ## Introduce Many-to-Many -But let's say that as **Deadpond** is a great chracter, they recruit him to the new **Preventers** team, but he's still part of the **Z-Force** team too. +But let's say that as **Deadpond** is a great character, they recruit him to the new **Preventers** team, but he's still part of the **Z-Force** team too. So, now, we need to be able to have a hero that is connected to **many** teams. And then, each team, should still be able to receive **many** heroes. So we need a **Many-to-Many** relationship. From c365a011a2b2cc2105b9ecb7393829a3516fa2b7 Mon Sep 17 00:00:00 2001 From: moonso Date: Thu, 30 Sep 2021 14:05:48 +0200 Subject: [PATCH 2/2] Fixes small typos in code-structure --- docs/tutorial/code-structure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/code-structure.md b/docs/tutorial/code-structure.md index 0d91b4d5f5..4aa5ffbd0c 100644 --- a/docs/tutorial/code-structure.md +++ b/docs/tutorial/code-structure.md @@ -170,7 +170,7 @@ Let's assume that now the file structure is: The problem with circular imports is that Python can't resolve them at *runtime*. -but when using Python **type annotations** it's very common to need to declare the type of some variables with classes imported from other files. +But when using Python **type annotations** it's very common to need to declare the type of some variables with classes imported from other files. And the files with those classes might **also need to import** more things from the first files.