mirror of https://github.com/tiangolo/fastapi.git
Merge branch 'master' into jsonable_encoder
This commit is contained in:
commit
c5a27f9748
|
|
@ -14,6 +14,9 @@ hide:
|
|||
|
||||
### Translations
|
||||
|
||||
* ✏️ Fix typo in `docs/ja/docs/tutorial/encoder.md`. PR [#13815](https://github.com/fastapi/fastapi/pull/13815) by [@ruzia](https://github.com/ruzia).
|
||||
* ✏️ Fix typo in `docs/ja/docs/tutorial/handling-errors.md`. PR [#13814](https://github.com/fastapi/fastapi/pull/13814) by [@ruzia](https://github.com/ruzia).
|
||||
* ✏️ Fix typo in `docs/ja/docs/tutorial/body-fields.md`. PR [#13802](https://github.com/fastapi/fastapi/pull/13802) by [@ruzia](https://github.com/ruzia).
|
||||
* 🌐 Add Russian translation for `docs/ru/docs/advanced/index.md`. PR [#13797](https://github.com/fastapi/fastapi/pull/13797) by [@NavesSapnis](https://github.com/NavesSapnis).
|
||||
|
||||
## 0.115.13
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
追加情報は`Field`や`Query`、`Body`などで宣言することができます。そしてそれは生成されたJSONスキーマに含まれます。
|
||||
|
||||
後に例を用いて宣言を学ぶ際に、追加情報を句悪方法を学べます。
|
||||
後に例を用いて宣言を学ぶ際に、追加情報を追加する方法を学べます。
|
||||
|
||||
## まとめ
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
## `jsonable_encoder`の使用
|
||||
|
||||
JSON互換のデータのみを受信するデータベース`fase_db`があるとしましょう。
|
||||
JSON互換のデータのみを受信するデータベース`fake_db`があるとしましょう。
|
||||
|
||||
例えば、`datetime`オブジェクトはJSONと互換性がないので、このデーターベースには受け取られません。
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ Pythonの例外なので、`return`ではなく、`raise`です。
|
|||
|
||||
`HTTPException`を発生させる際には、`str`だけでなく、JSONに変換できる任意の値を`detail`パラメータとして渡すことができます。
|
||||
|
||||
`dist`や`list`などを渡すことができます。
|
||||
`dict`や`list`などを渡すことができます。
|
||||
|
||||
これらは **FastAPI** によって自動的に処理され、JSONに変換されます。
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue