Skip to content

Commit 862a1dd

Browse files
author
Siddharth Yadav
committed
use default draft-07 schema
1 parent b232fbf commit 862a1dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dereference.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ function detectSchemaVersion(schema) {
8686
const schemaUrl = schema.$schema;
8787

8888
if (!schemaUrl) {
89-
throw new Error('Missing $schema property in the JSON Schema.');
89+
console.warn('No $schema property found. Defaulting to draft-07 schema.');
90+
return 'draft-07';
9091
}
9192

9293
if (schemaUrl.includes('draft/2020-12')) {

0 commit comments

Comments
 (0)