OSI - Open Semantic Interchange Ontology Definitions

Added on June 11, 2026Managed by admin

OSI Ontology

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/open-semantic-interchange/OSI/core-spec/osi-schema.json",
  "title": "OSI Ontology Metadata Specification",
  "description": "JSON Schema for validating OSI (Open Semantic Interoperability) ontology definitions",
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "const": "0.2.0.dev0",
      "description": "Ontology specification version"
    },
    "name": {
      "type": "string",
      "description": "Unique identifier for the ontology"
    },
    "description": {
      "type": "string",
      "description": "Human-readable description"
    },
    "ai_context": {
      "$ref": "https://raw.githubusercontent.com/open-semantic-interchange/OSI/main/core-spec/osi-schema.json#/$defs/AIContext"
    },
    "ontology": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OntologyComponent"
      },
      "minItems": 1,
      "description": "Components that define the concepts and relationships in this ontology"
    },
    "ontology_mappings": {
      "type": "array",
      "description": "Collection of ontology maps from logical models",
      "items": {
        "$ref": "#/$defs/OntologyMap"
      }
    }
  },
  "required": ["version", "name", "ontology"],
  "additionalProperties": false,
  "$defs": {
    "OntologyComponent": {
      "type": "object",
      "description": "Ontology component that defines a single concept and any relationships that are keyed primarily by that concept",
      "properties": {
        "description": {
          "type": "string",
          "description": "Human-readable description of the component"
        },
        "concept": {
          "$ref": "#/$defs/Concept"
        },
        "relationships": { 
          "type": "array",
          "items": {
            "$ref": "#/$defs/Relationship"
          },
          "description": "Defines relationships that pertain primarily to the concept defined in this component"
        }
      },
      "required": ["concept"],
      "additionalProperties": false
    },
    "Expression": {
      "type": "string",
      "description": "ANSI SQL expression"
    },
    "Relationship": {
      "type": "object",
      "description": "Relationship between concepts in the ontology",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the relationship"
        },
        "description": {
          "type": "string",
          "description": "Human-readable description of the relationship"
        },
        "roles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Role"
          },
          "description": "Additional roles in this relationship"
        },
        "multiplicity": {
          "$ref": "#/$defs/Multiplicity"
        },
        "derived_by": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Expression"
          },
          "description": "Expressions that define how this concept is derived"
        },
        "verbalizes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Natural language expressions that verbalize this relationship"
        }
      },
      "required": ["name", "verbalizes"],
      "additionalProperties": false
    },
    "Concept": {
      "type": "object",
      "description": "Defines a concept in the ontology",
      "properties": {
        "name": {
          "type": "string",
          "description": "Unique identifier for the concept"
        },
        "type": {
          "$ref": "#/$defs/ConceptType"
        },
        "description": {
          "type": "string",
          "description": "Human-readable description of the concept"
        },
        "extends": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Indicates that this concept extends one or more other concepts"
        },
        "derived_by": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Expression"
          },
          "description": "Expressions that define how this concept is derived"
        },
        "identify_by": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Names of relationships to use as the preferred identifier of this concept"
        },
        "requires": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Expression"
          },
          "description": "Expressions that constrain the population of this concept"
        }
      },
      "required": ["name", "type"],
      "additionalProperties": false
    },
    "ConceptMapping": {
      "type": "object",
      "description": "Mappings from logical model constructs to some ontology component",
      "properties": {
        "concept": {
          "type": "string",
          "description": "Name of the concept whose part of the ontology we are mapping to"
        },
        "object_mappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ObjectMapping"
          },
          "description": "Mappings from logical constructs that populate the concept in this component. Valid only when the concept is an entity type"
        },         
        "link_mappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LinkMapping"
          },
          "description": "Mappings from logical model relationships to ontology relationships pertaining to the mapped concept"
        }
      },
      "required": ["concept"],
      "additionalProperties": false
    },
    "ConceptType": {
      "type": "string",
      "enum": [ "EntityType", "ValueType" ],
      "description": "A concept is either an entity type or a value type"
    },
    "ReferentMapping": {
      "type": "object",
      "description": "Mapping from logical model constructs to a relationship used to references some entity type in the ontology",
      "properties": {
        "relationship": {
          "type": "string",
          "description": "Name of referent relationship"
        },
        "expression": {
          "$ref": "#/$defs/Expression"
        },
        "referent_mappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReferentMapping"
          }
        }
      },
      "required": ["relationship"],
      "additionalProperties": false
    },
    "Role": {
      "type": "object",
      "description": "Role in some relationship (the container)",
      "properties": {
        "concept": {
          "type": "string",
          "description": "Name of the concept playing this role"
        },
        "name": {
          "type": "string",
          "description": "Optional name of this role, used when the same concept plays multiple roles in the same relationship"
        }
      },
      "required": ["concept"],
      "additionalProperties": false
    },
    "ObjectMapping": {
      "type": "object",
      "description": "Pattern of logical-level expressions for identifying objects of some concept using the values in one or more fields",
      "properties": {
        "concept": {
          "type": "string",
          "description": "Name of the concept whose objects we are mapping to"
        },
        "referent_mappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReferentMapping"
          },
          "description": "Maps logical-model constructs to referent relationships of this entity type"
        },
        "expression": {
          "$ref": "#/$defs/Expression"
        }
      },
      "additionalProperties": false
    },
    "LinkMapping": {
      "type": "object",
      "description": "Mapping from logical schema to the links of relationships in the ontology",
      "properties": {
        "relationship": {
          "type": "string",
          "description": "Name of relationship being populated by this mapping node"
        },
        "object_mapping": {
            "$ref": "#/$defs/ObjectMapping"
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LinkMapping"
          },
          "description": "Relationship maps at the next level in this hierarchy"
        }
      },
      "required": ["object_mapping"],
      "additionalProperties": false
    },
    "Multiplicity": {
      "type": "string",
      "enum": [ "ManyToOne", "OneToOne" ],
      "description": "Relationship multiplicity"
    },
    "OntologyMap": {
      "type": "object",
      "description": "Map from the constructs of some logical model to some ontology",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of this ontology map"
        },
        "description": {
          "type": "string",
          "description": "Human-readable description of this ontology map"
        },
        "semantic_model": {
          "$ref": "https://raw.githubusercontent.com/open-semantic-interchange/OSI/main/core-spec/osi-schema.json#/$defs/SemanticModel"
        },
        "concept_mappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConceptMapping"
          },
          "description": "Maps logical model constructs to some concept and its relationships in the ontology"
        }
      },
      "required": ["semantic_model", "concept_mappings"],
      "additionalProperties": false
    }
  }
}

View source