Skip to content

Commit

Permalink
Merge pull request #153 from inyourtime/fix-scalar-reference-configur…
Browse files Browse the repository at this point in the history
…ation-type

feat: update scalar configuration to use `@scalar/types`
  • Loading branch information
marclave authored Oct 4, 2024
2 parents d5f8713 + bc6cfaf commit 90816d9
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 1,029 deletions.
Binary file modified bun.lockb
Binary file not shown.
5 changes: 1 addition & 4 deletions example/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Elysia, InternalRoute } from 'elysia'
import { Elysia } from 'elysia'
import { swagger } from '../src/index'
import { plugin } from './plugin'
import { registerSchemaPath } from '../src/utils'

const app = new Elysia()
.use(
Expand Down Expand Up @@ -39,6 +37,5 @@ const app = new Elysia()
}
})
)
// .use(plugin)
.get('/id/:id?', 'a')
.listen(3000)
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
"types": "./dist/scalar/theme.d.ts",
"import": "./dist/scalar/theme.mjs",
"require": "./dist/cjs/scalar/theme.js"
},
"./scalar/types": {
"types": "./dist/scalar/types/index.d.ts",
"import": "./dist/scalar/types/index.mjs",
"require": "./dist/cjs/scalar/types/index.js"
}
},
"keywords": [
Expand All @@ -66,14 +61,14 @@
},
"devDependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
"@scalar/api-reference": "^1.25.21",
"@types/bun": "1.1.6",
"elysia": ">= 1.1.0-rc.2",
"eslint": "9.6.0",
"tsup": "^8.1.0",
"typescript": "^5.5.3"
},
"dependencies": {
"@scalar/types": "^0.0.12",
"openapi-types": "^12.1.3",
"pathe": "^1.1.2"
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ScalarRender } from './scalar'
import { filterPaths, registerSchemaPath } from './utils'

import type { OpenAPIV3 } from 'openapi-types'
import type { ReferenceConfiguration } from '@scalar/api-reference'
import type { ReferenceConfiguration } from '@scalar/types'
import type { ElysiaSwaggerConfig } from './types'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/scalar/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import scalarElysiaTheme from './theme'
import type { OpenAPIV3 } from 'openapi-types'
import type { ReferenceConfiguration } from '@scalar/api-reference'
import type { ReferenceConfiguration } from '@scalar/types'

export const ScalarRender = (
info: OpenAPIV3.InfoObject,
Expand Down
12 changes: 0 additions & 12 deletions src/scalar/types/index.ts

This file was deleted.

Loading

0 comments on commit 90816d9

Please sign in to comment.