This commit is contained in:
Johan 2025-12-16 21:07:32 +00:00 committed by GitHub
commit 9d41bebe99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -42,6 +42,7 @@ from .._compat import _is_model_field
validation_error_definition = { validation_error_definition = {
"title": "ValidationError", "title": "ValidationError",
"type": "object", "type": "object",
"description": "A message detailing how and where the input diverges from the schema.",
"properties": { "properties": {
"loc": { "loc": {
"title": "Location", "title": "Location",
@ -49,7 +50,11 @@ validation_error_definition = {
"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "items": {"anyOf": [{"type": "string"}, {"type": "integer"}]},
}, },
"msg": {"title": "Message", "type": "string"}, "msg": {"title": "Message", "type": "string"},
"type": {"title": "Error Type", "type": "string"}, "type": {
"title": "Error Type",
"type": "string",
"description": "Free-form; when type is 'missing', it pertains to absent required fields.",
},
}, },
"required": ["loc", "msg", "type"], "required": ["loc", "msg", "type"],
} }
@ -57,6 +62,7 @@ validation_error_definition = {
validation_error_response_definition = { validation_error_response_definition = {
"title": "HTTPValidationError", "title": "HTTPValidationError",
"type": "object", "type": "object",
"description": "A collection of messages detailing errors in the input.",
"properties": { "properties": {
"detail": { "detail": {
"title": "Detail", "title": "Detail",