File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 36
36
"dependencies" : {
37
37
"@apidevtools/json-schema-ref-parser" : " ^9.0.9" ,
38
38
"json-schema-walker" : " ^0.0.4" ,
39
+ "openapi-types" : " ^12.0.0" ,
39
40
"yargs" : " ^17.5.1"
40
41
},
41
42
"devDependencies" : {
48
49
"eslint-plugin-prettier" : " ^4.2.1" ,
49
50
"eslint-plugin-unused-imports" : " ^2.0.0" ,
50
51
"nock" : " ^13.2.9" ,
51
- "openapi-typescript" : " ^5.4.1" ,
52
52
"prettier" : " ^2.7.1" ,
53
53
"typescript" : " ^4.7.4" ,
54
54
"vitest" : " ^0.21.0"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import type {
7
7
import type { Options , SchemaType , SchemaTypeKeys } from './types' ;
8
8
import { Walker } from 'json-schema-walker' ;
9
9
import { allowedKeywords } from './const.js' ;
10
- import type { OpenAPI3 } from 'openapi-typescript ' ;
10
+ import type { OpenAPIV3 } from 'openapi-types ' ;
11
11
12
12
class InvalidTypeError extends Error {
13
13
constructor ( message : string ) {
@@ -62,7 +62,7 @@ const handleDefinition = async <T>(
62
62
const convert = async < T = JSONSchema > (
63
63
schema : T ,
64
64
options ?: Options
65
- ) : Promise < OpenAPI3 > => {
65
+ ) : Promise < OpenAPIV3 . Document > => {
66
66
const walker = new Walker < T > ( ) ;
67
67
const convertDefs = options ?. convertUnreferencedDefinitions ?? true ;
68
68
await walker . loadSchema ( schema , options ) ;
@@ -75,7 +75,7 @@ const convert = async <T = JSONSchema>(
75
75
rootSchema . definitions [ defName ] = await handleDefinition ( def , schema ) ;
76
76
}
77
77
}
78
- return rootSchema as OpenAPI3 ;
78
+ return rootSchema as OpenAPIV3 . Document ;
79
79
} ;
80
80
81
81
function stripIllegalKeywords ( schema : SchemaType ) {
Original file line number Diff line number Diff line change 12
12
"lib" : [" esnext" ],
13
13
"listEmittedFiles" : false ,
14
14
"listFiles" : false ,
15
- "moduleResolution" : " node " ,
15
+ "moduleResolution" : " node16 " ,
16
16
"noFallthroughCasesInSwitch" : true ,
17
17
"pretty" : true ,
18
18
"resolveJsonModule" : true ,
You can’t perform that action at this time.
0 commit comments