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
Using the validator Set<ValidationMessage> validationMessages = jsonSchema.validate(jsonNode);, we get the following error in our build on GitHub within a unit test, but not locally. No problem with other schema versions (4, 6 or 7).
com.networknt.schema.JsonSchemaException: java.io.IOException: Server returned HTTP response code: 403 for URL: https://json-schema.org/draft/2019-09/meta/core
at com.networknt.schema.JsonSchemaFactory.getSchema(JsonSchemaFactory.java:457)
at com.networknt.schema.RefValidator.getRefSchema(RefValidator.java:84)
at com.networknt.schema.RefValidator.(RefValidator.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.networknt.schema.ValidatorTypeCode.newValidator(ValidatorTypeCode.java:162)
at com.networknt.schema.JsonMetaSchema.newValidator(JsonMetaSchema.java:278)
at com.networknt.schema.ValidationContext.newValidator(ValidationContext.java:63)
at com.networknt.schema.JsonSchema.read(JsonSchema.java:295)
at com.networknt.schema.JsonSchema.getValidators(JsonSchema.java:615)
at com.networknt.schema.JsonSchema.validate(JsonSchema.java:388)
at com.networknt.schema.AllOfValidator.validate(AllOfValidator.java:58)
at com.networknt.schema.JsonSchema.validate(JsonSchema.java:393)
at com.networknt.schema.BaseJsonValidator.validate(BaseJsonValidator.java:115)
at software.amazon.lambda.powertools.validation.ValidationUtils.validate(ValidationUtils.java:209)
The text was updated successfully, but these errors were encountered:
Using config.addUriTranslator(URITranslator.prefix("https://json-schema.org", "resource:")); fixes the problem but would be great to understand why there is a 403 if using the remote version...
Response code 403 is forbidden error. I tried to access it from the browser and curl from my desktop and it cannot be reproduced. It is a perminent issue or temporary issue? If we always got 403, we might need to debug into it to figure out what is going on. Thanks for reporting it.
Using the validator
Set<ValidationMessage> validationMessages = jsonSchema.validate(jsonNode);
, we get the following error in our build on GitHub within a unit test, but not locally. No problem with other schema versions (4, 6 or 7).The text was updated successfully, but these errors were encountered: