Skip to content

feat: accept fhirlint.yml config block as API parameter #5

Description

@predictor2718

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions