openmhealth / schemas

A repository of Open mHealth schemas.
Apache License 2.0
71 stars 45 forks source link

Replace Java validator with Python validator #16

Closed emersonf closed 1 year ago

emersonf commented 1 year ago

Problem

The validator, which hasn't been modified in many years, is written in Java and uses a deprecated Java library to validate test data against schemas. There are currently no replacement Java libraries that support modern JSON Schema versions, have wide adoption, and are actively maintained.

We've also received feedback over the years that the Java tooling can be cumbersome, due to people not having JDKs installed.

Solution

The Java validator has been replaced by a Python validator that uses the popular and maintained jsonschema package. It has the same features as the Java validator, but is easier to set up and runs faster with less startup time. It also has out of the box support for remote schemas, which are critical as some Open mHealth schemas move under the IEEE umbrella. The validator is documented in the README under the test-data-validator directory.

Miscellaneous