Skip to content

Commit

Permalink
FI-3023: Bump validator to 1.0.58
Browse files Browse the repository at this point in the history
  • Loading branch information
dehall committed Nov 21, 2024
1 parent f90d6e9 commit c1277d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.background.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
- ./data/redis:/data
command: redis-server --appendonly yes
hl7_validator_service:
image: infernocommunity/inferno-resource-validator:1.0.52
image: infernocommunity/inferno-resource-validator:1.0.58
environment:
# Defines how long validator sessions last if unused, in minutes:
# Negative values mean sessions never expire, 0 means sessions immediately expire
Expand Down
8 changes: 6 additions & 2 deletions lib/onc_certification_g10_test_kit/configuration_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
module ONCCertificationG10TestKit
class ConfigurationChecker
EXPECTED_VALIDATOR_VERSION = '2.3.2'.freeze
EXPECTED_HL7_VALIDATOR_VERSION = '"6.3.3"'.freeze
INFERNO_VALIDATOR_VERSION_KEY = 'inferno-framework/fhir-validator-wrapper'.freeze
EXPECTED_HL7_VALIDATOR_VERSION = '1.0.58'.freeze
HL7_VALIDATOR_VERSION_KEY = 'validatorWrapperVersion'.freeze

def configuration_messages
validator_version_message + terminology_messages + version_message
Expand All @@ -24,16 +26,18 @@ def validator_url
def validator_version_message
if Feature.use_hl7_resource_validator?
expected_validator_version = EXPECTED_HL7_VALIDATOR_VERSION
validator_version_key = HL7_VALIDATOR_VERSION_KEY
validator_version_url = "#{validator_url}/validator/version"
else
expected_validator_version = EXPECTED_VALIDATOR_VERSION
validator_version_key = INFERNO_VALIDATOR_VERSION_KEY
validator_version_url = "#{validator_url}/version"
end

response = Faraday.get validator_version_url
if response.body.starts_with? '{'
version_json = JSON.parse(response.body)
version = version_json['inferno-framework/fhir-validator-wrapper']
version = version_json[validator_version_key]
else
version = response.body
end
Expand Down

0 comments on commit c1277d9

Please sign in to comment.