Skip to content

Commit 524a1cd

Browse files
committed
changed generateRequired to false by default
1 parent ee68841 commit 524a1cd

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

test/schema.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ const base = "test/programs/";
77

88
export function assertSchema(group: string, name: string, type: string) {
99
it(group + " should create correct schema", function() {
10-
const actual = TJS.generateSchema(TJS.getProgramFromFiles([resolve(base + group + "/" + name)]), type);
10+
let settings = TJS.defaultArgs;
11+
settings.generateRequired = true;
12+
const actual = TJS.generateSchema(TJS.getProgramFromFiles([resolve(base + group + "/" + name)]), type, settings);
1113

1214
const file = readFileSync(base + group + "/schema.json", "utf8")
1315
const expected = JSON.parse(file);

typescript-json-schema.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typescript-json-schema.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typescript-json-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export module TJS {
1313
useTitle: false,
1414
useDefaultProperties: false,
1515
usePropertyOrder: false,
16-
generateRequired: true
16+
generateRequired: false
1717
};
1818

1919
class JsonSchemaGenerator {

0 commit comments

Comments
 (0)