@apidevtools/json-schema-ref-parser 15.0.0 → 15.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.js +1 -1
- package/lib/index.ts +1 -1
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -55,7 +55,7 @@ export class $RefParser {
|
|
|
55
55
|
// when schema id has defined an URL should use that hostname to request the references,
|
|
56
56
|
// instead of using the current page URL
|
|
57
57
|
const params = url.parse(args.schema.$id);
|
|
58
|
-
const port = params.protocol === "https:" ? 443 : 80;
|
|
58
|
+
const port = params.port ?? (params.protocol === "https:" ? 443 : 80);
|
|
59
59
|
args.path = `${params.protocol}//${params.hostname}:${port}`;
|
|
60
60
|
}
|
|
61
61
|
// Resolve the absolute path of the schema
|
package/lib/index.ts
CHANGED
|
@@ -99,7 +99,7 @@ export class $RefParser<S extends object = JSONSchema, O extends ParserOptions<S
|
|
|
99
99
|
// when schema id has defined an URL should use that hostname to request the references,
|
|
100
100
|
// instead of using the current page URL
|
|
101
101
|
const params = url.parse(args.schema.$id as string);
|
|
102
|
-
const port = params.protocol === "https:" ? 443 : 80;
|
|
102
|
+
const port = params.port ?? (params.protocol === "https:" ? 443 : 80);
|
|
103
103
|
|
|
104
104
|
args.path = `${params.protocol}//${params.hostname}:${port}`;
|
|
105
105
|
}
|