You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a POST request the controller performs this check:
if (!ModelState.IsValid)
mreturn ValidationHelper.ReturnValidationError(ModelState)
If the data sent contains an invalid value, IsValid=false and Postman display this response:
Steps to reproduce
Codegen the Odata controller template, make sure POST requests are enabled for the structure, import the Postman tests into Postman. Select any ALPHA field in the POST request and pass a numeric value instead, this should cause ModelState.IsValid=false.
Proposed solution:
It would be ideal if the response contained either the first field with a validation error OR better yet all invalid fields. It would further be ideal if the cause of the error is indicated per field (ie. "Alpha value expected").
Note: As of this writing, the only invalid condition I found was sending a numeric value in an ALPHA field. Other conditions tested below are NOT considered invalid:
Send alpha data in a numeric field (if the opposite is considered invalid, shouldn't this also be invalid?)
Send a value that is too large for the destination field. Ex. send "ZY" to an A1 field or 99 to a D1 field behaves as described in the assignment statements implicit formatting rules in the Synergy doc. (IMO, this is reasonable behavior and should not be considered invalid)
The text was updated successfully, but these errors were encountered:
Issue:
When sending a POST request the controller performs this check:
if (!ModelState.IsValid)
mreturn ValidationHelper.ReturnValidationError(ModelState)
If the data sent contains an invalid value, IsValid=false and Postman display this response:
Steps to reproduce
Codegen the Odata controller template, make sure POST requests are enabled for the structure, import the Postman tests into Postman. Select any ALPHA field in the POST request and pass a numeric value instead, this should cause ModelState.IsValid=false.
Proposed solution:
It would be ideal if the response contained either the first field with a validation error OR better yet all invalid fields. It would further be ideal if the cause of the error is indicated per field (ie. "Alpha value expected").
Note: As of this writing, the only invalid condition I found was sending a numeric value in an ALPHA field. Other conditions tested below are NOT considered invalid:
The text was updated successfully, but these errors were encountered: