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
As you can see, I point to the body definition with $ref. When a request is made to the endpoint, the validator reports an error and says that the required image field is not present. The spec is valid, I have also validated it with other tools.
I spent several hours trying to figure out what the reason could be. Then I removed $ref and wrote down the body definition directly in the route. And voila, it works like expected!
Please note that $ref works wonderful with application/json body. This problem appears in my case only with multipart.
During my research I also saw that you had commented out $refin this example as well. So, any thoughts on this?
The text was updated successfully, but these errors were encountered:
Hello, I am trying to validate a
multipart/form-data
request body. The following spec is given:As you can see, I point to the body definition with
$ref
. When a request is made to the endpoint, the validator reports an error and says that the requiredimage
field is not present. The spec is valid, I have also validated it with other tools.I spent several hours trying to figure out what the reason could be. Then I removed
$ref
and wrote down the body definition directly in the route. And voila, it works like expected!Please note that
$ref
works wonderful withapplication/json
body. This problem appears in my case only with multipart.During my research I also saw that you had commented out
$ref
in this example as well. So, any thoughts on this?The text was updated successfully, but these errors were encountered: