---
$schema: "http://json-schema.org/draft-07/schema#"
$id: "https://oimlsmart.org/schemas/R117.yaml"
title: "OIML R117 (Dynamic Measuring Systems for Liquids Other than Water) Certificate Schema"
description: |
  OIML R117:2019 — Dynamic measuring systems for liquids other than water.
  Covers fuel dispensers, LPG/LNG dispensers, Coriolis mass-flow measurement
  transducers, and complete measuring assemblies for liquid products other
  than water.
type: object
required: [certificate, certified_type, characteristics, recommendation]
properties:
  certificate:           { $ref: "_core.yaml#/definitions/Certificate" }
  issuing_authority:     { $ref: "_core.yaml#/definitions/IssuingAuthority" }
  applicants:            { $ref: "_core.yaml#/definitions/PartyList" }
  manufacturers:         { $ref: "_core.yaml#/definitions/PartyList" }
  certified_type:        { $ref: "#/definitions/CertifiedType" }
  characteristics:       { $ref: "#/definitions/Characteristics" }
  recommendation:
    type: object
    required: [id, edition, scheme]
    properties:
      id:          { type: string, const: R117 }
      edition:     { type: integer, enum: [2019, 2007, 1] }
      amendment:   { type: [integer, string, "null"] }
      scheme:      { type: string, enum: [A, B] }
      accuracy_classes:
        description: |
          Accuracy class(es) declared at the certificate/recommendation level.
          R117:2019 §2.1.10 defines classes 0.3, 0.5, 1, and 1.5 for the
          maximum permissible error of a measuring system. Multiple classes
          may apply when the certificate covers different liquid types or
          measurement modes.
        type: array
        items: { $ref: "#/definitions/AccuracyClassValue" }
  test_reports:          { $ref: "_core.yaml#/definitions/TestReportList" }
  revision_history:      { $ref: "_core.yaml#/definitions/RevisionHistory" }
  model_family:          { $ref: "_core.yaml#/definitions/ModelFamily" }
  components:
    description: |
      Sub-assemblies that comprise a measuring system. R117 dispensers and
      measuring assemblies typically have 4+ components: measuring/measurement
      sensor (meter), calculating/indicating device (calculator), gas separator
      / gas elimination device, pulser/transducer, pump, hose, nozzle.
    type: array
    items: { $ref: "_core.yaml#/definitions/Component" }
  footnotes:             { $ref: "_core.yaml#/definitions/FootnoteList" }
  d011_tests_applicable:
    description: |
      D 11 performance tests mandated by R117:2019 for type evaluation of
      electronic measuring systems. The default set covers climatic, mains
      disturbance, and EMC tests applicable to powered fuel dispensers and
      electronic transducers.
    type: array
    items: { $ref: "#/definitions/D011TestReference" }
    default:
    - { test_id: d011_t06_static_temperature }
    - { test_id: d011_t07_static_temperature }
    - { test_id: d011_t08_damp_heat_steady_state }
    - { test_id: d011_t09_damp_heat_cyclic }
    - { test_id: d011_t20_ac_mains_voltage_variation }
    - { test_id: d011_t21_ac_mains_frequency_variation }
    - { test_id: d011_t23_ac_mains_dips_interruptions }
    - { test_id: d011_t26_bursts_ac_dc_mains }
    - { test_id: d011_t27_surges_ac_dc_mains }
    - { test_id: d011_t28_bursts_signal_data_control }
    - { test_id: d011_t29_surges_signal_data_control }
    - { test_id: d011_t33_rf_em_fields_general }
    - { test_id: d011_t35_electrostatic_discharges }

