From e650bb01770b6d50ce1f3a6245332f87ac938b5e Mon Sep 17 00:00:00 2001 From: TRThurman Date: Tue, 21 Apr 2026 23:08:25 -0500 Subject: [PATCH 1/4] feat: add mapping specification schema (ELF 5006 Annex B) Add JSON Schema (draft-07) for validating mapping.yaml files per ELF 5006:2025 YAML serialization annex. Defines structure for entity mappings, attribute assertions, reference paths, SELECT extensions, alternative mappings, and subtype constraints. Validated against 588 mapping.yaml files in wg12-step with zero errors. --- README.adoc | 11 ++ mapping/v1/mapping_specification.yaml | 211 ++++++++++++++++++++++++++ 2 files changed, 222 insertions(+) create mode 100644 mapping/v1/mapping_specification.yaml diff --git a/README.adoc b/README.adoc index 15e3981..2baa78e 100644 --- a/README.adoc +++ b/README.adoc @@ -17,6 +17,17 @@ Schema definitions for EXPRESS schema manifest: * link:manifest/v1/schema_manifest.yaml[Schema Manifest v1] - Defines structure for listing EXPRESS schemas and their locations +=== Mapping + +The EXPRESS mapping specification is defined in +https://www.expresslang.org/docs/documents/express-mapping/document.html[ELF 5006]. + +Schema definitions for EXPRESS mapping specifications: + +* link:mapping/v1/mapping_specification.yaml[Mapping Specification v1] - + Defines the structure of `mapping.yaml` files that describe ARM-to-MIM entity + mappings per ELF 5006 Annex B + === Changes The EXPRESS changes file is defined in diff --git a/mapping/v1/mapping_specification.yaml b/mapping/v1/mapping_specification.yaml new file mode 100644 index 0000000..d1cdf7e --- /dev/null +++ b/mapping/v1/mapping_specification.yaml @@ -0,0 +1,211 @@ +$schema: http://json-schema.org/draft-07/schema# +title: EXPRESS Mapping Specification +description: >- + Defines the structure of EXPRESS mapping specification YAML files + (mapping.yaml) per ELF 5006 Annex B. Each file describes how ARM + entities and attributes map to MIM entities through reference paths. +type: object +properties: + ae: + type: array + description: Application element mappings + items: + $ref: '#/definitions/entity_mapping' + sc: + type: array + description: Subtype constraint declarations + items: + $ref: '#/definitions/subtype_constraint' +additionalProperties: false +definitions: + entity_mapping: + type: object + description: Mapping of an ARM entity to MIM elements + required: + - entity + additionalProperties: false + properties: + entity: + type: string + description: >- + ARM entity being mapped. Shall be an EXPRESS link + (<>) or a plain entity name. + aimelt: + type: string + description: >- + Corresponding MIM element. An EXPRESS link for entity references, + or a plain string for keywords (PATH, IDENTICAL MAPPING, + NO MAPPING EXTENSION PROVIDED), template constructs + (/SUPERTYPE/, /SUBTYPE/, /MAPPING_OF/), or dotted attribute paths. + extensible: + type: string + enum: + - "YES" + - "NO" + description: Whether the entity mapping is extensible + original_module: + type: string + description: >- + Module from which this mapping originates, for inherited mappings + in modules that extend SELECT types. + refpath: + $ref: '#/definitions/refpath' + aa: + type: array + description: Attribute assertion mappings + items: + $ref: '#/definitions/attribute_mapping' + alt_map: + type: array + description: Alternative mappings for this entity + items: + $ref: '#/definitions/alternative_mapping' + rules: + $ref: '#/definitions/rules' + description: + $ref: '#/definitions/rich_text' + attribute_mapping: + type: object + description: Mapping of an ARM attribute to MIM elements + required: + - attribute + additionalProperties: false + properties: + attribute: + type: string + description: ARM attribute name + assertion_to: + type: string + description: >- + Target entity or type for this attribute assertion. Shall be an + EXPRESS link (<>), a plain + entity name, or "*" for any type. + aimelt: + type: string + description: >- + MIM element at attribute level. A plain string for dotted + attribute paths (entity.attribute) or keywords (PATH, + IDENTICAL MAPPING). + refpath: + $ref: '#/definitions/refpath' + refpath_extend: + $ref: '#/definitions/refpath_extend' + alt_map: + type: array + description: Alternative mappings at attribute level + items: + $ref: '#/definitions/attribute_alternative_mapping' + rules: + $ref: '#/definitions/rules' + description: + $ref: '#/definitions/rich_text' + inherited_from_entity: + type: string + description: Entity from which this attribute mapping is inherited + inherited_from_module: + type: string + description: Module from which this attribute mapping is inherited + refpath: + type: object + description: >- + Reference path specifying navigation between entities using the + EXPRESS mapping language defined in ELF 5006. + required: + - content + additionalProperties: false + properties: + content: + type: string + description: >- + Multi-line reference path expression. Lines are separated by + newline characters. Operators include subtype (<=), supertype + (=>), forward navigation (->), inverse navigation (<-), + constraint blocks ({}), and SELECT extension (*>/<*). + refpath_extend: + type: object + description: >- + Reference path extension for SELECT type extensions. Provides + additional mapping path content for entities whose attributes + reference an extended SELECT type. + additionalProperties: false + properties: + content: + type: string + description: Extension reference path content + extended_select: + type: string + description: Name of the SELECT type being extended + alternative_mapping: + type: object + description: Alternative mapping for an entity + additionalProperties: false + properties: + id: + type: string + description: Unique identifier for the alternative mapping + aimelt: + type: string + refpath: + $ref: '#/definitions/refpath' + rules: + $ref: '#/definitions/rules' + description: + $ref: '#/definitions/rich_text' + attribute_alternative_mapping: + type: object + description: Alternative mapping at attribute level + additionalProperties: false + properties: + id: + type: string + aimelt: + type: string + refpath: + $ref: '#/definitions/refpath' + refpath_extend: + $ref: '#/definitions/refpath_extend' + alt_map_inc: + type: string + description: Alternative mapping inclusion reference + rules: + $ref: '#/definitions/rules' + description: + $ref: '#/definitions/rich_text' + subtype_constraint: + type: object + description: Subtype constraint declaration + additionalProperties: false + properties: + constraint: + type: string + description: Constraint name + entity: + type: string + description: Entity to which the constraint applies + description: + $ref: '#/definitions/rich_text' + source: + type: object + description: >- + ISO source reference. Legacy field, to be removed when subtype + constraint entries are migrated to use EXPRESS links. + properties: + content: + type: string + rules: + $ref: '#/definitions/rules' + rules: + type: object + description: Rule specifications or constraint names + additionalProperties: false + properties: + content: + type: string + rich_text: + type: object + description: Rich text content with optional inline formatting + properties: + content: + type: string + description: Main text content + additionalProperties: true From 2e4780317f6f6ae087e7f564dd45049f0903c867 Mon Sep 17 00:00:00 2001 From: Thomas Thurman Date: Tue, 21 Apr 2026 23:29:54 -0500 Subject: [PATCH 2/4] Update mapping/v1/mapping_specification.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- mapping/v1/mapping_specification.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mapping/v1/mapping_specification.yaml b/mapping/v1/mapping_specification.yaml index d1cdf7e..7db736b 100644 --- a/mapping/v1/mapping_specification.yaml +++ b/mapping/v1/mapping_specification.yaml @@ -16,6 +16,11 @@ properties: description: Subtype constraint declarations items: $ref: '#/definitions/subtype_constraint' +anyOf: + - required: + - ae + - required: + - sc additionalProperties: false definitions: entity_mapping: From 6124e9e8d43581797f489cfac8ca7fcc85dd389b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 04:35:12 +0000 Subject: [PATCH 3/4] Require refpath_extend content and extended_select Agent-Logs-Url: https://github.com/expresslang/schemas/sessions/2ec205e1-50b7-4da1-90c0-c956b9e3138a Co-authored-by: TRThurman <1623380+TRThurman@users.noreply.github.com> --- mapping/v1/mapping_specification.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mapping/v1/mapping_specification.yaml b/mapping/v1/mapping_specification.yaml index 7db736b..356675b 100644 --- a/mapping/v1/mapping_specification.yaml +++ b/mapping/v1/mapping_specification.yaml @@ -132,6 +132,9 @@ definitions: Reference path extension for SELECT type extensions. Provides additional mapping path content for entities whose attributes reference an extended SELECT type. + required: + - content + - extended_select additionalProperties: false properties: content: From e27cdd06f84d2d002511032c2b89e174a9d7bab5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 04:38:06 +0000 Subject: [PATCH 4/4] Tighten subtype_constraint and source object requirements Agent-Logs-Url: https://github.com/expresslang/schemas/sessions/36af3136-1ecc-4235-8edb-8370dabfaf43 Co-authored-by: TRThurman <1623380+TRThurman@users.noreply.github.com> --- mapping/v1/mapping_specification.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mapping/v1/mapping_specification.yaml b/mapping/v1/mapping_specification.yaml index 356675b..5e2e55e 100644 --- a/mapping/v1/mapping_specification.yaml +++ b/mapping/v1/mapping_specification.yaml @@ -182,6 +182,9 @@ definitions: subtype_constraint: type: object description: Subtype constraint declaration + required: + - constraint + - entity additionalProperties: false properties: constraint: @@ -197,6 +200,9 @@ definitions: description: >- ISO source reference. Legacy field, to be removed when subtype constraint entries are migrated to use EXPRESS links. + required: + - content + additionalProperties: false properties: content: type: string