FHIR Validation Markdown Renderer
ActionsParses the JSON OperationOutcome bundle produced by the Java FHIR Validator, emits GitHub check annotations (❌,
steps:
- uses: actions/checkout@v3
- uses: patrick-werner/validation-outcome-markdown-renderer@v1
with:
bundle-file: validation.json # Path to your OperationOutcome JSON file
include: errors # errors, warnings, or all
filters: | # optional: line-separated filters to skip known issues
# full-line comments beginning with "#" are ignored
Observation-Linksatrialer-Druck.json|VALIDATION_VAL_PROFILE_MINIMUM|*magic LOINC code*|Observation.code
# you can also omit fields by leaving them empty between pipes
|UNKNOWN_CODESYSTEM||Observation.component # messageId + location only| Input | Type | Required | Default | Description |
|---|---|---|---|---|
bundle-file |
string | No | validation.json |
Path to the JSON file containing the OperationOutcome bundle. |
include |
string | No | errors |
Which severities to report: - errors: only error- warnings: error + warning- all: error + warning + information |
filters |
string | No | (empty) | Line-separated list of skip-filters. See "Filter format" below. |
pr-summary-path |
string | No | pr-summary.md |
Path to write the validation summary as a markdown file for PR comments. |
Each non-empty line represents one skip-rule in the form:
filename | messageId | detailsWildcard | location
Rules
- Fields are separated by
|and trimmed. - Leave a field empty to ignore it (i.e., match anything for that position).
detailsWildcardandlocationsupport*as a wildcard (case-insensitive).filenameandmessageIdare matched exactly (case-insensitive formessageId).- Lines and inline fragments starting with
#are treated as comments and ignored.
Examples
# Skip a specific messageId with a details pattern in a single file and location
Observation-Linksatrialer-Druck.json | VALIDATION_VAL_PROFILE_MINIMUM | *magic LOINC code* | Observation.code
# Skip any UNKNOWN_CODESYSTEM at a given location regardless of file/details
| UNKNOWN_CODESYSTEM | | Observation.component
Skip all "magic LOINC code" errors in a specific file:
- uses: patrick-werner/validation-outcome-markdown-renderer@v1
with:
bundle-file: validation.json
include: errors
filters: |
Observation-Linksatrialer-Druck.json|VALIDATION_VAL_PROFILE_MINIMUM|*magic LOINC code*|Observation.code- uses: patrick-werner/validation-outcome-markdown-renderer@v1
with:
bundle-file: validation.json
include: warnings
filters: |
# skip known Java‐validator bugs:
Observation-Linksatrialer-Druck.json|VALIDATION_VAL_PROFILE_MINIMUM|*magic LOINC code*|Observation.code
Observation-Rechtsatrialer-Druck.json|VALIDATION_VAL_PROFILE_MINIMUM_MAGIC|*magic LOINC code*|Observation.code
# skip any UNKNOWN_CODESYSTEM warnings in any file/location:
|UNKNOWN_CODESYSTEM||Observation.component-
Annotations in the console via
core.error(),core.warning(),core.info(). -
Filter diagnostics: any defined filters that never matched are listed in the logs and in the summary (under “Unused filters”) to highlight stale rules.
-
Summary in the Checks tab:
FHIR Validation Results (filter: errors): ❌ 3 errors (–5 filtered), ⚠️ 0 warnings filtered, ℹ️ 2 hints filtered — 2025-05-08T12:34:56Z | File | Severity | Details | Location | Code | MessageId | |--------------------------------------|----------------|----------------------------------------|------------------|------------|------------------------------------| | Observation-Linksatrialer-Druck.json | ❌ ERROR | … | Observation.code | structure | VALIDATION_VAL_PROFILE_MINIMUM | | … | … | … | … | … | … | -
Exit code
- Fails if any
ERRORremains after filtering. - Otherwise succeeds.
- Fails if any
FHIR Validation Markdown Renderer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.