ID-219: Update validator documentation with expansion parameters - #118
Conversation
ljtucker
left a comment
There was a problem hiding this comment.
The deployment page still documents the two services this PR deletes
docs deployment/index.md:30–33, index.md:86 ↔ core docker-compose*.yml(.tt), nginx*.conf(.tt)
The core PR removes validator_service and fhir_validator_app from every compose file and deletes the /validator and /validatorapi/ nginx locations. The docs PR cleaned up fhir-validation.md for exactly this, but the deployment page still lists both under “By default, a deployment of Inferno includes the following services” and tells operators fhir_validator_app “can be safely removed from docker-compose.yml” — a file it is no longer in.
Fix
Remove both bullets from
deployment/index.md
in this same docs PR; the
docs/index.md
link to the Validator App is a separate judgment call, since that project still exists standalone.
| of particular versions of the RxNorm and SNOMED code systems: | ||
|
|
||
| ```ruby | ||
| fhir_resource_validator :fixed_code_system_versions do |
There was a problem hiding this comment.
The expansion_parameters example is a Ruby syntax error, in the wrong block
docs writing-tests/fhir-validation.md:102–118 ↔ core fhir_resource_validation.rb:182, 826
Two independent problems in one snippet. First, it does not parse:
$ ruby -c doc_example.rb
syntax error, unexpected ':', expecting '}'
"resourceType":"Parameters",
expansion_parameters { … } binds the braces as a block, not a hash. The method signature is expansion_parameters(value = nil) and takes a positional Hash, so it needs parentheses: expansion_parameters({ … }).
Second, the example nests the call inside validation_context do … end. expansion_parameters is a Validator method — a sibling of validation_context, exactly as the class-level example at fhir_resource_validation.rb:29 shows. And this one fails silently rather than loudly: ValidationContext#method_missing accepts any name and writes it straight into the definition, so a syntax-corrected but still-nested version would ship expansionParameters as a bogus validationContext field and never raise.
Fix
Unnest and parenthesize:
fhir_resource_validator :fixed_code_system_versions do
expansion_parameters({
resourceType: 'Parameters',
parameter: [
{ name: 'force-system-version',
valueCanonical: 'http://www.nlm.nih.gov/research/umls/rxnorm|03022026' }
]
})
end
There was a problem hiding this comment.
removed references to the old validator and updated the non-parsing example.
ljtucker
left a comment
There was a problem hiding this comment.
Two more pages still document the validator services this PR pair deletes
deployment/index.md is fixed, but the same issue survives in:
getting-started/index.md:98–100— saysbundle exec inferno services startbrings up "the FHIR validator service, and the FHIR validator UI";:108and:133–134tell readers to openhttp://localhost/validatorfor a standalone validator. The core PR removesfhir_validator_appfromdocker-compose.background.yml.ttand thelocation /validatorblock from both nginx templates, so that URL now falls through tolocation /→inferno:4567. This is the first page a new test kit author follows.deployment/database.md:40— thedepends_on:snippet still lists- validator_service; the generateddocker-compose.ymlnow useshl7_validator_service.
Removed |
Summary
This PR updates the Inferno documentation with additional validator details, including
expansion_parametersoption from ID-219Testing Guidance
Run jekyll and review the updated validation page.