Browse Source

📝 Update example validation error from Pydantic v1 to match Pydantic v2 in `docs/en/docs/tutorial/path-params.md` (#10043)

pull/10490/head
Giulio Davide Carparelli 2 years ago
committed by GitHub
parent
commit
89e03bad16
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      docs/en/docs/tutorial/path-params.md
  2. 6
      docs/en/docs/tutorial/query-params.md

6
docs/en/docs/tutorial/path-params.md

@ -48,12 +48,14 @@ But if you go to the browser at <a href="http://127.0.0.1:8000/items/foo" class=
{ {
"detail": [ "detail": [
{ {
"type": "int_parsing",
"loc": [ "loc": [
"path", "path",
"item_id" "item_id"
], ],
"msg": "value is not a valid integer", "msg": "Input should be a valid integer, unable to parse string as an integer",
"type": "type_error.integer" "input": "foo",
"url": "https://errors.pydantic.dev/2.1/v/int_parsing"
} }
] ]
} }

6
docs/en/docs/tutorial/query-params.md

@ -175,12 +175,14 @@ http://127.0.0.1:8000/items/foo-item
{ {
"detail": [ "detail": [
{ {
"type": "missing",
"loc": [ "loc": [
"query", "query",
"needy" "needy"
], ],
"msg": "field required", "msg": "Field required",
"type": "value_error.missing" "input": null,
"url": "https://errors.pydantic.dev/2.1/v/missing"
} }
] ]
} }

Loading…
Cancel
Save