Skip to content

Commit 90816d9

Browse files
authored
Merge pull request #153 from inyourtime/fix-scalar-reference-configuration-type
feat: update scalar configuration to use `@scalar/types`
2 parents d5f8713 + bc6cfaf commit 90816d9

File tree

9 files changed

+37
-1029
lines changed

9 files changed

+37
-1029
lines changed

bun.lockb

-114 KB
Binary file not shown.

example/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { Elysia, InternalRoute } from 'elysia'
1+
import { Elysia } from 'elysia'
22
import { swagger } from '../src/index'
3-
import { plugin } from './plugin'
4-
import { registerSchemaPath } from '../src/utils'
53

64
const app = new Elysia()
75
.use(
@@ -39,6 +37,5 @@ const app = new Elysia()
3937
}
4038
})
4139
)
42-
// .use(plugin)
4340
.get('/id/:id?', 'a')
4441
.listen(3000)

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
"types": "./dist/scalar/theme.d.ts",
3737
"import": "./dist/scalar/theme.mjs",
3838
"require": "./dist/cjs/scalar/theme.js"
39-
},
40-
"./scalar/types": {
41-
"types": "./dist/scalar/types/index.d.ts",
42-
"import": "./dist/scalar/types/index.mjs",
43-
"require": "./dist/cjs/scalar/types/index.js"
4439
}
4540
},
4641
"keywords": [
@@ -66,14 +61,14 @@
6661
},
6762
"devDependencies": {
6863
"@apidevtools/swagger-parser": "^10.1.0",
69-
"@scalar/api-reference": "^1.25.21",
7064
"@types/bun": "1.1.6",
7165
"elysia": ">= 1.1.0-rc.2",
7266
"eslint": "9.6.0",
7367
"tsup": "^8.1.0",
7468
"typescript": "^5.5.3"
7569
},
7670
"dependencies": {
71+
"@scalar/types": "^0.0.12",
7772
"openapi-types": "^12.1.3",
7873
"pathe": "^1.1.2"
7974
}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ScalarRender } from './scalar'
77
import { filterPaths, registerSchemaPath } from './utils'
88

99
import type { OpenAPIV3 } from 'openapi-types'
10-
import type { ReferenceConfiguration } from '@scalar/api-reference'
10+
import type { ReferenceConfiguration } from '@scalar/types'
1111
import type { ElysiaSwaggerConfig } from './types'
1212

1313
/**

src/scalar/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import scalarElysiaTheme from './theme'
22
import type { OpenAPIV3 } from 'openapi-types'
3-
import type { ReferenceConfiguration } from '@scalar/api-reference'
3+
import type { ReferenceConfiguration } from '@scalar/types'
44

55
export const ScalarRender = (
66
info: OpenAPIV3.InfoObject,

src/scalar/types/index.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)