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 hapi-openapi tries to validate the payload for an endpoint, and the payload is just an empty object, it will replace the empty object with an undefined instead. In my case, that meant that my object which didn't require any property to exist gave me a 422 response back.
The magic lines are currently 269 to 271 where:
if (Util.isObject(data) && !Object.keys(data).length) {
return undefined;
}
I'm not sure what this is meant to accomplish, but it gave me a very unexpected 422 back.
The text was updated successfully, but these errors were encountered:
When hapi-openapi tries to validate the payload for an endpoint, and the payload is just an empty object, it will replace the empty object with an
undefined
instead. In my case, that meant that my object which didn't require any property to exist gave me a 422 response back.The magic lines are currently 269 to 271 where:
I'm not sure what this is meant to accomplish, but it gave me a very unexpected 422 back.
The text was updated successfully, but these errors were encountered: