Browse Source

Docs: clarify handling of extra fields in request body

pull/14769/head
Kevyn Valladares 6 months ago
parent
commit
06230aa981
  1. 6
      docs/en/docs/tutorial/body.md

6
docs/en/docs/tutorial/body.md

@ -55,6 +55,12 @@ For example, this model above declares a JSON "`object`" (or Python `dict`) like
} }
``` ```
/// note
By default, if the client sends extra fields in the request body that are not defined in the Pydantic model, they are ignored (not included in the model instance or in the response). This behavior comes from Pydantic's default `extra = "ignore"` configuration.
///
## Declare it as a parameter { #declare-it-as-a-parameter } ## Declare it as a parameter { #declare-it-as-a-parameter }
To add it to your *path operation*, declare it the same way you declared path and query parameters: To add it to your *path operation*, declare it the same way you declared path and query parameters:

Loading…
Cancel
Save