onc-healthit / onc-certification-g10-test-kit

ONC Certification (g)(10) Standardized API Tests
Apache License 2.0
32 stars 10 forks source link

FI-1223: Support the validator /version returning a JSON #448

Closed dehall closed 11 months ago

dehall commented 11 months ago

In anticipation of the validator /version endpoint returning a JSON (see https://github.com/inferno-framework/fhir-validator-wrapper/pull/62 ), this PR updates the logic for checking the validator version.

Because previously the version check was just a basic string comparison, using JSON introduces some new ways it could fail: the JSON might not parse, or it might not contain the right key, etc. This set of changes is intended to be simple and minimal but not break if anything goes wrong.

Testing Guidance: Make sure an "old" instance of the validator that returns a string version doesn't crash. Make sure when using a validator returning JSON that this compares the version number against the value of the inferno-framework/fhir-validator-wrapper key as expected.