mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 20:52:42 +01:00
Merge branch 'fosscord:master' into master
This commit is contained in:
commit
7768d09984
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,15 @@ const Excluded = [
|
|||||||
"supertest.Response"
|
"supertest.Response"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
function modify(obj) {
|
||||||
|
delete obj.additionalProperties;
|
||||||
|
for (var k in obj) {
|
||||||
|
if (typeof obj[k] === "object" && obj[k] !== null) {
|
||||||
|
modify(obj[k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
const program = TJS.getProgramFromFiles(walk(path.join(__dirname, "..", "src", "routes")), compilerOptions);
|
const program = TJS.getProgramFromFiles(walk(path.join(__dirname, "..", "src", "routes")), compilerOptions);
|
||||||
const generator = TJS.buildGenerator(program, settings);
|
const generator = TJS.buildGenerator(program, settings);
|
||||||
@ -47,7 +56,9 @@ function main() {
|
|||||||
definitions = { ...definitions, [name]: { ...part } };
|
definitions = { ...definitions, [name]: { ...part } };
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4));
|
modify(definitions);
|
||||||
|
|
||||||
|
fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4).replace(/ "additionalProperties": ?false,?/g, ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
Loading…
Reference in New Issue
Block a user