Skip to content

Commit 9d3ca01

Browse files
📝 Tweak wording in docs/tutorial/fastapi/multiple-models.md (#674)
Co-authored-by: Luis Benitez <[email protected]>
1 parent 6cd086f commit 9d3ca01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/tutorial/fastapi/multiple-models.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ Here's the weird thing, the `id` currently seems also "optional". 🤔
5353

5454
This is because in our **SQLModel** class we declare the `id` with `Optional[int]`, because it could be `None` in memory until we save it in the database and we finally get the actual ID.
5555

56-
But in the responses, we would always send a model from the database, and it would **always have an ID**. So the `id` in the responses could be declared as required too.
56+
But in the responses, we always send a model from the database, so it **always has an ID**. So the `id` in the responses can be declared as required.
5757

58-
This would mean that our application is making the compromise with the clients that if it sends a hero, it would for sure have an `id` with a value, it would not be `None`.
58+
This means that our application is making the promise to the clients that if it sends a hero, it will for sure have an `id` with a value, it will not be `None`.
5959

60-
### Why Is it Important to Compromise with the Responses
60+
### Why Is it Important to Have a Contract for Responses
6161

6262
The ultimate goal of an API is for some **clients to use it**.
6363

0 commit comments

Comments
 (0)