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
@TestvoidwalkWith__unevaluatedProperties() throwsJsonProcessingException {
JsonSchematest = getJsonSchemaFromClasspath("schemas/unevaluated.json");
JsonNodeprobe = mapper.readTree("{}");
// THIS WORKStest.walk(probe, false);
test.validate(probe);
// THIS FAILStest.walk(probe, true);
}
However, this fails with an NPE:
java.lang.NullPointerException: Cannot invoke "com.networknt.schema.CollectorContext$Scope.getContainingSchema()" because "parent" is null
at com.networknt.schema.CollectorContext.enterDynamicScope(CollectorContext.java:85)
at com.networknt.schema.CollectorContext.enterDynamicScope(CollectorContext.java:74)
at com.networknt.schema.UnevaluatedPropertiesValidator.validate(UnevaluatedPropertiesValidator.java:83)
at com.networknt.schema.BaseJsonValidator.walk(BaseJsonValidator.java:200)
at com.networknt.schema.JsonSchema.lambda$walk$1(JsonSchema.java:544)
at java.base/java.util.TreeMap.forEach(TreeMap.java:1002)
at java.base/java.util.Collections$UnmodifiableMap.forEach(Collections.java:1505)
at com.networknt.schema.JsonSchema.walk(JsonSchema.java:531)
at com.networknt.schema.JsonSchema.walkAtNodeInternal(JsonSchema.java:511)
at com.networknt.schema.JsonSchema.walk(JsonSchema.java:495)
at schemas.JSONSchemaTest.walkWith__unevaluatedProperties(JSONSchemaTest.java:144)
The text was updated successfully, but these errors were encountered:
holgpar
changed the title
walk failes with validation and unevaluatedProperties
walk fails with validation and unevaluatedProperties
Oct 16, 2023
Hi,
I wanted to walk and validate the following schema:
like so:
However, this fails with an NPE:
The text was updated successfully, but these errors were encountered: