swift-openapi-generator icon indicating copy to clipboard operation
swift-openapi-generator copied to clipboard

Server should validate Content-Type header

Open czechboy0 opened this issue 2 years ago • 0 comments

Currently, a generated server does not validate the content-type header before it tries to parse the request body contents, which means that if incorrect request body data is sent, the error message will be thrown by e.g. the JSONDecoder, and might be a bit cryptic, versus a clear error thrown by a method like validateContentTypeIfPresent does for responses bodies.

czechboy0 avatar May 25 '23 08:05 czechboy0