|
| 1 | +# Samples |
| 2 | + |
| 3 | +Based on JSON Schema Test Suite for `draft2020-12`. |
| 4 | + |
| 5 | + |
| 6 | +### Disambiguation |
| 7 | + |
| 8 | + * **Failed to compile** — schemas that did not compile in any mode. |
| 9 | + |
| 10 | + * **Warnings** — schemas that did not compile in the `default` mode, but compiled in `lax` |
| 11 | + mode. |
| 12 | + |
| 13 | + JSON Schema spec allows usage of ineffective or unknown keywords, which is considered a mistake |
| 14 | + by `@exodus/schemasafe` by default. `lax` mode lifts that coherence check. |
| 15 | + |
| 16 | + * **Misclassified** — schemas that classified at least one test value incorrectly, i.e. gave |
| 17 | + `true` where testsuite expected `false` or vice versa. |
| 18 | + |
| 19 | +## Results |
| 20 | + |
| 21 | +| Name | Total | Failed to compile | Warnings | Misclassified | |
| 22 | +|---------------------------------------------------------------------------------|-------|-------------------|----------|---------------| |
| 23 | +| [additionalProperties](./additionalProperties.md) | 7 | - | - | - | |
| 24 | +| [allOf](./allOf.md) | 12 | - | - | - | |
| 25 | +| [anchor](./anchor.md) | 7 | - | - | - | |
| 26 | +| [anyOf](./anyOf.md) | 8 | - | 3 | - | |
| 27 | +| [boolean_schema](./boolean_schema.md) | 2 | - | - | - | |
| 28 | +| [const](./const.md) | 15 | - | - | - | |
| 29 | +| [contains](./contains.md) | 7 | - | - | - | |
| 30 | +| [content](./content.md) | 4 | - | 4 | - | |
| 31 | +| [default](./default.md) | 3 | - | - | - | |
| 32 | +| [defs](./defs.md) | 1 | - | - | - | |
| 33 | +| [dependentRequired](./dependentRequired.md) | 4 | - | - | - | |
| 34 | +| [dependentSchemas](./dependentSchemas.md) | 3 | - | - | - | |
| 35 | +| [dynamicRef](./dynamicRef.md) | 16 | - | 4 | - | |
| 36 | +| [enum](./enum.md) | 10 | - | - | - | |
| 37 | +| [exclusiveMaximum](./exclusiveMaximum.md) | 1 | - | - | - | |
| 38 | +| [exclusiveMinimum](./exclusiveMinimum.md) | 1 | - | - | - | |
| 39 | +| [format](./format.md) | 19 | 4 | - | - | |
| 40 | +| [id](./id.md) | 5 | - | - | - | |
| 41 | +| [if-then-else](./if-then-else.md) | 10 | - | 6 | - | |
| 42 | +| [infinite-loop-detection](./infinite-loop-detection.md) | 1 | - | - | - | |
| 43 | +| [items](./items.md) | 9 | - | - | - | |
| 44 | +| [maxContains](./maxContains.md) | 4 | - | 1 | - | |
| 45 | +| [maxItems](./maxItems.md) | 2 | - | - | - | |
| 46 | +| [maxLength](./maxLength.md) | 2 | - | - | - | |
| 47 | +| [maxProperties](./maxProperties.md) | 3 | - | - | - | |
| 48 | +| [maximum](./maximum.md) | 2 | - | - | - | |
| 49 | +| [minContains](./minContains.md) | 8 | - | 2 | - | |
| 50 | +| [minItems](./minItems.md) | 2 | - | - | - | |
| 51 | +| [minLength](./minLength.md) | 2 | - | - | - | |
| 52 | +| [minProperties](./minProperties.md) | 2 | - | - | - | |
| 53 | +| [minimum](./minimum.md) | 2 | - | - | - | |
| 54 | +| [multipleOf](./multipleOf.md) | 4 | - | - | - | |
| 55 | +| [not](./not.md) | 6 | - | 1 | - | |
| 56 | +| [oneOf](./oneOf.md) | 11 | - | 3 | - | |
| 57 | +| [pattern](./pattern.md) | 2 | - | - | - | |
| 58 | +| [patternProperties](./patternProperties.md) | 5 | - | - | - | |
| 59 | +| [prefixItems](./prefixItems.md) | 4 | - | - | - | |
| 60 | +| [properties](./properties.md) | 6 | - | - | - | |
| 61 | +| [propertyNames](./propertyNames.md) | 3 | - | - | - | |
| 62 | +| [ref](./ref.md) | 29 | - | - | - | |
| 63 | +| [refRemote](./refRemote.md) | 13 | - | - | - | |
| 64 | +| [required](./required.md) | 5 | - | - | - | |
| 65 | +| [type](./type.md) | 11 | - | - | - | |
| 66 | +| [unevaluatedItems](./unevaluatedItems.md) | 23 | - | 2 | - | |
| 67 | +| [unevaluatedProperties](./unevaluatedProperties.md) | 34 | - | 3 | - | |
| 68 | +| [uniqueItems](./uniqueItems.md) | 6 | - | - | - | |
| 69 | +| [unknownKeyword](./unknownKeyword.md) | 1 | - | 1 | - | |
| 70 | +| [vocabulary](./vocabulary.md) | 1 | 1 | - | - | |
| 71 | +| [optional/bignum](./optional-bignum.md) | 7 | - | - | - | |
| 72 | +| [optional/cross-draft](./optional-cross-draft.md) | 1 | - | 1 | - | |
| 73 | +| [optional/dependencies-compatibility](./optional-dependencies-compatibility.md) | 7 | - | - | - | |
| 74 | +| [optional/ecmascript-regex](./optional-ecmascript-regex.md) | 21 | - | - | - | |
| 75 | +| [optional/float-overflow](./optional-float-overflow.md) | 1 | - | - | - | |
| 76 | +| [optional/format-assertion](./optional-format-assertion.md) | 2 | 2 | - | - | |
| 77 | +| [optional/no-schema](./optional-no-schema.md) | 1 | - | - | - | |
| 78 | +| [optional/non-bmp-regex](./optional-non-bmp-regex.md) | 2 | - | - | - | |
| 79 | +| [optional/refOfUnknownKeyword](./optional-refOfUnknownKeyword.md) | 2 | - | 2 | - | |
| 80 | + |
| 81 | +### Notes |
| 82 | + |
| 83 | +`{ isJSON: true }` option is used for better clarity, and that also corresponds to the main |
| 84 | +expected usage pattern of this module. Without it, there would be additional checks for |
| 85 | +`!== undefined`, which can be fast-tracked if we know that the input came from `JSON.parse()`. |
0 commit comments