🌐 🔠 📄 🐢 Translate docs to Emoji 🥳 🎉 💥 🤯 🤯 (#5385)

* 🌐 💬  🩺  🦲

* 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

* 🛠️😊

* ♻️ Rename emoji lang from emj to em, and main docs name as 😉

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Axd1x8a <26704473+FeeeeK@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
LeeeeT
2023-04-01 12:26:04 +03:00
committed by GitHub
parent d666ccb622
commit d4e85da18b
125 changed files with 18865 additions and 2 deletions

View File

@@ -0,0 +1,141 @@
# 📣 📨 🖼 💽
👆 💪 📣 🖼 💽 👆 📱 💪 📨.
📥 📚 🌌 ⚫️.
## Pydantic `schema_extra`
👆 💪 📣 `example` Pydantic 🏷 ⚙️ `Config` &amp; `schema_extra`, 🔬 <a href="https://pydantic-docs.helpmanual.io/usage/schema/#schema-customization" class="external-link" target="_blank">Pydantic 🩺: 🔗 🛃</a>:
=== "🐍 3⃣.6️⃣ &amp; 🔛"
```Python hl_lines="15-23"
{!> ../../../docs_src/schema_extra_example/tutorial001.py!}
```
=== "🐍 3⃣.1⃣0⃣ &amp; 🔛"
```Python hl_lines="13-21"
{!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!}
```
👈 🔜 🚮-🔢 **🎻 🔗** 👈 🏷, &amp; ⚫️ 🔜 ⚙️ 🛠️ 🩺.
!!! tip
👆 💪 ⚙️ 🎏 ⚒ ↔ 🎻 🔗 &amp; 🚮 👆 👍 🛃 .
🖼 👆 💪 ⚙️ ⚫️ 🚮 🗃 🕸 👩‍💻 🔢, ♒️.
## `Field` 🌖 ❌
🕐❔ ⚙️ `Field()` ⏮️ Pydantic 🏷, 👆 💪 📣 **🎻 🔗** 🚶‍♀️ 🙆 🎏 ❌ ❌ 🔢.
👆 💪 ⚙️ 👉 🚮 `example` 🔠 🏑:
=== "🐍 3⃣.6️⃣ &amp; 🔛"
```Python hl_lines="4 10-13"
{!> ../../../docs_src/schema_extra_example/tutorial002.py!}
```
=== "🐍 3⃣.1⃣0⃣ &amp; 🔛"
```Python hl_lines="2 8-11"
{!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!}
```
!!! warning
🚧 🤯 👈 📚 ❌ 🚶‍♀️ 🏆 🚫 🚮 🙆 🔬, 🕴 , 🧾 🎯.
## `example` &amp; `examples` 🗄
🕐❔ ⚙️ 🙆:
* `Path()`
* `Query()`
* `Header()`
* `Cookie()`
* `Body()`
* `Form()`
* `File()`
👆 💪 📣 💽 `example` ⚖️ 👪 `examples` ⏮️ 🌖 👈 🔜 🚮 **🗄**.
### `Body` ⏮️ `example`
📥 👥 🚶‍♀️ `example` 📊 ⌛ `Body()`:
=== "🐍 3⃣.6️⃣ &amp; 🔛"
```Python hl_lines="20-25"
{!> ../../../docs_src/schema_extra_example/tutorial003.py!}
```
=== "🐍 3⃣.1⃣0⃣ &amp; 🔛"
```Python hl_lines="18-23"
{!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!}
```
### 🖼 🩺 🎚
⏮️ 🙆 👩‍🔬 🔛 ⚫️ 🔜 👀 💖 👉 `/docs`:
<img src="/img/tutorial/body-fields/image01.png">
### `Body` ⏮️ 💗 `examples`
👐 👁 `example`, 👆 💪 🚶‍♀️ `examples` ⚙️ `dict` ⏮️ **💗 🖼**, 🔠 ⏮️ 👈 🔜 🚮 **🗄** 💁‍♂️.
🔑 `dict` 🔬 🔠 🖼, &amp; 🔠 💲 1⃣ `dict`.
🔠 🎯 🖼 `dict` `examples` 💪 🔌:
* `summary`: 📏 📛 🖼.
* `description`: 📏 📛 👈 💪 🔌 ✍ ✍.
* `value`: 👉 ☑ 🖼 🎦, ✅ `dict`.
* `externalValue`: 🎛 `value`, 📛 ☝ 🖼. 👐 👉 5⃣📆 🚫 🐕‍🦺 📚 🧰 `value`.
=== "🐍 3⃣.6️⃣ &amp; 🔛"
```Python hl_lines="21-47"
{!> ../../../docs_src/schema_extra_example/tutorial004.py!}
```
=== "🐍 3⃣.1⃣0⃣ &amp; 🔛"
```Python hl_lines="19-45"
{!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!}
```
### 🖼 🩺 🎚
⏮️ `examples` 🚮 `Body()` `/docs` 🔜 👀 💖:
<img src="/img/tutorial/body-fields/image02.png">
## 📡
!!! warning
👉 📶 📡 🔃 🐩 **🎻 🔗** &amp; **🗄**.
🚥 💭 🔛 ⏪ 👷 👆, 👈 💪 🥃, &amp; 👆 🎲 🚫 💪 👉 , 💭 🆓 🚶 👫.
🕐❔ 👆 🚮 🖼 🔘 Pydantic 🏷, ⚙️ `schema_extra` ⚖️ `Field(example="something")` 👈 🖼 🚮 **🎻 🔗** 👈 Pydantic 🏷.
&amp; 👈 **🎻 🔗** Pydantic 🏷 🔌 **🗄** 👆 🛠️, &amp; ⤴️ ⚫️ ⚙️ 🩺 🎚.
**🎻 🔗** 🚫 🤙 ✔️ 🏑 `example` 🐩. ⏮️ ⏬ 🎻 🔗 🔬 🏑 <a href="https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.5" class="external-link" target="_blank">`examples`</a>, ✋️ 🗄 3⃣.0️⃣.3️⃣ ⚓️ 🔛 🗝 ⏬ 🎻 🔗 👈 🚫 ✔️ `examples`.
, 🗄 3⃣.0️⃣.3️⃣ 🔬 🚮 👍 <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#fixed-fields-20" class="external-link" target="_blank">`example`</a> 🔀 ⏬ **🎻 🔗** ⚫️ ⚙️, 🎏 🎯 (✋️ ⚫️ 👁 `example`, 🚫 `examples`), &amp; 👈 ⚫️❔ ⚙️ 🛠️ 🩺 🎚 (⚙️ 🦁 🎚).
, 👐 `example` 🚫 🍕 🎻 🔗, ⚫️ 🍕 🗄 🛃 ⏬ 🎻 🔗, &amp; 👈 ⚫️❔ 🔜 ⚙️ 🩺 🎚.
✋️ 🕐❔ 👆 ⚙️ `example` ⚖️ `examples` ⏮️ 🙆 🎏 🚙 (`Query()`, `Body()`, ♒️.) 📚 🖼 🚫 🚮 🎻 🔗 👈 🔬 👈 💽 (🚫 🗄 👍 ⏬ 🎻 🔗), 👫 🚮 🔗 *➡ 🛠️* 📄 🗄 (🏞 🍕 🗄 👈 ⚙️ 🎻 🔗).
`Path()`, `Query()`, `Header()`, &amp; `Cookie()`, `example` ⚖️ `examples` 🚮 <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-object" class="external-link" target="_blank">🗄 🔑, `Parameter Object` (🔧)</a>.
&amp; `Body()`, `File()`, &amp; `Form()`, `example` ⚖️ `examples` 📊 🚮 <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#mediaTypeObject" class="external-link" target="_blank">🗄 🔑, `Request Body Object`, 🏑 `content`, 🔛 `Media Type Object` (🔧)</a>.
🔛 🎏 ✋, 📤 🆕 ⏬ 🗄: **3⃣.1️⃣.0️⃣**, ⏳ 🚀. ⚫️ ⚓️ 🔛 ⏪ 🎻 🔗 &amp; 🏆 🛠️ ⚪️➡️ 🗄 🛃 ⏬ 🎻 🔗 ❎, 💱 ⚒ ⚪️➡️ ⏮️ ⏬ 🎻 🔗, 🌐 👫 🤪 🔺 📉. 👐, 🦁 🎚 ⏳ 🚫 🐕‍🦺 🗄 3⃣.1️⃣.0️⃣,, 🔜, ⚫️ 👍 😣 ⚙️ 💭 🔛.