swift-openapi-generator
swift-openapi-generator copied to clipboard
Server should validate Content-Type header
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.