diff --git a/src/Writing/OpenAPISpecWriter.php b/src/Writing/OpenAPISpecWriter.php index 4c9a6cd0..5599ed9e 100644 --- a/src/Writing/OpenAPISpecWriter.php +++ b/src/Writing/OpenAPISpecWriter.php @@ -177,7 +177,7 @@ protected function generateEndpointParametersSpec(OutputEndpointData $endpoint): if (count($endpoint->headers)) { foreach ($endpoint->headers as $name => $value) { - if (in_array($name, ['Content-Type', 'content-type', 'Accept', 'accept'])) + if (in_array(strtolower($name), ['content-type', 'accept', 'authorization'])) // These headers are not allowed in the spec. // https://swagger.io/docs/specification/describing-parameters/#header-parameters continue;