fix: update shiki dependency and enhance OpenAPI security scheme

- Updated shiki package version from 1.22.2 to 3.19.0 in package.json and pnpm-lock.yaml.
- Modified OpenAPI security scheme to include 'x-default' for the API key in the fix-openapi script and openapi.json.
This commit is contained in:
Mauricio Siu
2025-12-07 06:08:53 -06:00
parent baaf062975
commit 418c7a2d33
4 changed files with 14 additions and 14 deletions

View File

@@ -9,7 +9,7 @@
"types:check": "fumadocs-mdx && tsc --noEmit",
"postinstall": "fumadocs-mdx",
"fix-openapi": "node scripts/fix-openapi.mjs",
"build:docs": "npm run fix-openapi && node generate-docs.mjs"
"build:docs": "npm run fix-openapi && node generate-docs.mjs"
},
"dependencies": {
"@radix-ui/react-dropdown-menu": "^2.1.16",
@@ -23,7 +23,7 @@
"next": "16.0.1",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"shiki": "1.22.2",
"shiki": "3.19.0",
"tailwind-merge": "^2.5.4"
},
"devDependencies": {

View File

@@ -23449,7 +23449,8 @@
"type": "apiKey",
"in": "header",
"name": "x-api-key",
"description": "API key authentication. Use YOUR-GENERATED-API-KEY"
"description": "API key authentication. Use YOUR-GENERATED-API-KEY",
"x-default": "your-key"
}
},
"responses": {

View File

@@ -26,15 +26,14 @@ try {
}
// Add x-api-key scheme
if (!openapi.components.securitySchemes['x-api-key']) {
openapi.components.securitySchemes['x-api-key'] = {
type: 'apiKey',
in: 'header',
name: 'x-api-key',
description: 'API key authentication. Use YOUR-GENERATED-API-KEY'
};
securityFixed = true;
}
openapi.components.securitySchemes['x-api-key'] = {
type: 'apiKey',
in: 'header',
name: 'x-api-key',
description: 'API key authentication. Use YOUR-GENERATED-API-KEY',
'x-default': 'your-key'
};
securityFixed = true;
// Replace global security from Authorization to x-api-key
if (openapi.security) {

4
pnpm-lock.yaml generated
View File

@@ -125,8 +125,8 @@ importers:
specifier: ^19.2.0
version: 19.2.1(react@19.2.1)
shiki:
specifier: 1.22.2
version: 1.22.2
specifier: 3.19.0
version: 3.19.0
tailwind-merge:
specifier: ^2.5.4
version: 2.5.4