Open
Description
Consumes set to / in OpenAPI spec, breaks swagger ui request.
For example in Kubernetes:
curl -X DELETE "HOST/api/v1/namespaces/test-namespace/pods/test-pod?propagationPolicy=Background" -H "accept: application/json" -H "Content-Type: /" -d "{ "propagationPolicy": "Background"}"
breaks in app because it takes / literally, instead you should be able to choose from:
- application/json
- application/yaml
- application/vnd.kubernetes.protobuf
Such curl requests will results in:
"message": "the body of the request was in an unknown format - accepted media types include: application/json, application/yaml, application/vnd.kubernetes.protobuf",
"reason": "UnsupportedMediaType",
Is there a way to add custom content-types when / is matched?