@ -183,18 +183,18 @@ This would mean that **FastAPI** would expect a body similar to:
Again, doing just that declaration, with **FastAPI** you get:
* Editor support (completion, etc), even for nested models
* Editor support (completion, etc.), even for nested models
* Data conversion
* Data validation
* Automatic documentation
## Special types and validation
Apart from normal singular types like `str`, `int`, `float`, etc. You can use more complex singular types that inherit from `str`.
Apart from normal singular types like `str`, `int`, `float`, etc. you can use more complex singular types that inherit from `str`.
To see all the options you have, checkout the docs for <ahref="https://pydantic-docs.helpmanual.io/usage/types/"class="external-link"target="_blank">Pydantic's exotic types</a>. You will see some examples in the next chapter.
For example, as in the `Image` model we have a `url` field, we can declare it to be instead of a `str`, a Pydantic's `HttpUrl`:
For example, as in the `Image` model we have a `url` field, we can declare it to be an instance of Pydantic's `HttpUrl` instead of a `str`:
=== "Python 3.10+"
@ -218,7 +218,7 @@ The string will be checked to be a valid URL, and documented in JSON Schema / Op
## Attributes with lists of submodels
You can also use Pydantic models as subtypes of `list`, `set`, etc:
You can also use Pydantic models as subtypes of `list`, `set`, etc.:
=== "Python 3.10+"
@ -238,7 +238,7 @@ You can also use Pydantic models as subtypes of `list`, `set`, etc: