File tree 3 files changed +312
-270
lines changed
3 files changed +312
-270
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" : " ^1.1.0" ,
39
- "openapi-types" : " ^12.0.0 " ,
40
- "yargs" : " ^17.5.1 "
39
+ "openapi-types" : " ^12.0.2 " ,
40
+ "yargs" : " ^17.6.2 "
41
41
},
42
42
"devDependencies" : {
43
43
"@types/json-schema" : " ^7.0.11" ,
44
- "@typescript-eslint/eslint-plugin" : " ^5.33.1 " ,
45
- "@typescript-eslint/parser" : " ^5.33.1 " ,
44
+ "@typescript-eslint/eslint-plugin" : " ^5.42.0 " ,
45
+ "@typescript-eslint/parser" : " ^5.42.0 " ,
46
46
"c8" : " ^7.12.0" ,
47
- "eslint" : " ^8.22 .0" ,
47
+ "eslint" : " ^8.27 .0" ,
48
48
"eslint-config-prettier" : " ^8.5.0" ,
49
49
"eslint-plugin-prettier" : " ^4.2.1" ,
50
50
"eslint-plugin-unused-imports" : " ^2.0.0" ,
51
51
"nock" : " ^13.2.9" ,
52
52
"prettier" : " ^2.7.1" ,
53
- "typescript" : " ^4.7 .4" ,
54
- "vitest" : " ^0.22.1 "
53
+ "typescript" : " ^4.8 .4" ,
54
+ "vitest" : " ^0.24.5 "
55
55
},
56
56
"prettier" : {
57
57
"singleQuote" : true ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type {
4
4
JSONSchema6Definition ,
5
5
JSONSchema7Definition ,
6
6
} from 'json-schema' ;
7
- import type { Options , SchemaType , SchemaTypeKeys } from './types' ;
7
+ import type { Options , SchemaType , SchemaTypeKeys } from './types.js ' ;
8
8
import { Walker } from 'json-schema-walker' ;
9
9
import { allowedKeywords } from './const.js' ;
10
10
import type { OpenAPIV3 } from 'openapi-types' ;
@@ -19,7 +19,7 @@ class InvalidTypeError extends Error {
19
19
20
20
const oasExtensionPrefix = 'x-' ;
21
21
22
- const handleDefinition = async < T > (
22
+ const handleDefinition = async < T extends JSONSchema = JSONSchema > (
23
23
def : JSONSchema7Definition | JSONSchema6Definition | JSONSchema4 ,
24
24
schema : T
25
25
) => {
@@ -69,7 +69,7 @@ const handleDefinition = async <T>(
69
69
return def ;
70
70
} ;
71
71
72
- const convert = async < T = JSONSchema > (
72
+ const convert = async < T extends JSONSchema = JSONSchema > (
73
73
schema : T ,
74
74
options ?: Options
75
75
) : Promise < OpenAPIV3 . Document > => {
You can’t perform that action at this time.
0 commit comments