From 6cc70f457ef3a11f9df8be822c195b7e01fb4692 Mon Sep 17 00:00:00 2001 From: Joshua Date: Fri, 13 Nov 2026 14:50:42 -0600 Subject: [PATCH] Restructure mapping operation in schema. --- extensions/schema.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/extensions/schema.yaml b/extensions/schema.yaml index 0337ebc..b86c1ac 100644 --- a/extensions/schema.yaml +++ b/extensions/schema.yaml @@ -31,12 +31,13 @@ $defs: oneOf: # Mapping - description: >- - Map one set of values to another. Returns the value of the `_default` + Map one set of values to another. Returns the value of the `default` property if no other key matches. For `rregexmapping`, the mapping keys are treated as regular expressions. type: object required: - operation + - mapping minProperties: 2 additionalProperties: $ref: "#/$defs/scalar" @@ -46,11 +47,13 @@ $defs: - mapping # Exact match - regexmapping # Search term is regex, keys are strings - rregexmapping # Search term is string, keys are regexes - _file: - type: string - _column: + mapping: + type: + - string # Path to data file (YAML) + - object # In-place mapping + column: type: integer - _default: + default: default: null $ref: "#/$defs/scalar" # Math, Logic & Predefined Functions