Skip to content

Commit a8f7923

Browse files
replace separators in folders
1 parent 1b4b76e commit a8f7923

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

generate_schemas.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,14 @@ function return_json_schema(directoryPath, folder_path, projectName) {
7373
var values = [projectName, folder_path, route];
7474
console.log("values", values);
7575
values = values.map(function (x) {
76-
return x.replace("/", "");
77-
});
76+
console.log("x", x);
77+
return x.replace("/", "").replace(".", "");
78+
}); // first replace first . / by empty string
7879
values = values.map(function (x) {
79-
return x.replace(".", "");
80-
});
80+
console.log("x", x);
81+
return x.replaceAll("/", separator).replaceAll(".", separator);
82+
}); // then replace all . / by separator
83+
console.log("values", values);
8184
jsonData["$id"] = values
8285
.filter(function (val) {
8386
return val;

0 commit comments

Comments
 (0)