@@ -57,7 +57,7 @@ type CompileOptions = {
57
57
// if format-validations should create errors. Defaults to true
58
58
formatAssertion: boolean | " meta-schema" ;
59
59
// default options for all calls to node.getData()
60
- templateDefaultOptions ? : TemplateOptions ;
60
+ getDataDefaultOptions ? : TemplateOptions ;
61
61
};
62
62
```
63
63
@@ -77,11 +77,11 @@ compileSchema(mySchema, { remote: anotherSchemaNode });
77
77
compileSchema (mySchema , { formatAssertion: false });
78
78
79
79
// for all calls to getData, `addOptionalProps` is `true` per default
80
- compileSchema (mySchema , { templateDefaultOptions : { addOptionalProps: true } });
80
+ compileSchema (mySchema , { getDataDefaultOptions : { addOptionalProps: true } });
81
81
```
82
82
83
83
Details 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 ) .
85
85
86
86
### SchemaNode
87
87
@@ -1157,17 +1157,21 @@ The new implementation revolves around compiling schemas into a **SchemaNode** t
1157
1157
- ` draft.addRemoteSchema(schema) ` → ` node.addRemote(schema) `
1158
1158
- ` draft.createSchemaOf(schema) ` → ` node.createSchema(schema) `
1159
1159
1160
+ - ** Renamed Properties ** :
1161
+
1162
+ - ` templateDefaultOptions ` → ` getDataDefaultOptions `
1163
+
1160
1164
- ** 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 ` .
1161
1165
1162
- - ** Remove Property ** :
1166
+ - ** Removed Error Property ` name ` ** :
1163
1167
Error property ` name ` has been removed from ` JsonError ` in favor of ` code ` .
1164
1168
1165
1169
- ** Removed Configuration Option ** :
1166
1170
The ` templateDefaultOptions ` property has been removed from the global settings object . You should now configure it using the ` compileSchema ` options :
1167
1171
1168
1172
` ` ` ts
1169
1173
compileSchema(schema, {
1170
- templateDefaultOptions : {
1174
+ getDataDefaultOptions : {
1171
1175
addOptionalProps: false,
1172
1176
removeInvalidData: false,
1173
1177
extendDefaults: true
0 commit comments