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.
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.