mirror of https://github.com/tiangolo/fastapi.git
Merge 02f081b6f3 into 272204c0c7
This commit is contained in:
commit
9d41bebe99
|
|
@ -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",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue