json-schema-library 8.0.0-rc6 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,11 @@
1
1
  ## Changelog
2
2
 
3
- - [Breaking] renamed `JSON` types and variables to `Json`
4
- - [Breaking] remove `oneOfSchema` helper property in favor of `getOneOfOrigin()` non-enumerable function
5
- - [Breaking] `getTemplate` will add only required properties per default. Use `addOptionalProps:true` to change this behaviour
6
- - [add] introduce `mergeSchema`, `reduceSchema` and `resolveDynamicSchema`
7
- - [refactor] move dynamic resolvers `anyOf`, `allOf`, `oneOf`, `dependencies` and `if` to features modules
3
+ - [Breaking] renamed `JSON` types and variables to `Json`
4
+ - [Breaking] remove `oneOfSchema` helper property in favor of `getOneOfOrigin()` non-enumerable function
5
+ - [Breaking] `getTemplate` will add only required properties per default. Use `addOptionalProps:true` to change this behaviour
6
+ - [Breaking] change `unique-items-error` to point to error for duplicated item.
7
+ - [add] introduce `mergeSchema`, `reduceSchema` and `resolveDynamicSchema`
8
+ - [refactor] move dynamic resolvers `anyOf`, `allOf`, `oneOf`, `dependencies` and `if` to features modules
8
9
 
9
10
  ### 7.0.0
10
11
 
@@ -12,22 +13,21 @@
12
13
 
13
14
  **Breaking Changes**
14
15
 
15
- - replaced `Core` interface by new `Draft` interface
16
- - changed export of `Interface` to `Draft`
17
- - changed export of `Interface` to `Draft`
18
- - renamed `addSchema` to `addRemoteSchema`
19
- - changed api of `compileSchema` to have an additional schema-parameter for rootSchema reference
20
- - changed `compileSchema` and `addRemoteSchema` to work on instance state, instead of global state
21
- - `addRemoteSchema`, `compileSchema` now requires draft instance as first parameter
22
- - removed direct export of following functions: `addValidator`, `compileSchema`, `createSchemaOf`, `each`, `eachSchema`, `getChildSchemaSelection`, `getSchema`, `getTemplate`, `isValid`, `step`, `validate`. They are still accessible under the draftConfigs of each draft-version
23
- - changed draft version of `JsonEditor` to draft07
16
+ - replaced `Core` interface by new `Draft` interface
17
+ - changed export of `Interface` to `Draft`
18
+ - changed export of `Interface` to `Draft`
19
+ - renamed `addSchema` to `addRemoteSchema`
20
+ - changed api of `compileSchema` to have an additional schema-parameter for rootSchema reference
21
+ - changed `compileSchema` and `addRemoteSchema` to work on instance state, instead of global state
22
+ - `addRemoteSchema`, `compileSchema` now requires draft instance as first parameter
23
+ - removed direct export of following functions: `addValidator`, `compileSchema`, `createSchemaOf`, `each`, `eachSchema`, `getChildSchemaSelection`, `getSchema`, `getTemplate`, `isValid`, `step`, `validate`. They are still accessible under the draftConfigs of each draft-version
24
+ - changed draft version of `JsonEditor` to draft07
24
25
 
25
26
  **Milestone**
26
27
 
27
- - [✓] configurable and consistent draft api
28
- - [✓] expose all function under their draft-version
29
- - [✓] remove global states in remotes
30
-
28
+ - [✓] configurable and consistent draft api
29
+ - [✓] expose all function under their draft-version
30
+ - [✓] remove global states in remotes
31
31
 
32
32
  ### 6.1.0
33
33
 
@@ -37,76 +37,77 @@
37
37
 
38
38
  ### version 4.0
39
39
 
40
- - [✓] Fix -- latest benchmark tests
41
- - [✓] Fix -- iterate schema (using typeDefs)
42
- - [✓] Fix -- scopes per schema-instance
43
- - [✓] Fix -- insane $ref resolution 'node' can be in 'root/node' or 'root/folder/node'
44
- - [✓] Refactor -- remove duplication from resolveRef.strict and resolveRef.withOverwrite
45
- - [✓] Change -- improve function apis (param order, rootSchema per default)
46
- - [✓] Fix -- `getTemplate` to resolve $ref to infinity
40
+ - [✓] Fix -- latest benchmark tests
41
+ - [✓] Fix -- iterate schema (using typeDefs)
42
+ - [✓] Fix -- scopes per schema-instance
43
+ - [✓] Fix -- insane $ref resolution 'node' can be in 'root/node' or 'root/folder/node'
44
+ - [✓] Refactor -- remove duplication from resolveRef.strict and resolveRef.withOverwrite
45
+ - [✓] Change -- improve function apis (param order, rootSchema per default)
46
+ - [✓] Fix -- `getTemplate` to resolve $ref to infinity
47
47
 
48
48
  **Breaking Changes**
49
49
 
50
- - `iterateSchema` renamed to `eachSchema`
51
- - `validate` and `isValid` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
52
- - `validateAsync` changed signature from (schema, data, [pointer], [onError]) to (data, [{ schema, pointer, onError }])
53
- - `getTemplate` changed signature from (schema, data) to (data, [schema])
54
- - `getSchema` changed signature from (schema, data, [pointer]) to (pointer, [data], [schema])
55
- - `each` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
56
- - `resolveOneOf` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
57
- - `precompileSchema` renamed to `compileSchema`
50
+ - `iterateSchema` renamed to `eachSchema`
51
+ - `validate` and `isValid` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
52
+ - `validateAsync` changed signature from (schema, data, [pointer], [onError]) to (data, [{ schema, pointer, onError }])
53
+ - `getTemplate` changed signature from (schema, data) to (data, [schema])
54
+ - `getSchema` changed signature from (schema, data, [pointer]) to (pointer, [data], [schema])
55
+ - `each` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
56
+ - `resolveOneOf` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
57
+ - `precompileSchema` renamed to `compileSchema`
58
58
 