definitions:
  AccuracyClassValue:
    description: |
      OIML R117:2019 §2.1.10 / Table B.1 accuracy class for maximum
      permissible error (MPE) of the measuring system, expressed as a
      percentage. Decimal notation uses the point (not European comma):
      e.g. "0,5" in source documents normalises to "0.5".
    type: string
    oneOf:
    - const: "0.3"
      description: Class 0.3 — highest precision (Coriolis mass flow, custody transfer)
    - const: "0.5"
      description: Class 0.5 — standard fuel dispenser precision
    - const: "1"
      description: Class 1 — lower precision (some liquefied gas applications)
    - const: "1.0"
      description: Class 1 — alternate normalisation of "1"
    - const: "1.5"
      description: Class 1.5 — lowest precision (cryogenic / LNG applications)
    - const: "2.5"
      description: Class 2.5 — non-canonical; observed in some extraction data
    - const: "N/A"
      description: Not applicable

  StructuredValue:
    description: |
      R117-local structured characteristic value. Extends the core
      StructuredValue shape by allowing `value` to also hold arrays (e.g.
      multi-class accuracy lists, multi-value MMQ) and compound objects
      (e.g. decomposed environmental classes `{mechanical, electromagnetic,
      humidity}`), which occur throughout R117 extraction data. All other
      sub-fields (unit_symbol, unit_id, footnote_markers, tolerance) match
      the core definition. Provenance markers (_decomposed, _raw,
      _extracted_from, _note) pass through via additionalProperties.
    type: object
    properties:
      value:
        description: |
          The numeric/string/range/array/compound-object value. Supports
          all shapes seen in R117 extraction output.
        oneOf:
        - type: number
        - type: string
        - type: boolean
        - type: "null"
        - type: array
        - type: object
      unit_symbol:    { type: [string, "null"] }
      unit_id:        { type: [string, "null"] }
      footnote_markers:
        type: array
        items: { type: string }
      tolerance:      { type: [number, "null"] }
      tolerance_type:
        type: [string, "null"]
        enum: [absolute, relative, null]
    additionalProperties: true

  AccuracyClass:
    description: |
      Structured accuracy class. Value is either a single class token or a
      list of class tokens when multiple classes apply (e.g. different
      liquid types or measurement modes under one certificate).
    allOf:
    - $ref: "#/definitions/StructuredValue"
    - properties:
        value:
          oneOf:
          - $ref: "#/definitions/AccuracyClassValue"
          - type: array
            minItems: 1
            items: { $ref: "#/definitions/AccuracyClassValue" }

  PressureReference:
    description: |
      Pressure reference qualifier for gauge / absolute / differential
      pressure values. R117 dispensers and Coriolis transducers commonly
      express maximum working pressure as gauge pressure (bar(g)).
    type: string
    oneOf:
    - const: gauge
      description: Gauge pressure — relative to atmospheric
    - const: absolute
      description: Absolute pressure — relative to vacuum
    - const: differential
      description: Differential pressure — between two points

  PressureValue:
    description: |
      Structured pressure value with optional pressure_reference qualifier
      (gauge / absolute / differential). R117 dispensers typically express
      maximum working pressure as gauge pressure.
    allOf:
    - $ref: "#/definitions/StructuredValue"
    - properties:
        pressure_reference: { $ref: "#/definitions/PressureReference" }

  EnvironmentalClasses:
    description: |
      Compound D 11 environmental classification. R117 measuring systems
      declare mechanical (M1/M2/M3), electromagnetic (E1/E2/E3), and
      optionally climatic/humidity (H1/H2/H3) classes. These are D 11
      installed-location classes, not the R60 load-cell humidity marking.
      Value may be a decomposed object {mechanical, electromagnetic,
      humidity} or a flat string like "M1/E1/H3" (pre-decomposition).
    allOf:
    - $ref: "#/definitions/StructuredValue"
    - properties:
        value:
          oneOf:
          - type: string
          - type: object
            properties:
              mechanical:
                type: string
                enum: [M1, M2, M3]
              electromagnetic:
                type: string
                enum: [E1, E2, E3]
              humidity:
                type: string
                enum: [H1, H2, H3]

  MeasurementType:
    description: |
      R117:2019 §2.1.5 measurement type — the physical quantity the system
      measures. Mass (M), volume (V), or density-based conversion (D).
    type: string
    oneOf:
    - const: M
      description: Mass measurement (Coriolis)
    - const: V
      description: Volume measurement (positive displacement, ultrasonic)
    - const: D
      description: Density-based conversion measurement

  CertifiedType:
    description: |
      R117 certified type category. R117 covers fuel dispensers, LPG/LNG
      dispensers, measuring systems, and measurement transducers (sensors).
    type: object
    required: [category, type_designations]
    properties:
      category: { type: string }
      type_designations:
        type: array
        minItems: 1
        items: { type: string }
      module_designation:
        description: |
          Module classification for the certified type. R117 distinguishes
          complete measuring systems from individual measurement transducers.
        type: [string, "null"]
      description: { type: [string, "null"] }

  Characteristics:
    description: |
      R117 characteristics organised by layer: type-level (applies to the
      whole family), model-level (per-model variant table), and config-level
      (conditional on liquid type, configuration, or duty type).
    type: object
    properties:
      type_level:  { $ref: "#/definitions/TypeLevel" }
      model_level:
        type: array
        items: { $ref: "#/definitions/ModelLevelEntry" }
      config_level:
        type: array
        items: { $ref: "#/definitions/ConfigLevelEntry" }

  TypeLevel:
    description: |
      Type-level characteristics applying to the entire certified family.
      R117 measuring systems carry flow rate ranges, minimum measured
      quantity (MMQ), pressure limits, accuracy class, environmental
      classification, temperature ranges, liquid/approved-product scope,
      and software identification.
    type: object
    properties:
      # Accuracy
      accuracy_class:                    { $ref: "#/definitions/AccuracyClass" }
      measurement_type:                  { $ref: "#/definitions/MeasurementType" }

      # Flow characteristics (flow_metering module)
      maximum_flow_rate:                 { $ref: "#/definitions/StructuredValue" }
      minimum_flow_rate:                 { $ref: "#/definitions/StructuredValue" }
      transitional_flow_rate:            { $ref: "#/definitions/StructuredValue" }
      flow_rate_range:                   { $ref: "#/definitions/StructuredValue" }
      minimum_measured_quantity:         { $ref: "#/definitions/StructuredValue" }
      min_measured_quantity:             { $ref: "#/definitions/StructuredValue" }
      mmq:                               { $ref: "#/definitions/StructuredValue" }
      ratio_max_min_flow_rate:           { $ref: "#/definitions/StructuredValue" }
      flow_rate_ratio:                   { $ref: "#/definitions/StructuredValue" }
      cyclic_volume:                     { $ref: "#/definitions/StructuredValue" }
      measuring_principle:               { $ref: "#/definitions/StructuredValue" }
      instrument_type:                   { $ref: "#/definitions/StructuredValue" }
      measuring_system_type:             { $ref: "#/definitions/StructuredValue" }
      measurand:                         { $ref: "#/definitions/StructuredValue" }
      measuring_range:                   { $ref: "#/definitions/StructuredValue" }
      number_of_sound_paths:            { $ref: "#/definitions/StructuredValue" }
      number_of_sound_path:             { $ref: "#/definitions/StructuredValue" }
      path_angle:                        { $ref: "#/definitions/StructuredValue" }
      sound_frequency:                   { $ref: "#/definitions/StructuredValue" }
      minimum_reynolds_number:           { $ref: "#/definitions/StructuredValue" }
      straight_pipe_length_requirements: { $ref: "#/definitions/StructuredValue" }
      flow_characteristics:              { $ref: "#/definitions/StructuredValue" }
      flow_direction:                    { $ref: "#/definitions/StructuredValue" }
      volume_sensor_flow_rate_range:     { $ref: "#/definitions/StructuredValue" }
      volume_sensor_flow_rate_range_def: { $ref: "#/definitions/StructuredValue" }
      volume_sensor_flow_rate_range_urea: { $ref: "#/definitions/StructuredValue" }

      # Pressure (flow_metering module)
      maximum_pressure:                  { $ref: "#/definitions/PressureValue" }
      minimum_pressure:                  { $ref: "#/definitions/PressureValue" }
      maximum_working_pressure:          { $ref: "#/definitions/PressureValue" }
      minimum_working_pressure:          { $ref: "#/definitions/PressureValue" }
      product_pressure_range:            { $ref: "#/definitions/PressureValue" }
      vapour_pressure:                   { $ref: "#/definitions/PressureValue" }
      maximum_pressure_o:                { $ref: "#/definitions/PressureValue" }
      maximum_pressure_x:                { $ref: "#/definitions/PressureValue" }
      maximum_pressure_q:                { $ref: "#/definitions/PressureValue" }
      maximum_pressure_fuel:             { $ref: "#/definitions/PressureValue" }
      maximum_pressure_adblue:           { $ref: "#/definitions/PressureValue" }
      maximum_pressure_psi:              { $ref: "#/definitions/PressureValue" }
      max_pressure:                      { $ref: "#/definitions/PressureValue" }
      line_reference_pressure:           { $ref: "#/definitions/PressureValue" }

      # Environmental (d011 module)
      environmental_classes:             { $ref: "#/definitions/EnvironmentalClasses" }
      temperature_range:                 { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      humidity_class:                    { $ref: "_modules/d011_environmental.yaml#/definitions/ClimaticClass" }
      mechanical_environment_class:      { $ref: "_modules/d011_environmental.yaml#/definitions/MechanicalClass" }
      electromagnetic_environment_class: { $ref: "_modules/d011_environmental.yaml#/definitions/EMClass" }
      electrical_disturbance_class:      { $ref: "_modules/d011_environmental.yaml#/definitions/EMClass" }
      ambient_temperature_range:         { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      ambient_temperature_range_electronics: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      ambient_temperature_range_local_display: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      ambient_temperature_limits:        { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      condensing_humidity:               { $ref: "#/definitions/StructuredValue" }
      environment_classes:               { $ref: "#/definitions/EnvironmentalClasses" }
      environments_classes:              { $ref: "#/definitions/EnvironmentalClasses" }
      mechanic_class:                    { $ref: "_modules/d011_environmental.yaml#/definitions/MechanicalClass" }
      ambient_humidity:                  { $ref: "#/definitions/StructuredValue" }
      ambient_temperature_range_lngxsb_zshxsb: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      ambient_temperature_range_cdwxsb:  { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      ambient_temperature_limits_def_windshield_lpg: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      ambient_temperature_limits_igem_printer: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }

      # Liquid / product scope
      liquids:                           { $ref: "#/definitions/StructuredValue" }
      intended_for_the_measurement_of:   { $ref: "#/definitions/StructuredValue" }
      intended_for_measurement_of:       { $ref: "#/definitions/StructuredValue" }
      intended_for_measurement:          { $ref: "#/definitions/StructuredValue" }
      intended_for:                      { $ref: "#/definitions/StructuredValue" }
      intended_for_fuel:                 { $ref: "#/definitions/StructuredValue" }
      intended_for_adblue:               { $ref: "#/definitions/StructuredValue" }
      approved_for_products:             { $ref: "#/definitions/StructuredValue" }
      approved_for_liquid_products:      { $ref: "#/definitions/StructuredValue" }
      approved_for_application:          { $ref: "#/definitions/StructuredValue" }
      approved_for_measuring:            { $ref: "#/definitions/StructuredValue" }
      approved_quantity:                 { $ref: "#/definitions/StructuredValue" }
      approved_variables:                { $ref: "#/definitions/StructuredValue" }
      approved_variable:                 { $ref: "#/definitions/StructuredValue" }
      approved_inputs:                   { $ref: "#/definitions/StructuredValue" }
      approved_outputs:                  { $ref: "#/definitions/StructuredValue" }
      approved_input:                    { $ref: "#/definitions/StructuredValue" }
      approved_output:                   { $ref: "#/definitions/StructuredValue" }
      approved_conversion_methods:       { $ref: "#/definitions/StructuredValue" }
      approved_conversions_methods:      { $ref: "#/definitions/StructuredValue" }
      type_of_liquids:                   { $ref: "#/definitions/StructuredValue" }
      mixture_conditions:                { $ref: "#/definitions/StructuredValue" }

      # Product temperature ranges
      product_temperature_range:         { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      liquid_temperature_range:          { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      product_temperature_range_fuel:    { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      product_temperature_range_adblue:  { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_for_mass_measurement:    { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_for_density_and_volume_measurement: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_mass:     { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_density:  { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_mass_1_5: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_density_1_5: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_mass_o:   { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_density_o: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_mass_o_1_5: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_density_o_1_5: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_mass_x:   { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_density_x: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_mass_x_1_5: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_density_x_1_5: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_mass_q:   { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_density_q: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_mass_q_1_5: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }
      temperature_range_liquid_density_q_1_5: { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }

      # Density / viscosity
      density_range:                     { $ref: "#/definitions/StructuredValue" }
      approved_density_range:            { $ref: "#/definitions/StructuredValue" }
      density_range_mass_measurement:    { $ref: "#/definitions/StructuredValue" }
      density_range_volume_measurement:  { $ref: "#/definitions/StructuredValue" }
      density_range_volume:              { $ref: "#/definitions/StructuredValue" }
      density_range_piston:              { $ref: "#/definitions/StructuredValue" }
      density_range_lobe:                { $ref: "#/definitions/StructuredValue" }
      reference_density:                 { $ref: "#/definitions/StructuredValue" }
      reference_density_water:           { $ref: "#/definitions/StructuredValue" }
      shrinkage_factor:                  { $ref: "#/definitions/StructuredValue" }
      viscosity_range:                   { $ref: "#/definitions/StructuredValue" }
      maximum_viscosity:                 { $ref: "#/definitions/StructuredValue" }

      # Display / indication
      measurement_unit:                  { $ref: "#/definitions/StructuredValue" }
      type_of_display:                   { $ref: "#/definitions/StructuredValue" }
      scale_interval_of_the_indication:  { $ref: "#/definitions/StructuredValue" }
      scale_interval:                    { $ref: "#/definitions/StructuredValue" }
      scale_interval_volume_display:     { $ref: "#/definitions/StructuredValue" }
      maximum_volume_indication:         { $ref: "#/definitions/StructuredValue" }
      maximum_volume:                    { $ref: "#/definitions/StructuredValue" }
      maximum_unit_price:                { $ref: "#/definitions/StructuredValue" }
      maximum_price_to_pay:              { $ref: "#/definitions/StructuredValue" }
      maximum_number_of_main_indicating_device: { $ref: "#/definitions/StructuredValue" }
      maximum_number_of_nozzles:         { $ref: "#/definitions/StructuredValue" }
      maximum_number_of_nozzles_connected_to_each_indicating_device: { $ref: "#/definitions/StructuredValue" }
      max_main_indicating_device:        { $ref: "#/definitions/StructuredValue" }
      max_nozzles:                       { $ref: "#/definitions/StructuredValue" }
      max_nozzles_per_indicating_device: { $ref: "#/definitions/StructuredValue" }
      pos_interface:                     { $ref: "#/definitions/StructuredValue" }
      communication_interface:           { $ref: "#/definitions/StructuredValue" }
      daily_report_time:                 { $ref: "#/definitions/StructuredValue" }

      # Power supply (power_supply module)
      power_supply_voltage:              { $ref: "#/definitions/StructuredValue" }
      power_supply_frequency:            { $ref: "#/definitions/StructuredValue" }
      power_supply_type:                 { $ref: "#/definitions/StructuredValue" }
      power_supply_battery:              { $ref: "#/definitions/StructuredValue" }
      power_supply_description:          { $ref: "#/definitions/StructuredValue" }
      power_supply_vehicle_battery:      { $ref: "#/definitions/StructuredValue" }
      electrical_power:                  { $ref: "#/definitions/StructuredValue" }
      electrical_power_calculator:       { $ref: "#/definitions/StructuredValue" }
      electrical_power_of_dispenser:     { $ref: "#/definitions/StructuredValue" }
      emc_measures:                      { $ref: "#/definitions/StructuredValue" }

      # Software (software module)
      software_identification:           { $ref: "_core.yaml#/definitions/SoftwareIdentification" }
      software_checksum:                 { $ref: "#/definitions/StructuredValue" }
      wm_checksum_crc:                   { $ref: "#/definitions/StructuredValue" }
      w_m_checksum_crc:                  { $ref: "#/definitions/StructuredValue" }
      software_identification_for_sigma3:       { $ref: "#/definitions/StructuredValue" }
      software_identification_for_hmi_client:   { $ref: "#/definitions/StructuredValue" }
      software_identification_for_hmi_client_hmi_207ce: { $ref: "#/definitions/StructuredValue" }
      software_identification_firmware_version: { $ref: "#/definitions/StructuredValue" }
      software_identification_code_version_number: { $ref: "#/definitions/StructuredValue" }
      measurement_sensor_in_vapour_return_line: { $ref: "#/definitions/StructuredValue" }

      # Reference / conversion parameters
      line_reference_temperature:        { $ref: "_modules/d011_environmental.yaml#/definitions/TemperatureRange" }

      # Designation / identification
      pattern_designation:               { $ref: "#/definitions/StructuredValue" }
      type_designation:                  { $ref: "#/definitions/StructuredValue" }
      manufacturer_trademark:            { $ref: "#/definitions/StructuredValue" }
      manufacturer_s_trademark:          { $ref: "#/definitions/StructuredValue" }
      approved_essential_parts:          { $ref: "#/definitions/StructuredValue" }
      essential_parts:                   { $ref: "#/definitions/StructuredValue" }

  PermissiveValue:
    description: |
      Permissive value type for model-level and config-level entries. R117
      extraction data places arrays (e.g. multi-class accuracy, environmental
      class lists), {min, max} ranges, and full StructuredValue objects as
      the `value` field in these entries. This type accepts all of those
      shapes plus scalar values.
    oneOf:
    - type: number
    - type: string
    - type: boolean
    - type: "null"
    - type: array
    - type: object

  ModelLevelEntry:
    description: |
      Model-level characteristic table. R117 uses model-level extensively
      for per-sensor-size flow rate, MMQ, and pressure tables (e.g. Coriolis
      transducers with DN8/DN15/DN25... variants).
    type: object
    required: [attribute, values]
    properties:
      attribute: { type: string }
      unit:      { $ref: "_units.yaml#/definitions/Unit" }
      unit_symbol: { type: [string, "null"] }
      values:
        type: array
        items:
          type: object
          required: [model, value]
          properties:
            model:            { type: string }
            value:            { $ref: "#/definitions/PermissiveValue" }
            footnote_markers:
              type: array
              items: { type: string }

  ConfigLevelEntry:
    description: |
      Config-level characteristic with conditional values. R117 uses
      config-level for accuracy class and measurement type conditioned on
      liquid type (e.g. oil vs LPG vs cryogenic LNG), and for flow rate
      ranges conditioned on dispenser configuration.
    type: object
    required: [attribute, axis, values]
    properties:
      attribute: { type: string }
      axis:      { oneOf: [ { type: string }, { type: "null" } ] }
      unit:      { $ref: "_units.yaml#/definitions/Unit" }
      unit_symbol: { type: [string, "null"] }
      values:
        type: array
        items:
          type: object
          required: [condition, value]
          properties:
            condition: { type: string }
            value:     { $ref: "#/definitions/PermissiveValue" }

  D011TestReference:
    description: Reference to an OIML D 11:2013 performance test.
    type: object
    required: [test_id]
    properties:
      test_id:          { type: string, pattern: '^d011_t\d{2}_' }
      test_level_index: { type: integer, minimum: 1, maximum: 5 }
      notes:            { type: string }
