Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Template Overlays

Template overlays allow you to customize how InkGen generates code for specific FHIR resources or profiles.

Overview

Overlays provide a way to:

  • Customize generated code structure
  • Add custom annotations
  • Control naming conventions
  • Extend generated types with additional properties

Creating an Overlay

Create a overlays.yaml file in your project:

overlays:
  Patient:
    custom_class_name: "PatientProfile"
    generate_interfaces: true
    add_validation: true

  Observation:
    custom_class_name: "ObservationResult"
    generate_builder_pattern: true

Using Overlays

Reference the overlay file in your configuration:

{
  "overlaysFile": "./overlays.yaml"
}

Common Overlay Options

OptionTypeDescription
custom_class_namestringOverride the generated class name
generate_interfacesbooleanGenerate interface definitions
add_validationbooleanAdd validation methods
generate_builder_patternbooleanGenerate builder pattern

Examples

See Profile Customization for more advanced customization examples.