File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
- import type { ReferenceConfiguration } from "@scalar/api-reference" ;
1
+ import type { ApiReferenceConfiguration } from "@scalar/api-reference" ;
2
2
import { eventHandler } from "h3" ;
3
3
import { useRuntimeConfig } from "../config" ;
4
4
@@ -12,9 +12,11 @@ export default eventHandler((event) => {
12
12
13
13
// https://github.com/scalar/scalar
14
14
const _config = runtimeConfig . nitro . openAPI ?. ui
15
- ?. scalar as ReferenceConfiguration ;
16
- const scalarConfig : ReferenceConfiguration = {
15
+ ?. scalar as ApiReferenceConfiguration ;
16
+ const scalarConfig : ApiReferenceConfiguration = {
17
17
..._config ,
18
+ url : openAPIEndpoint ,
19
+ // @ts -expect-error (missing types?)
18
20
spec : { url : openAPIEndpoint , ..._config ?. spec } ,
19
21
} ;
20
22
Original file line number Diff line number Diff line change 1
- import type { ReferenceConfiguration as ScalarConfig } from "@scalar/api-reference" ;
1
+ import type { ApiReferenceConfiguration as ScalarConfig } from "@scalar/api-reference" ;
2
2
3
3
/**
4
4
* Nitro OpenAPI configuration
@@ -34,7 +34,7 @@ export interface NitroOpenAPIConfig {
34
34
*/
35
35
scalar ?:
36
36
| false
37
- | ( ScalarConfig & {
37
+ | ( Partial < ScalarConfig > & {
38
38
/**
39
39
* Scalar UI route
40
40
*
You can’t perform that action at this time.
0 commit comments