]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✏️ Fix typos in `docs/en/docs/how-to/separate-openapi-schemas.md` and `docs/en/docs...
authorxzmeng <aumo@foxmail.com>
Sat, 2 Sep 2023 15:22:24 +0000 (23:22 +0800)
committerGitHub <noreply@github.com>
Sat, 2 Sep 2023 15:22:24 +0000 (17:22 +0200)
docs/en/docs/how-to/separate-openapi-schemas.md
docs/en/docs/tutorial/schema-extra-example.md

index d289391ca344bba02a80e112d7c7c9e3cb13d41d..d38be3c592ccb2918f98f996ba6406244ccbc467 100644 (file)
@@ -160,7 +160,7 @@ If you interact with the docs and check the response, even though the code didn'
 
 This means that it will **always have a value**, it's just that sometimes the value could be `None` (or `null` in JSON).
 
-That means that, clients using your API don't have to check if the value exists or not, they can **asume the field will always be there**, but just that in some cases it will have the default value of `None`.
+That means that, clients using your API don't have to check if the value exists or not, they can **assume the field will always be there**, but just that in some cases it will have the default value of `None`.
 
 The way to describe this in OpenAPI, is to mark that field as **required**, because it will always be there.
 
index 8cf1b9c091cb4fac6114a9004f0628b31b0224f3..9eeb3f1f2935173f0694ce960b191441d3a46fab 100644 (file)
@@ -38,13 +38,13 @@ That extra info will be added as-is to the output **JSON Schema** for that model
 
     In Pydantic version 2, you would use the attribute `model_config`, that takes a `dict` as described in <a href="https://docs.pydantic.dev/latest/usage/model_config/" class="external-link" target="_blank">Pydantic's docs: Model Config</a>.
 
-    You can set `"json_schema_extra"` with a `dict` containing any additonal data you would like to show up in the generated JSON Schema, including `examples`.
+    You can set `"json_schema_extra"` with a `dict` containing any additional data you would like to show up in the generated JSON Schema, including `examples`.
 
 === "Pydantic v1"
 
     In Pydantic version 1, you would use an internal class `Config` and `schema_extra`, as described in <a href="https://docs.pydantic.dev/1.10/usage/schema/#schema-customization" class="external-link" target="_blank">Pydantic's docs: Schema customization</a>.
 
-    You can set `schema_extra` with a `dict` containing any additonal data you would like to show up in the generated JSON Schema, including `examples`.
+    You can set `schema_extra` with a `dict` containing any additional data you would like to show up in the generated JSON Schema, including `examples`.
 
 !!! tip
     You could use the same technique to extend the JSON Schema and add your own custom extra info.