json-schema-validator icon indicating copy to clipboard operation
json-schema-validator copied to clipboard

Support for IRI and IRI Reference

Open stevespringett opened this issue 3 years ago • 3 comments

I need to be able to validate iri and iri-reference. It doesn't look like the library supports it currently.

This ticket is to request support for iri and iri-reference.

In the meantime, is there a workaround to add support for it myself?

stevespringett avatar May 02 '21 05:05 stevespringett

@stevespringett As I understand, there are two steps to support the iri and iri-reference. The first step is two support the format and the second is to support the reference and loading etc.

The second part is not finalized yet per this opened issue

To support the format, it is much easier and the only class that you might need to update is the format template.

https://github.com/networknt/json-schema-validator/tree/master/src/main/java/com/networknt/schema/format

stevehu avatar May 02 '21 17:05 stevehu

Hi @stevehu. Yes, I'm primarily interested in supporting format in order to properly validate. I didn't see an easy way to provide my own format (or add to existing formats) without forking the project and making the changes locally. I need to avoid modified forks. Any guidance on how this can be achieved without modifying the library?

stevespringett avatar May 02 '21 22:05 stevespringett

To support the format, we can just add the template for the iri and iri-reference to the library with a PR. This validation should be standard for all users and there is no need to fork and customize.

stevehu avatar Jul 06 '21 23:07 stevehu

Resolved in #766 and #768

fdutton avatar May 22 '23 12:05 fdutton