doc-detective-common 1.2.3 → 1.2.4
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/package.json +1 -1
- package/src/schema.js +2 -2
package/package.json
CHANGED
package/src/schema.js
CHANGED
|
@@ -24,7 +24,7 @@ function loadSchemas() {
|
|
|
24
24
|
// Load schema from file
|
|
25
25
|
let schema = require(`./schemas/${file}`);
|
|
26
26
|
// Add dynamic ID based on file path
|
|
27
|
-
schema.$id =
|
|
27
|
+
schema.$id = `${__dirname}/schemas/${file}`;
|
|
28
28
|
// Recursively update relative references with app root path
|
|
29
29
|
schema = updateRefPaths(schema);
|
|
30
30
|
// Load into `schema` object
|
|
@@ -39,7 +39,7 @@ function updateRefPaths(schema) {
|
|
|
39
39
|
updateRefPaths(value);
|
|
40
40
|
}
|
|
41
41
|
if (key === "$ref") {
|
|
42
|
-
schema[key] =
|
|
42
|
+
schema[key] = `${__dirname}/schemas/${value}`;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
return schema;
|