apigee-127 / swagger-node-runner

The heart of Swagger-Node
MIT License
102 stars 124 forks source link

Request validation uses 400 instead of 415 for wrong content type #95

Open tkalliom opened 7 years ago

tkalliom commented 7 years ago

When making a request with an unsupported Content-Type header, the produced error body is helpful enough (code: INVALID_CONTENT_TYPE, message: Invalid Content-Type (x). These are supported: y, z...). However, the status code 400 is not the one you would expect; according to the HTTP specification, in this case 415 should be used.