File tree Expand file tree Collapse file tree 3 files changed +312
-270
lines changed Expand file tree Collapse file tree 3 files changed +312
-270
lines changed Original file line number Diff line number Diff line change 3636 "dependencies" : {
3737 "@apidevtools/json-schema-ref-parser" : " ^9.0.9" ,
3838 "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 "
4141 },
4242 "devDependencies" : {
4343 "@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 " ,
4646 "c8" : " ^7.12.0" ,
47- "eslint" : " ^8.22 .0" ,
47+ "eslint" : " ^8.27 .0" ,
4848 "eslint-config-prettier" : " ^8.5.0" ,
4949 "eslint-plugin-prettier" : " ^4.2.1" ,
5050 "eslint-plugin-unused-imports" : " ^2.0.0" ,
5151 "nock" : " ^13.2.9" ,
5252 "prettier" : " ^2.7.1" ,
53- "typescript" : " ^4.7 .4" ,
54- "vitest" : " ^0.22.1 "
53+ "typescript" : " ^4.8 .4" ,
54+ "vitest" : " ^0.24.5 "
5555 },
5656 "prettier" : {
5757 "singleQuote" : true ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type {
44 JSONSchema6Definition ,
55 JSONSchema7Definition ,
66} from 'json-schema' ;
7- import type { Options , SchemaType , SchemaTypeKeys } from './types' ;
7+ import type { Options , SchemaType , SchemaTypeKeys } from './types.js ' ;
88import { Walker } from 'json-schema-walker' ;
99import { allowedKeywords } from './const.js' ;
1010import type { OpenAPIV3 } from 'openapi-types' ;
@@ -19,7 +19,7 @@ class InvalidTypeError extends Error {
1919
2020const oasExtensionPrefix = 'x-' ;
2121
22- const handleDefinition = async < T > (
22+ const handleDefinition = async < T extends JSONSchema = JSONSchema > (
2323 def : JSONSchema7Definition | JSONSchema6Definition | JSONSchema4 ,
2424 schema : T
2525) => {
@@ -69,7 +69,7 @@ const handleDefinition = async <T>(
6969 return def ;
7070} ;
7171
72- const convert = async < T = JSONSchema > (
72+ const convert = async < T extends JSONSchema = JSONSchema > (
7373 schema : T ,
7474 options ?: Options
7575) : Promise < OpenAPIV3 . Document > => {
You can’t perform that action at this time.
0 commit comments