- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for Model (0.16 sec)
-
docs/zh/docs/advanced/custom-response.md
你还可以在 *路径操作装饰器* 中声明你想用的 `Response`。 你从 *路径操作函数* 中返回的内容将被放在该 `Response` 中。 并且如果该 `Response` 有一个 JSON 媒体类型(`application/json`),比如使用 `JSONResponse` 或者 `UJSONResponse` 的时候,返回的数据将使用你在路径操作装饰器中声明的任何 Pydantic 的 `response_model` 自动转换(和过滤)。 !!! note "说明" 如果你使用不带有任何媒体类型的响应类,FastAPI 认为你的响应没有任何内容,所以不会在生成的OpenAPI文档中记录响应格式。 ## 使用 `ORJSONResponse`
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 7.8K bytes - Viewed (1) -
docs/de/docs/advanced/custom-response.md
Und wenn diese `Response` einen JSON-Medientyp (`application/json`) hat, wie es bei `JSONResponse` und `UJSONResponse` der Fall ist, werden die von Ihnen zurückgegebenen Daten automatisch mit jedem Pydantic `response_model` konvertiert (und gefiltert), das Sie im *Pfadoperation-Dekorator* deklariert haben. !!! note "Hinweis"
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Tue Jan 23 13:05:12 GMT 2024 - 13.5K bytes - Viewed (0) -
docs/ja/docs/advanced/custom-response.md
*path operation関数* から返されるコンテンツは、その `Response` に含まれます。 そしてもし、`Response` が、`JSONResponse` や `UJSONResponse` の場合のようにJSONメディアタイプ (`application/json`) ならば、データは *path operationデコレータ* に宣言したPydantic `response_model` により自動的に変換 (もしくはフィルタ) されます。 !!! note "備考" メディアタイプを指定せずにレスポンスクラスを利用すると、FastAPIは何もコンテンツがないことを期待します。そのため、生成されるOpenAPIドキュメントにレスポンスフォーマットが記載されません。 ## `ORJSONResponse` を使う
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Mon Jul 19 19:14:58 GMT 2021 - 10.7K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.7K bytes - Viewed (0) -
docs/em/docs/advanced/custom-response.md
🎚 👈 👆 📨 ⚪️➡️ 👆 *➡ 🛠️ 🔢* 🔜 🚮 🔘 👈 `Response`. & 🚥 👈 `Response` ✔️ 🎻 📻 🆎 (`application/json`), 💖 💼 ⏮️ `JSONResponse` & `UJSONResponse`, 💽 👆 📨 🔜 🔁 🗜 (& ⛽) ⏮️ 🙆 Pydantic `response_model` 👈 👆 📣 *➡ 🛠️ 👨🎨*. !!! note 🚥 👆 ⚙️ 📨 🎓 ⏮️ 🙅♂ 📻 🆎, FastAPI 🔜 ⌛ 👆 📨 ✔️ 🙅♂ 🎚, ⚫️ 🔜 🚫 📄 📨 📁 🚮 🏗 🗄 🩺. ## ⚙️ `ORJSONResponse`
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 9.8K bytes - Viewed (0)