openapi-validation-middleware
openapi-validation-middleware copied to clipboard
Exception if required body is empty
Hi, man. Here's what I've found: if I send no body (be aware: not an empty string) to an endpoint where body is required, the following exception is raised:
curl -X POST http://localhost/endpoint
Argument 1 passed to HKarlstrom/Middleware/OpenApiValidation::isJsonMediaType() must be of the type string, null given, called in
hkarlstrom/openapi-validation-middleware/src/OpenApiValidation.php on line 274
hkarlstrom/openapi-validation-middleware/src/OpenApiValidation.php on line 585
Of course I'm aware this cURL request has no meaning: it's just a test.
By reading other issues, I see issues #29 and #31 seem related.
Any questions, here I am!
Thanks in advance.
Francesco