Restructure mapping operation in schema.

This commit is contained in:
2026-11-13 14:50:42 -06:00
parent 25ea24d0fb
commit 6cc70f457e

View File

@@ -31,12 +31,13 @@ $defs:
oneOf: oneOf:
# Mapping # Mapping
- description: >- - 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 property if no other key matches. For `rregexmapping`, the mapping keys
are treated as regular expressions. are treated as regular expressions.
type: object type: object
required: required:
- operation - operation
- mapping
minProperties: 2 minProperties: 2
additionalProperties: additionalProperties:
$ref: "#/$defs/scalar" $ref: "#/$defs/scalar"
@@ -46,11 +47,13 @@ $defs:
- mapping # Exact match - mapping # Exact match
- regexmapping # Search term is regex, keys are strings - regexmapping # Search term is regex, keys are strings
- rregexmapping # Search term is string, keys are regexes - rregexmapping # Search term is string, keys are regexes
_file: mapping:
type: string type:
_column: - string # Path to data file (YAML)
- object # In-place mapping
column:
type: integer type: integer
_default: default:
default: null default: null
$ref: "#/$defs/scalar" $ref: "#/$defs/scalar"
# Math, Logic & Predefined Functions # Math, Logic & Predefined Functions