FI-1223: Support the validator /version returning a JSON #448
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In anticipation of the validator
/version
endpoint returning a JSON (see inferno-framework/fhir-validator-wrapper#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.