diff --git a/.changeset/renovate-27b61a5.md b/.changeset/renovate-27b61a5.md new file mode 100644 index 000000000..c6e914e14 --- /dev/null +++ b/.changeset/renovate-27b61a5.md @@ -0,0 +1,5 @@ +--- +'counterfact': patch +--- + +Updated dependency `@apidevtools/json-schema-ref-parser` to `15.3.1`. diff --git a/package.json b/package.json index edc5ca2b0..724fd9788 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "using-temporary-files": "2.2.1" }, "dependencies": { - "@apidevtools/json-schema-ref-parser": "13.0.5", + "@apidevtools/json-schema-ref-parser": "15.1.3", "@hapi/accept": "6.0.3", "@types/json-schema": "7.0.15", "ajv": "8.18.0", diff --git a/patches/@apidevtools+json-schema-ref-parser+15.1.3.patch b/patches/@apidevtools+json-schema-ref-parser+15.1.3.patch new file mode 100644 index 000000000..947b79e28 --- /dev/null +++ b/patches/@apidevtools+json-schema-ref-parser+15.1.3.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js b/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +index 1234567..abcdefg 100644 +--- a/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js ++++ b/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +@@ -4,7 +4,7 @@ + const jsonPointerSlash = /~1/g; + const jsonPointerTilde = /~0/g; + import { isWindows } from "./is-windows.js"; +-const isAbsoluteWin32Path = /^[a-zA-Z]:\\/; ++const isAbsoluteWin32Path = /^[a-zA-Z]:[/\\]/; + // RegExp patterns to URL-encode special characters in local filesystem paths + const urlEncodePatterns = [ + [/\?/g, "%3F"], diff --git a/src/typescript-generator/specification.ts b/src/typescript-generator/specification.ts index 0b96e7ca1..955966397 100644 --- a/src/typescript-generator/specification.ts +++ b/src/typescript-generator/specification.ts @@ -31,7 +31,9 @@ export class Specification { public async load(urlOrPath: string): Promise { try { this.rootRequirement = new Requirement( - (await bundle(urlOrPath)) as RequirementData, + (await bundle(urlOrPath, { + resolve: { http: { safeUrlResolver: false } }, + })) as RequirementData, urlOrPath, this, ); diff --git a/yarn.lock b/yarn.lock index f55bca24f..37d95a30b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,13 +10,12 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@apidevtools/json-schema-ref-parser@13.0.5": - version "13.0.5" - resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-13.0.5.tgz#e7a5cfc7df315ebcbafeb98199b72ebed9743b68" - integrity sha512-xfh4xVJD62gG6spIc7lwxoWT+l16nZu1ELyU8FkjaP/oD2yP09EvLAU6KhtudN9aML2Khhs9pY6Slr7KGTES3w== +"@apidevtools/json-schema-ref-parser@15.1.3": + version "15.1.3" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-15.1.3.tgz#4dc45f3807cea9be807cfca0daf582d8c935f0f0" + integrity sha512-XvEitlOaU8S+hOrMPuGyCjp6vC51K+syUN4HHrSUdSDLLWRWQJYjInU6xlSoRGCVBCfcoHxbRm+yiaYq2yFR5w== dependencies: - "@types/json-schema" "^7.0.15" - js-yaml "^4.1.0" + js-yaml "^4.1.1" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.24.7": version "7.24.7" @@ -5576,7 +5575,7 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.1, js-yaml@^3.13.1, js-yaml@^3.6.1, js-yaml@^4.1.0, js-yaml@^4.1.1: +js-yaml@4.1.1, js-yaml@^3.13.1, js-yaml@^3.6.1, js-yaml@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==