Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
225 changes: 225 additions & 0 deletions mapping/v1/mapping_specification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
$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'
Comment thread
TRThurman marked this conversation as resolved.
anyOf:
- required:
- ae
- required:
- sc
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
(<<express:Schema_arm.Entity,Entity>>) 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 (<<express:Schema_arm.Entity,Entity>>), 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.
required:
- content
- extended_select
additionalProperties: false
properties:
content:
type: string
description: Extension reference path content
extended_select:
type: string
description: Name of the SELECT type being extended
Comment on lines +129 to +145

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refpath_extend defines content and extended_select but neither is required, so {} is a valid refpath extension. If the object is only meaningful when it has extension content (and likely the SELECT name), consider adding required (e.g., content and extended_select) to prevent silently-accepted incomplete extensions.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in commit 6124e9e: refpath_extend now requires both content and extended_select, so incomplete {} extensions no longer validate.

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
required:
- constraint
- entity
additionalProperties: false
properties:
constraint:
type: string
description: Constraint name
entity:
type: string
description: Entity to which the constraint applies
Comment on lines +182 to +195

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subtype_constraint currently has no required fields, meaning an empty object is considered a valid subtype constraint entry. If subtype constraints must have identifying fields, consider requiring at least constraint and entity (and any other mandatory fields per Annex B) to avoid accepting unusable constraint stubs.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in e27cdd0: subtype_constraint now requires both constraint and entity, so empty or partial constraint stubs no longer validate. UI screenshot: N/A (schema-only change).

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.
required:
- content
additionalProperties: false
properties:
content:
type: string
rules:
Comment on lines +198 to +209

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside subtype_constraint.source, additionalProperties is not set, so arbitrary keys will be accepted even though surrounding objects are strict (additionalProperties: false). If source is meant to only carry content, consider setting additionalProperties: false (and optionally requiring content when source is present) to keep validation consistent and catch typos.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in e27cdd0: subtype_constraint.source now has additionalProperties: false and requires content when present. UI screenshot: N/A (schema-only change).

$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