@@ -57,7 +57,7 @@ type CompileOptions = {
5757 // if format-validations should create errors. Defaults to true
5858 formatAssertion: boolean | " meta-schema" ;
5959 // default options for all calls to node.getData()
60- templateDefaultOptions ? : TemplateOptions ;
60+ getDataDefaultOptions ? : TemplateOptions ;
6161};
6262```
6363
@@ -77,11 +77,11 @@ compileSchema(mySchema, { remote: anotherSchemaNode });
7777compileSchema (mySchema , { formatAssertion: false });
7878
7979// for all calls to getData, `addOptionalProps` is `true` per default
80- compileSchema (mySchema , { templateDefaultOptions : { addOptionalProps: true } });
80+ compileSchema (mySchema , { getDataDefaultOptions : { addOptionalProps: true } });
8181```
8282
8383Details on _ drafts_ are documented in [ draft customization] ( #draft-customization ) .
84- Details on ` templateDefaultOptions ` are documented in [ getData] ( #getData ) .
84+ Details on ` getDataDefaultOptions ` are documented in [ getData] ( #getData ) .
8585
8686### SchemaNode
8787
@@ -1157,17 +1157,21 @@ The new implementation revolves around compiling schemas into a **SchemaNode** t
11571157 - ` draft.addRemoteSchema(schema) ` → ` node.addRemote(schema) `
11581158 - ` draft.createSchemaOf(schema) ` → ` node.createSchema(schema) `
11591159
1160+ - ** Renamed Properties ** :
1161+
1162+ - ` templateDefaultOptions ` → ` getDataDefaultOptions `
1163+
11601164- ** Draft Customization ** : Customizing drafts has changed completely . The previous methods of extending drafts are no longer valid , and draft handling is now centered around ` SchemaNode ` .
11611165
1162- - ** Remove Property ** :
1166+ - ** Removed Error Property ` name ` ** :
11631167 Error property ` name ` has been removed from ` JsonError ` in favor of ` code ` .
11641168
11651169- ** Removed Configuration Option ** :
11661170 The ` templateDefaultOptions ` property has been removed from the global settings object . You should now configure it using the ` compileSchema ` options :
11671171
11681172 ` ` ` ts
11691173 compileSchema(schema, {
1170- templateDefaultOptions : {
1174+ getDataDefaultOptions : {
11711175 addOptionalProps: false,
11721176 removeInvalidData: false,
11731177 extendDefaults: true
0 commit comments