Skip to content

Commit 898c2c7

Browse files
author
Sascha Goldhofer
committed
docs: mention newly exposed helper functions
1 parent bb2a654 commit 898c2c7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,13 +921,22 @@ const error: JsonError = createError("EnumError", { data: { pointer: "#/location
921921

922922
### v8.0.0
923923

924-
With version `v8.0.0`, _getTemplate_ was improved to better support optional properties and utilize existing core logic, making it more reliable.
924+
With version `v8.0.0`, _getTemplate_ was improved to better support optional properties and utilize existing core logic, making it more reliable. Breaking changes:
925925

926926
- Renamed `JSONError` to `JsonError` and `JSONSchema` to `JsonSchema`
927927
- `getTemplate` only adds required properties. Behaviour can be changed by [getTemplate default options](#gettemplate-default-options)
928928
- internal schema property `oneOfSchema` has been replaced by `schema.getOneOfOrigin()`
929929
- Changed `unique-items-error` to point to error for duplicated item and changed data-properties
930930

931+
<details><summary>Exposed new helper functions</summary>
932+
933+
- `mergeSchema` - Merges to two json schema
934+
- `reduceSchema` - Reduce schema by merging dynamic constructs into a static json schema omitting those properties
935+
- `isDynamicSchema` - Returns true if the passed schema contains dynamic properties (_if_, _dependencies_, _allOf_, etc)
936+
- `resolveDynamicSchema` - Resolves all dynamic schema definitions for the given input data and returns the resulting json-schema without any dynamic schema definitions.
937+
938+
</details>
939+
931940
### v7.0.0
932941

933942
With version `v7.0.0`, library export and Draft API has changed heavily. The API is now more consistent across draft-versions and offers a simple and consistent configuration interface for existing and custom drafts. In addition, most standalone functions are no longer exposed separately, but under its current _draftConfigs_ and mainly on each draft-instance. This will help to reduce confusion when consuming this API.

0 commit comments

Comments
 (0)