OpenAPI: Fix header name in code samples

This commit is contained in:
fuma-nama
2024-10-04 17:04:49 +08:00
parent cc7edf1d34
commit 8a32f79076
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-openapi': patch
---
Fix header name in code samples
+1 -1
View File
@@ -76,7 +76,7 @@ export function generateSample(
const prefix = getSecurityPrefix(security);
params.push({
name: 'Authorization',
name: security.type === 'apiKey' ? security.name : 'Authorization',
schema: {
type: 'string',
},