Skip to content

Commit 7197eaa

Browse files
authored
fix: allow empty header name
1 parent 4e2a95d commit 7197eaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PHPDraft/Out/OpenAPI/OpenApiRenderer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private function toOperation(HTTPRequest $request, Transition $transition, array
164164

165165
foreach ($request->headers as $name => $value) {
166166
if ($name === 'Content-Type') { continue; }
167-
if ($name === $this->base_data['API_KEY_HEADER']) {
167+
if ($name === $this->base_data['API_KEY_HEADER'] ?? NULL) {
168168
$operation['security'] = [["api_key" => []]];
169169
continue;
170170
}
@@ -511,4 +511,4 @@ private function getTags(): array {
511511
return $return;
512512
}
513513

514-
}
514+
}

0 commit comments

Comments
 (0)