59
59
  **Milestone** consistent feature support
60
60
 
61
- - [✓] no side-effects on added remote-schemas
62
- - [✓] rootSchema should always be compiled
63
- - [✓] Add missing support for allOf and anyOf type definitions in 'step' and 'getTemplate'
64
- - [✓] Complete schema support in iterateSchema
65
-
61
+ - [✓] no side-effects on added remote-schemas
62
+ - [✓] rootSchema should always be compiled
63
+ - [✓] Add missing support for allOf and anyOf type definitions in 'step' and 'getTemplate'
64
+ - [✓] Complete schema support in iterateSchema
66
65
 
67
66
  ## 2017
68
67
 
69
- - [~] Features -- Improve validation maps to add & hook (!) custom entries (WIP, Add tests)
70
- - [✓] Fix -- Return all errors in oneOf-validation
71
- - [✓] Feature -- Error progress notification for async validation
72
- - [✓] Refactor -- Keyword validators should only be called for defined keyword
73
- - [✓] Feature -- getSchema of patternProperties
68
+ - [~] Features -- Improve validation maps to add & hook (!) custom entries (WIP, Add tests)
69
+ - [✓] Fix -- Return all errors in oneOf-validation
70
+ - [✓] Feature -- Error progress notification for async validation
71
+ - [✓] Refactor -- Keyword validators should only be called for defined keyword
72
+ - [✓] Feature -- getSchema of patternProperties
74
73
 
75
74
  **Milestone** add remaining draft04 features
76
- - [✓] remote references
77
- - [✓] default format validations
78
- - [✓] definitions
79
- - [✓] dependencies
80
- - [✓] Features -- allOf
81
- - [✓] Features -- anyOf
82
- - [✓] Features -- type-array
83
- - [✓] Features -- patternProperties
84
- - [✓] Features -- uniqueItems
85
- - [✓] Features -- oneOf: fail for multiple matching oneof-schemas
86
- - [✓] Features -- oneOf: for non-arrays
87
- - [✓] Features -- required (array of properties). Currently every property is required by default
88
75
 
76
+ - [✓] remote references
77
+ - [✓] default format validations
78
+ - [✓] definitions
79
+ - [✓] dependencies
80
+ - [✓] Features -- allOf
81
+ - [✓] Features -- anyOf
82
+ - [✓] Features -- type-array
83
+ - [✓] Features -- patternProperties
84
+ - [✓] Features -- uniqueItems
85
+ - [✓] Features -- oneOf: fail for multiple matching oneof-schemas
86
+ - [✓] Features -- oneOf: for non-arrays
87
+ - [✓] Features -- required (array of properties). Currently every property is required by default
89
88
 
90
89
  ## 16/12
91
90
 
92
- - [✓] Testing (validate real json files)
93
- - [✓] Test + document core differences
94
- - [✓] Add async validation
91
+ - [✓] Testing (validate real json files)
92
+ - [✓] Test + document core differences
93
+ - [✓] Add async validation
95
94
 
96
95
  **Milestone** customizable default and form (json-editor) validation
97
- - [✓] Sanitize Errors
98
- - [✓] Features -- Add core: Form, fix core: Draft04 - by using separate functions
99
- - [✓] Add getTemplate to core (resolveOneOf)
100
- - [✓] Breaking -- Add sort of 'core' to customize validation, stepper, errors etc and reduce requried arguments
96
+
97
+ - [✓] Sanitize Errors
98
+ - [✓] Features -- Add core: Form, fix core: Draft04 - by using separate functions
99
+ - [✓] Add getTemplate to core (resolveOneOf)
100
+ - [✓] Breaking -- Add sort of 'core' to customize validation, stepper, errors etc and reduce requried arguments
101
101
 
102
102
  **Milestone** custom validator (form-validation, oneOfProperty)
103
- - [✓] Features -- additionalProperties: Boolean | Schema
104
- - [✓] Features -- additionalItems: Boolean | Schema
105
- - [✓] Features -- Add support for type "integer"
106
- - [✓] Features -- oneOf -> oneOfProperty ( + Documentation)
107
- - [✓] Breaking -- change isValid to return boolean
108
- - [✓] Breaking -- use `step` in isValid -- bad: circular dependencies with step -> guessOneOfSchema -> isValid --X-> step
109
- - [✓] Features -- items: [] schema (order/defined indices)
110
- - [✓] Features -- not
111
- - [✓] Features -- return custom errors in data validation
112
- - [✓] Basics
103
+
104
+ - [✓] Features -- additionalProperties: Boolean | Schema
105
+ - [✓] Features -- additionalItems: Boolean | Schema
106
+ - [✓] Features -- Add support for type "integer"
107
+ - [✓] Features -- oneOf -> oneOfProperty ( + Documentation)
108
+ - [✓] Breaking -- change isValid to return boolean
109
+ - [✓] Breaking -- use `step` in isValid -- bad: circular dependencies with step -> guessOneOfSchema -> isValid --X-> step
110
+ - [✓] Features -- items: [] schema (order/defined indices)
111
+ - [✓] Features -- not
112
+ - [✓] Features -- return custom errors in data validation
113
+ - [✓] Basics