mirror of
https://github.com/zoriya/elysia-swagger.git
synced 2025-12-06 00:36:10 +00:00
move to pathe to support working in environments without "path"
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"openapi-types": "^12.1.3"
|
||||
"openapi-types": "^12.1.3",
|
||||
"pathe": "^1.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import path from 'path'
|
||||
import { normalize } from 'pathe'
|
||||
import type { HTTPMethod, LocalHook } from 'elysia'
|
||||
|
||||
import { Kind, type TSchema } from '@sinclair/typebox'
|
||||
@@ -310,7 +310,7 @@ export const filterPaths = (
|
||||
|
||||
// exclude docs path and OpenAPI json path
|
||||
const excludePaths = [`/${docsPath}`, `/${docsPath}/json`].map((p) =>
|
||||
path.normalize(p)
|
||||
normalize(p)
|
||||
)
|
||||
|
||||
for (const [key, value] of Object.entries(paths))
|
||||
|
||||
Reference in New Issue
Block a user