Goal
Allow the /api/validate endpoint to accept a fhirlint.yml config block alongside the FHIR content, instead of (or in addition to) individual fields. This lets users reuse their project config directly and connects the composer to the validator.
Motivation
Currently the API takes individual fields (fhirVersion, profiles, etc.). Teams already have a fhirlint.yml in their repo and would have to re-enter all options manually. With a config parameter they can paste the YAML once and validate.
API
POST /api/validate
{
"content": "{ \"resourceType\": \"Patient\", ... }",
"config": "fhir-version: 4.0.1\nprofile:\n - kbv-basis\nno-terminology-server: true\n"
}
Rules:
config is parsed as fhirlint.yml on the server
- Individual fields (e.g.
fhirVersion) override the config if both are present
- Invalid config returns a 400 with validation errors (same format as
/api/config/check)
Composer integration
The "Open in Validator →" button in the composer (see composer issue) passes the generated YAML as the config parameter — one click from composer to validator with all settings pre-applied.
Notes
Goal
Allow the
/api/validateendpoint to accept afhirlint.ymlconfig block alongside the FHIR content, instead of (or in addition to) individual fields. This lets users reuse their project config directly and connects the composer to the validator.Motivation
Currently the API takes individual fields (
fhirVersion,profiles, etc.). Teams already have afhirlint.ymlin their repo and would have to re-enter all options manually. With aconfigparameter they can paste the YAML once and validate.API
Rules:
configis parsed asfhirlint.ymlon the serverfhirVersion) override the config if both are present/api/config/check)Composer integration
The "Open in Validator →" button in the composer (see composer issue) passes the generated YAML as the
configparameter — one click from composer to validator with all settings pre-applied.Notes
fhirlint config check(feat: addfhirlint config checkcommand to validate fhirlint.yml fhirlint#94)