62 lines
2.0 KiB
JSON
62 lines
2.0 KiB
JSON
[
|
|
{
|
|
"description": "detailed error reporting",
|
|
"enums": [],
|
|
"types": [],
|
|
"puncs": [
|
|
{
|
|
"name": "detailed_errors_test",
|
|
"public": false,
|
|
"schemas": [
|
|
{
|
|
"$id": "detailed_errors_test.request",
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "object",
|
|
"properties": {
|
|
"street": {
|
|
"type": "string"
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"maxLength": 10
|
|
}
|
|
},
|
|
"required": [
|
|
"street",
|
|
"city"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"address"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"description": "multiple errors in nested object",
|
|
"data": {
|
|
"address": {
|
|
"street": 123,
|
|
"city": "Supercalifragilisticexpialidocious"
|
|
}
|
|
},
|
|
"valid": false,
|
|
"expect_errors": [
|
|
{
|
|
"code": "TYPE_MISMATCH",
|
|
"path": "/address/street"
|
|
},
|
|
{
|
|
"code": "MAX_LENGTH_VIOLATED",
|
|
"path": "/address/city"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
] |