Skip to content

Commit

Permalink
initial version of the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
swennemers committed Sep 24, 2024
1 parent 57d4aae commit ada7883
Show file tree
Hide file tree
Showing 3 changed files with 686 additions and 0 deletions.
251 changes: 251 additions & 0 deletions vocabularies/ER.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
{
"$Version": "4.0",
"$Reference": {
"https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
"$Include": [{ "$Namespace": "Org.OData.Core.V1", "$Alias": "Core" }]
},
"https://sap.github.io/odata-vocabularies/vocabularies/Common.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.Common.v1", "$Alias": "Common" }]
}
},
"com.sap.vocabularies.ER.v1": {
"$Alias": "ER",
"@Core.Description": "Terms to better document the ER (Entity Relationship) model outside of the current API / data model context",
"@Core.Description#Published": "2020-03-03 © Copyright 2020 SAP SE. All rights reserved",
"@Core.Links": [
{ "rel": "alternate", "href": "https://sap.github.io/odata-vocabularies/vocabularies/ER.xml" },
{ "rel": "latest-version", "href": "https://sap.github.io/odata-vocabularies/vocabularies/ER.json" },
{ "rel": "describedby", "href": "https://github.com/sap/odata-vocabularies/blob/main/vocabularies/ER.md" }
],
"entityType": {
"$Kind": "Term",
"$AppliesTo": ["EntityType"],
"@Common.Experimental": true,
"@Core.Description": "\n Defines which Entity Type the current JSON Schema object represents. \n There could be several JSON Schema objects that are assigned to the same Entity Type. \n One JSON Schema object can only have one Entity Type assigned, which corresponds to the \n applications own Entity Type definition. The ID scheme for an Entity Type ID is as following: \n entityTypeId := namespace:entityTypeLocalId[:v\"majorVersion\"]\n "
},
"propertyType": {
"$Kind": "Term",
"$AppliesTo": ["Property"],
"@Common.Experimental": true,
"@Core.Description": "logical property type of a property",
"@Core.LongDescription": "Defines the logical Property Type of a property.\n The reason is to have an ID to relate to the property type independently of the property name and shared \n across every usage of the same property across APIs where names might be different. \n Especially to state that it can be used as an ID or is part of a composite ID.\n "
},
"entityIds": {
"$Kind": "Term",
"$Collection": true,
"$Type": "ER.entityId",
"$AppliesTo": ["EntityType"],
"@Common.Experimental": true,
"@Core.Description": "The annotated entity type represents an ODM root entity",
"@Core.LongDescription": "\n Defines a list of IDs, which are available to look up the Entity Type or create a reference to it.\n An Entity Type can have multiple IDs:\n * There can be **alternative IDs** that can also be used to create a reference to the Entity Type\n * Some ID properties form a **composite ID** together and need to be combined to function as a unique ID for references\n * This is indicated by a propertyTypes array with more than one Property Type ID entry. \n "
},
"reference": {
"$Kind": "Term",
"$Type": "ER.singleReference",
"$AppliesTo": ["Property"],
"@Core.Description": " Defines references to other Entity Types based on a single ID.",
"@Core.LongDescription": " Defines references to other Entity Types based on a single ID.\n "
},
"compositeReferences": {
"$Kind": "Term",
"$Collection": true,
"$Type": "ER.compositeReference",
"$AppliesTo": ["EntityType"],
"@Common.Experimental": true,
"@Core.Description": " Defines one or many references to other Entity Types based on a composite IDs.",
"@Core.LongDescription": "\n Defines one or many references to other Entity Types based on a composite IDs. \n "
},
"temporalIds": {
"$Kind": "Term",
"$Collection": true,
"$Type": "ER.temporalId",
"$AppliesTo": ["EntityType"],
"@Common.Experimental": true,
"@Core.Description": "Defines a list of temporal IDs",
"@Core.LongDescription": "\n Defines a list of temporal IDs \n "
},
"temporalReferences": {
"$Kind": "Term",
"$Collection": true,
"$Type": "ER.temporalReference",
"$AppliesTo": ["EntityType"],
"@Common.Experimental": true,
"@Core.Description": "Defines a list of temporal references",
"@Core.LongDescription": "\n Defines a list of temporal references \n "
},
"referencesWithConstantIds": {
"$Kind": "Term",
"$Collection": true,
"$Type": "ER.referencesWithConstantId",
"$AppliesTo": ["EntityType"],
"@Common.Experimental": true,
"@Core.Description": "Defines one or many references to other Entity Types based on a composite IDs where some properties of the references are constant values.",
"@Core.LongDescription": "\n Defines one or many references to other Entity Types based on a composite IDs where some properties of the references are constant values.\n "
},
"singleReference": {
"$Kind": "ComplexType",
"@Core.Description": "Defines a reference to another Entity Type based on a single ID.",
"name": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "Optional name to describe the semantics of the reference."
},
"referencedEntityType": { "$Type": "ER.entityTypeID", "@Common.Experimental": true },
"referencedPropertyType": { "$Type": "ER.propertyTypeID", "@Common.Experimental": true }
},
"entityId": {
"$Kind": "ComplexType",
"@Core.Description": "Defines an ID that can be used to look up the Entity Type or create a reference to it.",
"name": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "Optional name to describe the semantics of the ID."
},
"description": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "Optional description to describe the semantics of the ID."
},
"propertyTypes": {
"$Collection": true,
"$Type": "ER.propertyTypeID",
"@Common.Experimental": true,
"@Core.Description": "List of property type IDs."
}
},
"compositeReference": {
"$Kind": "ComplexType",
"@Core.Description": "Defines a single reference to another Entity Type based on a composite ID.",
"name": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "Optional name to describe the semantics of the reference."
},
"referencedEntityType": { "$Type": "ER.entityTypeID", "@Common.Experimental": true },
"referencedPropertyType": {
"$Collection": true,
"$Type": "ER.referencedPropertyType",
"@Common.Experimental": true,
"@Core.Description": "List of properties, the composite ID consists of."
}
},
"referencedPropertyType": {
"$Kind": "ComplexType",
"@Core.Description": "Grouping of the ID in the referenced entity, by its property type ID and the local name in this entity.",
"referencedPropertyType": { "$Type": "ER.propertyTypeID", "@Common.Experimental": true },
"localPropertyName": { "$Type": "Edm.PropertyPath", "@Common.Experimental": true }
},
"temporalId": {
"$Kind": "ComplexType",
"@Core.Description": "Defines an ID that includes a temporal interval.",
"name": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "Optional name to describe the semantics of the ID."
},
"description": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "Optional description to describe the semantics of the ID."
},
"propertyTypes": {
"$Collection": true,
"$Type": "ER.propertyTypeID",
"@Common.Experimental": true,
"@Core.Description": "List of property type IDs that are non-temporal."
},
"temporalIntervalType": {
"$Type": "ER.temporalIntervalTypeEnum",
"@Common.Experimental": true,
"@Core.Description": "Interval which includes the boundaries."
},
"temporalType": {
"$Type": "ER.temporalTypeEnum",
"@Common.Experimental": true,
"@Core.Description": "Temporal Type"
},
"temporalIntervalStartProperty": {
"$Type": "Edm.PropertyPath",
"@Common.Experimental": true,
"@Core.Description": "Property in the local entity that is used to define the start of the interval."
},
"temporalIntervalEndProperty": {
"$Type": "Edm.PropertyPath",
"@Common.Experimental": true,
"@Core.Description": "Property in the local entity that is used to define the end of the interval."
}
},
"temporalIntervalTypeEnum": {
"$Kind": "EnumType",
"CLOSED_CLOSED": 0,
"OPEN_OPEN": 1,
"OPEN_CLOSED": 2,
"CLOSED_OPEN": 3
},
"temporalTypeEnum": { "$Kind": "EnumType", "DATE": 0, "DATETIME": 1 },
"temporalReference": {
"$Kind": "ComplexType",
"@Core.Description": "Defines single temporal reference to another Entity Type.",
"name": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "Optional name to describe the semantics of the reference."
},
"referencedEntityType": { "$Type": "ER.entityTypeID", "@Common.Experimental": true },
"referencedPropertyType": {
"$Collection": true,
"$Type": "ER.referencedPropertyType",
"@Common.Experimental": true,
"@Core.Description": "List of properties, the composite ID consists of."
},
"category": {
"$Type": "ER.temporalCategoryEnum",
"@Common.Experimental": true,
"@Core.Description": "Category of the temporal reference."
},
"selectionDateProperty": {
"$Type": "Edm.PropertyPath",
"@Common.Experimental": true,
"@Core.Description": "Property in the local entity that is used to select the right date interval."
}
},
"temporalCategoryEnum": { "$Kind": "EnumType", "TEMPORAL_DATE": 0 },
"referenceWithConstantId": {
"$Kind": "ComplexType",
"@Core.Description": "Defines single a reference to another Entity Type based on a composite ID.",
"name": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "Optional name to describe the semantics of the reference."
},
"referencedEntityType": { "$Type": "ER.entityTypeID", "@Common.Experimental": true },
"referencedPropertyType": {
"$Collection": true,
"$Type": "ER.referencedPropertyTypeWithConstantId",
"@Common.Experimental": true,
"@Core.Description": "List of properties, the composite ID consists of."
}
},
"referencedPropertyTypeWithConstantId": {
"$Kind": "ComplexType",
"@Core.Description": "Grouping of the ID in the referenced entity, by its property type ID and either the local name in this entity or a constant value.",
"referencedPropertyType": { "$Type": "ER.propertyTypeID", "@Common.Experimental": true },
"localPropertyName": { "$Type": "Edm.PropertyPath", "$Nullable": true, "@Common.Experimental": true },
"constantValue": {
"$Nullable": true,
"@Common.Experimental": true,
"@Core.Description": "String serialization of the constant value of the property in the referenced entity."
}
},
"propertyTypeID": {
"$Kind": "TypeDefinition",
"$UnderlyingType": "Edm.String",
"@Core.Description": "ID of the property type. The reason is to have an ID to relate to the property, especially to state that it can be used as an ID or is part of a composite ID."
},
"entityTypeID": {
"$Kind": "TypeDefinition",
"$UnderlyingType": "Edm.String",
"@Core.Description": "ID of the entity type."
}
}
}
Loading

0 comments on commit ada7883

Please sign in to comment.