Skip to content

Commit c26e6b6

Browse files
committed
change: simplify api for easier consumption and configuration
- docs: update - add: basic support for reference to root definitions in compileSchema - docs: update changelog by previous changes - update: error documentation and helper export - chore: update dist - docs: document custom validators - add: error type exports - test: oneOfProperty for resolve oneof strict - change!: remove draft methods from lib export - docs: draft extension and customization - chore: update dist - add: oneOfProperty support to default oneOf resolver - refactor: rename resolve overwrite to merge and draft to draftConfig - change: allow compile schema with an undefined schema - change: getSchema pointer to be optional - refactor: rename eachSchema callback and export type - refactor: change compile and remotes to work on validator state instead of global state - reafactor: rename addSchema to addRemoteSchema - add: expose addSchema over drafts - docs: update readme - docs: add step example - feat: update drafts by additional methods - chore: cleanup - chore: cleanup - feat: extend draft api by additional helpers - docs: document validate separated schema - docs: add index to draft section - docs: start new documentation - build: reduce markdown indent - feat: expose resolveRef variations for customization - change: core interface to Drafts using config map instead of inheritance
1 parent c0b93e4 commit c26e6b6

File tree

136 files changed

+3916
-2696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+3916
-2696
lines changed

.editorconfig

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ insert_final_newline = true
1414

1515
[*.md]
1616
trim_trailing_whitespace = false
17+
indent_size = 2
1718

1819
[{package.json,bower.json}]
1920
indent_style = space

CHANGELOG.md

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
## Changelog
2+
3+
### 7.0.0
4+
5+
- changed core interface to draft for simpler configuration using a configuration map
6+
7+
**Breaking Changes**
8+
9+
- replaced `Core` interface by new `Draft` interface
10+
- changed export of `Interface` to `Draft`
11+
- changed export of `Interface` to `Draft`
12+
- renamed `addSchema` to `addRemoteSchema`
13+
- changed api of `compileSchema` to have an additional schema-parameter for rootSchema reference
14+
- changed `compileSchema` and `addRemoteSchema` to work on instance state, instead of global state
15+
- `addRemoteSchema`, `compileSchema` now requires draft instance as first parameter
16+
- 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
17+
18+
**Milestone**
19+
20+
- [] configurable and consistent draft api
21+
- [] expose all function under their draft-version
22+
- [] remove global states in remotes
23+
24+
25+
### 6.1.0
26+
27+
- [] Feature -- add support for dependencies in _getSchema_ and _getTemplate_
28+
- [] Feature -- added isJSONError type guard
29+
- fixe and improve types
30+
31+
### version 4.0
32+
33+
- [] Fix -- latest benchmark tests
34+
- [] Fix -- iterate schema (using typeDefs)
35+
- [] Fix -- scopes per schema-instance
36+
- [] Fix -- insane $ref resolution 'node' can be in 'root/node' or 'root/folder/node'
37+
- [] Refactor -- remove duplication from resolveRef.strict and resolveRef.withOverwrite
38+
- [] Change -- improve function apis (param order, rootSchema per default)
39+
- [] Fix -- `getTemplate` to resolve $ref to infinity
40+
41+
**Breaking Changes**
42+
43+
- `iterateSchema` renamed to `eachSchema`
44+
- `validate` and `isValid` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
45+
- `validateAsync` changed signature from (schema, data, [pointer], [onError]) to (data, [{ schema, pointer, onError }])
46+
- `getTemplate` changed signature from (schema, data) to (data, [schema])
47+
- `getSchema` changed signature from (schema, data, [pointer]) to (pointer, [data], [schema])
48+
- `each` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
49+
- `resolveOneOf` changed signature from (schema, data, [pointer]) to (data, [schema], [pointer])
50+
- `precompileSchema` renamed to `compileSchema`
51+
52+
**Milestone** consistent feature support
53+
54+
- [] no side-effects on added remote-schemas
55+
- [] rootSchema should always be compiled
56+
- [] Add missing support for allOf and anyOf type definitions in 'step' and 'getTemplate'
57+
- [] Complete schema support in iterateSchema
58+
59+
60+
## 2017
61+
62+
- [~] Features -- Improve validation maps to add & hook (!) custom entries (WIP, Add tests)
63+
- [] Fix -- Return all errors in oneOf-validation
64+
- [] Feature -- Error progress notification for async validation
65+
- [] Refactor -- Keyword validators should only be called for defined keyword
66+
- [] Feature -- getSchema of patternProperties
67+
68+
**Milestone** add remaining draft04 features
69+
- [] remote references
70+
- [] default format validations
71+
- [] definitions
72+
- [] dependencies
73+
- [] Features -- allOf
74+
- [] Features -- anyOf
75+
- [] Features -- type-array
76+
- [] Features -- patternProperties
77+
- [] Features -- uniqueItems
78+
- [] Features -- oneOf: fail for multiple matching oneof-schemas
79+
- [] Features -- oneOf: for non-arrays
80+
- [] Features -- required (array of properties). Currently every property is required by default
81+
82+
83+
## 16/12
84+
85+
- [] Testing (validate real json files)
86+
- [] Test + document core differences
87+
- [] Add async validation
88+
89+
**Milestone** customizable default and form (json-editor) validation
90+
- [] Sanitize Errors
91+
- [] Features -- Add core: Form, fix core: Draft04 - by using separate functions
92+
- [] Add getTemplate to core (resolveOneOf)
93+
- [] Breaking -- Add sort of 'core' to customize validation, stepper, errors etc and reduce requried arguments
94+
95+
**Milestone** custom validator (form-validation, oneOfProperty)
96+
- [] Features -- additionalProperties: Boolean | Schema
97+
- [] Features -- additionalItems: Boolean | Schema
98+
- [] Features -- Add support for type "integer"
99+
- [] Features -- oneOf -> oneOfProperty ( + Documentation)
100+
- [] Breaking -- change isValid to return boolean
101+
- [] Breaking -- use `step` in isValid -- bad: circular dependencies with step -> guessOneOfSchema -> isValid --X-> step
102+
- [] Features -- items: [] schema (order/defined indices)
103+
- [] Features -- not
104+
- [] Features -- return custom errors in data validation
105+
- [] Basics

0 commit comments

Comments
 (0)