-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Problem statement
Nested properties that generate map objects don't create error messages that describe the full path to that object. Instead the error message just refers to the property as though it's a top-level property.
Example CreateRequest JSON:
{
"data": {
"gameType": {
"value": "Something longer than 2048chars...",
},
}
}
Example error:
value in body should be at most 2048 chars long.
This is related to #2595 which added support for paths for nested non-map properties of objects.
Swagger specification
...
"components": {
"schemas": {
"DataObject": {
"type": "object",
"nullable": true,
"properties": {
"value": {
"type": "string",
"nullable": true,
"maxLength": 2048,
},
},
"additionalProperties": false
},
"CreateRequest": {
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/DataObject"
},
"nullable": true,
}
},
...
}
Steps to reproduce
- Create a spec with a map param that returns
CompositeError
from itsValidate
method. - Generate client code and verify the validation logic for nested properties returns errors
Metadata
Metadata
Assignees
Labels
No labels