Skip to content

Commit 82ec350

Browse files
committed
✨ refactor(openapi): rename variable for clarity in spec URL handling
1 parent ab4d5bc commit 82ec350

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const openapi = <
5656
return specPath
5757
}
5858

59-
const relativePath = getSpecUrl()
59+
const specUrl = getSpecUrl()
6060

6161
let totalRoutes = 0
6262
let cachedSchema: OpenAPIV3.Document | undefined
@@ -70,14 +70,14 @@ export const openapi = <
7070
new Response(
7171
provider === 'swagger-ui'
7272
? SwaggerUIRender(info, {
73-
url: relativePath,
73+
url: specUrl,
7474
dom_id: '#swagger-ui',
7575
version: 'latest',
7676
autoDarkMode: true,
7777
...swagger
7878
})
7979
: ScalarRender(info, {
80-
url: relativePath,
80+
url: specUrl,
8181
version: 'latest',
8282
cdn: `https://cdn.jsdelivr.net/npm/@scalar/api-reference@${scalar?.version ?? 'latest'}/dist/browser/standalone.min.js`,
8383
...(scalar as ApiReferenceConfiguration),

0 commit comments

Comments
 (0)