Skip to content

ID-219: Update validator documentation with expansion parameters - #118

Merged
karlnaden merged 9 commits into
mainfrom
ID-219-expansion-parameters
Sep 4, 2026
Merged

ID-219: Update validator documentation with expansion parameters#118
karlnaden merged 9 commits into
mainfrom
ID-219-expansion-parameters

Conversation

@karlnaden

@karlnaden karlnaden commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the Inferno documentation with additional validator details, including

  • the new expansion_parameters option from ID-219
  • minor must support evaluation updates from ID-184
  • a new section on controlling validator behavior that was previously uncovered.
  • validator logging options and execution scripts updates from ID-227

Testing Guidance

Run jekyll and review the updated validation page.

@ljtucker ljtucker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed references to the old validator and updated the non-parsing example.

@karlnaden
karlnaden requested a review from ljtucker September 3, 2026 13:56

@ljtucker ljtucker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 — says bundle exec inferno services start brings up "the FHIR validator service, and the FHIR validator UI"; :108 and :133–134 tell readers to open http://localhost/validator for a standalone validator. The core PR removes fhir_validator_app from docker-compose.background.yml.tt and the location /validator block from both nginx templates, so that URL now falls through to location /inferno:4567. This is the first page a new test kit author follows.
  • deployment/database.md:40 — the depends_on: snippet still lists - validator_service; the generated docker-compose.yml now uses hl7_validator_service.

@karlnaden
karlnaden requested a review from ljtucker September 3, 2026 20:20
@karlnaden

Copy link
Copy Markdown
Contributor Author

Two more pages still document the validator services this PR pair deletes

Removed

@karlnaden
karlnaden merged commit 468f603 into main Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants