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
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -366,8 +366,8 @@ Assertions contains the following additional information
366
366
| Message Key | The message key used for generating the message for localization. |
367
367
| Arguments | The arguments used for generating the message. |
368
368
| Keyword | The keyword that generated the message. |
369
-
| Schema Node | The `JsonNode` pointed to by the Schema Location. This is the schema data that caused the input data to fail. It is possible to get the location information by configuring the `JsonSchemaFactory` with a `JsonNodeReader` that uses the `LocationJsonNodeFactoryFactory` and using `JsonNodes.tokenLocationOf(schemaNode)`. |
370
-
| Instance Node | The `JsonNode` pointed to by the Instance Location. This is the input data that failed validation. It is possible to get the location information by configuring the `JsonSchemaFactory` with a `JsonNodeReader` that uses the `LocationJsonNodeFactoryFactory` and using `JsonNodes.tokenLocationOf(instanceNode)`. |
369
+
| Schema Node | The `JsonNode` pointed to by the Schema Location. This is the schema data that caused the input data to fail. It is possible to get the location information by configuring the `SchemaRegistry` with a `NodeReader` that uses the `LocationJsonNodeFactoryFactory` and using `JsonNodes.tokenStreamLocationOf(schemaNode)`. |
370
+
| Instance Node | The `JsonNode` pointed to by the Instance Location. This is the input data that failed validation. It is possible to get the location information by configuring the `SchemaRegistry` with a `NodeReader` that uses the `LocationJsonNodeFactoryFactory` and using `JsonNodes.tokenStreamLocationOf(instanceNode)`. |
371
371
| Error | The error. |
372
372
| Details | Additional details that can be set by custom keyword validator implementations. The library will set the `property` and `index` details for certain errors. For instane the `required` keyword will set the `property`. Note that this is not part of the instance location as that points to the instance node. |
373
373
@@ -381,7 +381,7 @@ Annotations contains the following additional information
381
381
382
382
The library can be configured to store line and column information in the `JsonNode` instances for the instance and schema nodes. This will adversely affect performance and is not configured by default.
383
383
384
-
This is done by configuring a `NodeReader` that uses the `LocationJsonNodeFactoryFactory`on the `SchemaRegistry`. The `JsonLocation` information can then be retrieved using `JsonNodes.tokenStreamLocationOf(jsonNode)`.
384
+
This is done by configuring a `NodeReader` that uses the `LocationJsonNodeFactoryFactory`on the `SchemaRegistry`. The `JsonLocation` information can then be retrieved using `JsonNodes.tokenStreamLocationOf(jsonNode)`.
385
385
386
386
```java
387
387
String schemaData ="{\r\n"
@@ -554,23 +554,23 @@ The following is sample output from the Hierarchical format.
554
554
|`failFast`| Whether to return failure immediately when an assertion is generated. |`false`|
555
555
|`formatAssertionsEnabled`| The default is to generate format assertions from Draft 4 to Draft 7 and to only generate annotations from Draft 2019-09. Setting to `true` or `false` will override the default behavior. |`null`|
556
556
|`locale`| The locale to use for generating messages in `Error`. |`Locale.getDefault()`|
557
-
|`losslessNarrowing`| Whether lossless narrowing is used for the `type` keyword. |`false`|
557
+
|`losslessNarrowing`| Whether lossless narrowing is used for the `type` keyword. Since Draft 6 a value of `1.0` is interpreted as an integer whether or not this is enabled.|`false`|
558
558
|`messageSource`| This is used to retrieve the locale specific messages. |`DefaultMessageSource.getInstance()`|
559
559
|`pathType`| The path type to use for reporting the instance location and evaluation path. Set to `PathType.JSON_PATH` to use JSON Path. |`PathType.JSON_POINTER`|
560
-
|`preloadJsonSchema`| Whether the schema will be preloaded before processing any input. This will use memory but the execution of the validation will be faster. |`true`|
560
+
|`preloadSchema`| Whether the schema will be preloaded before processing any input. This will use memory but the execution of the validation will be faster. |`true`|
561
561
|`regularExpressionFactory`| The factory to use to create regular expressions for instance `JoniRegularExpressionFactory` or `GraalJSRegularExpressionFactory`. This requires the dependency to be manually added to the project or a `ClassNotFoundException` will be thrown. |`JDKRegularExpressionFactory.getInstance()`|
562
562
|`schemaIdValidator`| This is used to customize how the `$id` values are validated. Note that the default implementation allows non-empty fragments where no base IRI is specified and also allows non-absolute IRI `$id` values in the root schema. |`JsonSchemaIdValidator.DEFAULT`|
563
-
|`strict`| This is set whether keywords are strict in their validation. What this does depends on the individual validators. |
563
+
|`strict`| This is set whether keywords are strict in their validation. What this does depends on the individual validators. ||
564
564
|`typeLoose`| Whether types are interpreted in a loose manner. If set to true, a single value can be interpreted as a size 1 array. Strings may also be interpreted as number, integer or boolean. |`false`|
|`applyDefaultsStrategy`| The strategy for applying defaults when walking when missing or null nodes are encountered. |`ApplyDefaultsStrategy.EMPTY_APPLY_DEFAULTS_STRATEGY`|
571
-
|`keywordWalkListenerRunner`| The `WalkListenerRunner` triggered for keywords. |`NoOpWalkListenerRunner.getInstance()`|
572
-
|`propertyWalkListenerRunner`| The `WalkListenerRunner` triggered for properties. |`NoOpWalkListenerRunner.getInstance()`|
573
-
|`itemWalkListenerRunner`| The `WalkListenerRunner` triggered for items. |`NoOpWalkListenerRunner.getInstance()`|
571
+
|`keywordWalkHandler`| The `WalkHandler` triggered for keywords. |`NoOpWalkHandler.getInstance()`|
572
+
|`propertyWalkHandler`| The `WalkHandler` triggered for properties. |`NoOpWalkHandler.getInstance()`|
573
+
|`itemWalkHandler`| The `WalkHandler` triggered for items. |`NoOpWalkHandler.getInstance()`|
574
574
575
575
## Performance Considerations
576
576
@@ -603,7 +603,7 @@ The library assumes that the schemas being loaded are trusted. This security mod
603
603
604
604
## [OpenAPI Specification](doc/openapi.md)
605
605
606
-
## [JSON Schema Walkers and WalkListeners](doc/walkers.md)
0 commit comments