diff --git a/scripts/schema.js b/scripts/schema.js
index b4393558..ff3280ac 100644
--- a/scripts/schema.js
+++ b/scripts/schema.js
@@ -34,9 +34,7 @@ const settings = {
noExtraProps: true,
defaultProps: false,
};
-const compilerOptions = {
- strictNullChecks: true,
-};
+
const Excluded = [
"DefaultSchema",
"Schema",
@@ -61,14 +59,6 @@ const Excluded = [
"TransportMakeRequestResponse",
];
-function modify(obj) {
- for (var k in obj) {
- if (typeof obj[k] === "object" && obj[k] !== null) {
- modify(obj[k]);
- }
- }
-}
-
function main() {
const program = TJS.programFromConfig(
path.join(__dirname, "..", "tsconfig.json"),
@@ -111,32 +101,12 @@ function main() {
delete part.properties[key];
continue;
}
-
- // if (part.properties[key].anyOf) {
- // const nullIndex = part.properties[key].anyOf.findIndex(
- // (x) => x.type == "null",
- // );
- // if (nullIndex != -1) {
- // part.properties[key].nullable = true;
- // part.properties[key].anyOf.splice(nullIndex, 1);
-
- // if (part.properties[key].anyOf.length == 1) {
- // Object.assign(
- // part.properties[key],
- // part.properties[key].anyOf[0],
- // );
- // delete part.properties[key].anyOf;
- // }
- // }
- // }
}
}
definitions = { ...definitions, [name]: { ...part } };
}
- //modify(definitions);
-
fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4));
}
|