CI/CD Quality Gate
Validate generated FHIR files in your build. Use concrete findings and the command exit status to stop invalid output before it moves downstream.
Put the FHIR check before the merge
Run the CLI on the generated files. Configure the pipeline to stop on a failing exit status alongside its other checks.
Pull request
CI pipeline
Lint
Test
Records
Type check
Merge
Stop invalid FHIR files in the build.
Validate the file that will ship
The synthetic Patient contains active as a string. Run the local CLI on that exact input and preserve the machine-readable result.
CLI · InputJSON String instead of boolean
records validate-file patient-before.json --format json{ "resourceType": "Patient", "id": "synthetic-cli-patient", "active": "true"}Synthetic R4 · CLI 0.1.3Fail on the concrete finding
The executed local command returns exit 1 and identifies Patient.active as the wrong primitive type. A CI runner can consume that same exit status.
CLI · ResultJSON Patient.activefails validationrecords validate-file patient-before.json --format json{ "errors": 1, "warnings": 0, "exitCode": 1, "findings": [ { "path": "Patient.active", "message": "'active' must be boolean (JS boolean), got string" } ]}Synthetic R4 · CLI 0.1.3 · exit 1 · ExcerptCorrect and check again
Change the string to the boolean true. The second local command returns exit 0. Connected release checks can additionally use workspace baselines and evidence; this example records the local command.
CLI · ResultJSON Correction verified
records validate-file patient-after.json --format json{ "errors": 0, "warnings": 0, "exitCode": 0, "correctedValue": { "active": true }}Synthetic R4 · CLI 0.1.3 · exit 0 · Excerpt
These are local CLI executions. Connected mode is a separate integration for saved runs and comparisons in a Records workspace.
Related workflows and guides
Add the first local gate.
Start with one command, then connect Records when you need baselines, comparisons, and evidence.