You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document mapping documents as the only shape; embedded mappings deprecated
Lead the Mapping documents section with the standalone mapping document and
reduce the embedded ontology_mappings shape to a short deprecation note, so
embedding no longer reads as a reasonable alternative. Align the field table,
version history, and ontology.json description with the same wording.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PEsT5t9mcXM6fF4QUC8Y7V
Copy file name to clipboardExpand all lines: ontology/ontology.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@
38
38
},
39
39
"ontology_mappings": {
40
40
"type": "array",
41
-
"description": "Collection of ontology maps from logical models, each embedding its own semantic model. Kept for backward compatibility; see ontology/mapping.json for the standalone mapping document, the recommended shape when more than one semantic model maps to this ontology.",
41
+
"description": "Deprecated. Embedded ontology maps, accepted only so existing documents continue to validate; write mappings as standalone documents validated against ontology/mapping.json instead.",
Copy file name to clipboardExpand all lines: ontology/ontology.md
+19-42Lines changed: 19 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ hierarchically, grouping each relationship under the concept that plays its firs
88
88
|`description`| string | No | Human-readable description |
89
89
|`ai_context`| string/object | No | Additional context for AI tools |
90
90
|`ontology`| list | Yes | Concepts and relationships they group that form this ontology |
91
-
|`ontology_mappings`| list | No |Embedded ontology maps (legacy shape, kept for backward compatibility); see [Mapping documents](#mapping-documents)for the standalone alternative|
91
+
|`ontology_mappings`| list | No |Deprecated; accepted only so existing documents continue to validate. Write mappings as [mapping documents](#mapping-documents)instead|
92
92
93
93
Each component of an ontology declares a concept and lists the relationships where that
94
94
concept plays the first role. The concept's name is the value of the `concept` field, and
@@ -388,28 +388,9 @@ mappings that group by some concept.
388
388
389
389
### Mapping documents
390
390
391
-
An ontology mapping can be expressed two ways. It can be embedded inside the ontology document
392
-
itself, as an entry in the top-level `ontology_mappings` list; this is the original shape and
393
-
remains valid for backward compatibility. Each entry has the following schema, mirroring
394
-
`OntologyMap` in `ontology.json`:
395
-
396
-
| Field | Type | Required | Description |
397
-
|---------------|---------|-----|-------|
398
-
| `name` | string | No | Name of this ontology map |
399
-
| `description` | string | No | Human-readable description of this ontology map |
400
-
| `semantic_model` | object | Yes | A complete, embedded semantic model document (see the core specification) |
401
-
| `concept_mappings` | list | Yes | Maps logical model constructs to concepts and relationships in this ontology |
402
-
403
-
Embedding a full semantic model inside the ontology document works cleanly when exactly one
404
-
semantic model maps to the ontology. It does not compose: if a second team wants to bring a second
405
-
semantic model to the same ontology, the natural next step is another entry in the same
406
-
`ontology_mappings`list, which means duplicating the embedded model or coordinating changes
407
-
through a file the second team does not otherwise own.
408
-
409
-
Alternatively, and the recommended approach when more than one semantic model maps to an ontology,
410
-
or when the mapping is owned by a different team than the ontology itself, a mapping can be written
411
-
as its own standalone document, validated against `ontology/mapping.json`. Instead of embedding a
412
-
semantic model, it references both the ontology and the semantic model it maps between:
391
+
A mapping is written as its own document, validated against `ontology/mapping.json`. It maps the
392
+
constructs of one semantic model onto one ontology, and references both rather than embedding
393
+
either:
413
394
414
395
| Field | Type | Required | Description |
415
396
|---------------|---------|-----|-------|
@@ -421,27 +402,24 @@ semantic model, it references both the ontology and the semantic model it maps b
421
402
| `concept_mappings` | list | Yes | Maps logical model constructs to concepts and relationships in the referenced ontology |
422
403
| `custom_extensions` | list | No | Vendor-specific attributes for extensibility, matching the core specification's mechanism |
423
404
424
-
Both `ontology` and `semantic_model` are references, not embedded documents. A reference is an
425
-
object with a `name`, which must equal the referenced document's own `name` and carries this
426
-
reference's checkable identity, and an `iri`, which says where to resolve it from: a relative
427
-
reference such as `./flights.ontology.yaml` when the two documents sit alongside each other, or an
428
-
absolute IRI once a catalog resolves names to locations.
405
+
A reference is an object with a `name`, which must equal the referenced document's own `name`, and
406
+
an `iri`, which says where to resolve it from: a relative reference such as
407
+
`./flights.ontology.yaml`when the documents sit alongside each other, or an absolute IRI once a
408
+
catalog resolves names to locations.
429
409
430
-
A mapping document references exactly one ontology and exactly one semantic model. When an
431
-
ontology has more than one semantic model mapped to it, each mapping is its own document; nothing
432
-
in this specification lets a single mapping document reference two semantic models at once, so
433
-
there is no need for `concept_mappings` expressions to disambiguate which semantic model a dataset
434
-
belongs to.
410
+
A mapping document references exactly one ontology and exactly one semantic model. When more than
411
+
one semantic model maps to an ontology, each mapping is its own document.
435
412
436
413
A mapping document is recognized by having `concept_mappings`, a field no ontology or semantic
437
-
model document has; there is no separate field declaring which of the three document kinds a given
438
-
file is. Tooling that needs to know a document's kind ahead of validating it, as
439
-
`validation/validate.py`'s `--schema` flag does today, still needs to be told explicitly, the same
440
-
as it does today for the two existing document kinds.
414
+
model document has; there is no separate field declaring a document's kind.
441
415
442
416
See `examples/flights.ontology.yaml`, `examples/flights.semantic_model.yaml`, and
443
-
`examples/flights.mapping.yaml` for the canonical `flights.yaml` example split into its three
444
-
parts.
417
+
`examples/flights.mapping.yaml`for a complete example.
418
+
419
+
**Deprecated:** mappings were originally embedded, each with a full copy of its semantic model,
420
+
in the ontology document's `ontology_mappings` list (`OntologyMap` in `ontology.json`). That list
421
+
is still accepted so existing documents continue to validate, but it is deprecated and will be
422
+
removed in a future version. New mappings must be written as mapping documents.
445
423
446
424
### Concept mappings
447
425
@@ -648,9 +626,8 @@ though `Store` plays a role in three of the relationships.
648
626
- **0.2.0.dev0** (2026-05-29): Basic support for ontologies and logical schema mappings
649
627
- Core ontology structure: Concepts, relationships, and business rules (requires and derived_by)
650
628
- Schema mappings from one or more logical models into an ontology
651
-
- Standalone mapping documents (`ontology/mapping.json`) as an alternative to embedding a
652
-
semantic model inside `ontology_mappings`, for ontologies mapped to more than one semantic
653
-
model or mappings owned by a different team than the ontology
629
+
- Mapping documents (`ontology/mapping.json`) that reference one ontology and one semantic
0 commit comments