- edited description
FormData in body fails validation (Body not expected)
Issue #28
closed
Steps to reproduce:
- Create a swagger definition with an endpoint taking one
formData
parameter with the methodPOST
. E.g. POST /test expecting a parameterfoo
with typeformData
- Try to validate a request with the formdata in the body, e.g.
POST /test HTTP/1.1
Host: localhost:11111
Content-Type: application/x-www-form-urlencoded
foo=bar
- Validation fails with "No request body is expected for %s on path '%s'."
I suspect this is a bug as formData can indeed be in the request body.
Looks like the issue is at RequestValidator.java:65
I can work on a fix for this, as long as you consider it a bug too :)
Comments (3)
-
reporter -
Looks like a bug to me. More than happy for you to submit a fix!
-
- changed status to closed
Available in 1.0.8
- Log in to comment