You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** If you are using references in your schema, `getTemplate` will only resolve the first _$ref_ in each path, ensuring no inifinte data structures are created. In case the limit of **1**_$ref_ resolution is too low, you can modify the value globally one by adjusting the json-schema-library settings:
190
+
**Note** If you are using references in your schema, `getTemplate` will only resolve the first _$ref_ in each path, ensuring no inifinte data structures are created. In case the limit of **1**_$ref_ resolution is too low, you can modify the value globally one by adjusting the json-schema-library settings:
**Note:** that `draft.compileSchema` compiles a schema under the current rootSchema. That is, definitions from root schema will be copied to the local schema, to enable _$ref_ resolutions.
627
+
**Note** that `draft.compileSchema` compiles a schema under the current rootSchema. That is, definitions from root schema will be copied to the local schema, to enable _$ref_ resolutions.
Each `Draft` in `json-schema-library` is build around a [DraftConfig](./lib/draft/index.ts#19). A `DraftConfig` holds all _functions_ and _configurations_ for each json-schema drafts. The `DraftConfig` is your main way to alter or extend behaviour for `json-schema-library`. You can either create your own _draftConfig_ or adjust any existing _draftConfig_. For the current drafts (4-7), each _draftConfig_ is exposed along with its actual _class_. For example:
With **version 8**_json-schema-library_ has changed `getTemplate` to only add required properties per default. This can be changed on draft initialization, by passing `templateDefaultOptions` in the _draftConfig_:
701
701
702
-
```js
702
+
```ts
703
703
const draft =newDraft(schema, {
704
704
templateDefaultOptions: {
705
705
addOptionalProps: true
706
706
}
707
707
});
708
708
```
709
709
710
-
**Note:** You can still pass options to getTemplate overriding the draft default settings by:
710
+
**Note** You can still pass options to getTemplate overriding the draft default settings by:
0 commit comments