From 74c35d40047b15028472263461d7b2d81bb63b15 Mon Sep 17 00:00:00 2001 From: Irfanuddin Shafi Ahmed Date: Mon, 18 Dec 2023 23:59:43 +0530 Subject: [PATCH] fix: match output of HTTPValidationError as per Pydantic v2 Fixes https://github.com/tiangolo/fastapi/issues/10787 --- fastapi/openapi/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastapi/openapi/utils.py b/fastapi/openapi/utils.py index 5bfb5acef..d9239d650 100644 --- a/fastapi/openapi/utils.py +++ b/fastapi/openapi/utils.py @@ -42,6 +42,8 @@ validation_error_definition = { "type": "array", "items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, }, + "input": {"title": "Input", "type": "any"}, + "url": {"title": "URL", "type": "string"}, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}, },