{ "$schema": "http://json-schema.org/schema#", "$id": "https://smart-data-models.github.io/data-models/common-schema.json", "title": "Common definitions for Harmonized Data Models", "definitions": { "EntityIdentifierType": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Property. Unique identifier of the entity" }, "email": { "type": "string", "format": "idn-email", "description": "Property. Email address of owner." }, "userAlias": { "type": "string", "description": "Property. An anonymous alias of a user." }, "tag": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. An optional text string used to qualify an item" }, "timeInstant": { "type": "string", "format": "date-time", "description": "Property. Model:'https://schema.org/Datetime'. Timestamp of the payload . There can be production environments where the attribute type is equal to the `ISO8601` string. If so, it must be considered as a synonym of `DateTime`. This attribute is kept for backwards compatibility with old FIWARE reference implementations." }, "dateObserved": { "type": "string", "format": "date-time", "description": "Property. Date of the observed entity defined by the user." }, "dateYearLess": { "type": "string", "pattern": "^--((0[13578]|1[02])-31|(0[1,3-9]|1[0-2])-30|(0\\d|1[0-2])-([0-2]\\d))$" }, "GSMA-Commons": { "type": "object", "properties": { "id": { "$ref": "#/definitions/EntityIdentifierType" }, "dateCreated": { "type": "string", "format": "date-time", "description": "Property. Entity creation timestamp. This will usually be allocated by the storage platform." }, "dateModified": { "type": "string", "format": "date-time", "description": "Property. Timestamp of the last modification of the entity. This will usually be allocated by the storage platform." }, "source": { "type": "string", "description": "Property. A sequence of characters giving the original source of the entity data as a URL. Recommended to be the fully qualified domain name of the source provider, or the URL to the source object." }, "name": { "type": "string", "description": "Property. The name of this item." }, "alternateName": { "type": "string", "description": "Property. An alternative name for this item" }, "description": { "type": "string", "description": "Property. A description of this item" }, "dataProvider": { "type": "string", "description": "Property. A sequence of characters identifying the provider of the harmonised data entity." }, "owner": { "type": "array", "description": "Property. A List containing a JSON encoded sequence of characters referencing the unique Ids of the owner(s)", "items": { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/EntityIdentifierType" } }, "seeAlso": { "oneOf": [ { "type": "array", "minItems": 1, "items": { "type": "string", "format": "uri" } }, { "type": "string", "format": "uri" } ], "description": "Property. list of uri pointing to additional resources about the item" } } }, "Location-Commons": { "type": "object", "properties": { "location": { "oneOf": [ { "title": "GeoJSON Point", "type": "object", "required": [ "type", "coordinates" ], "description": "Geoproperty. Geojson reference to the item. Point", "properties": { "type": { "type": "string", "enum": [ "Point" ] }, "coordinates": { "type": "array", "minItems": 2, "items": { "type": "number" } }, "bbox": { "type": "array", "minItems": 4, "items": { "type": "number" } } } }, { "title": "GeoJSON LineString", "type": "object", "required": [ "type", "coordinates" ], "description": "Geoproperty. Geojson reference to the item. LineString", "properties": { "type": { "type": "string", "enum": [ "LineString" ] }, "coordinates": { "type": "array", "minItems": 2, "items": { "type": "array", "minItems": 2, "items": { "type": "number" } } }, "bbox": { "type": "array", "minItems": 4, "items": { "type": "number" } } } }, { "title": "GeoJSON Polygon", "type": "object", "required": [ "type", "coordinates" ], "description": "Geoproperty. Geojson reference to the item. Polygon", "properties": { "type": { "type": "string", "enum": [ "Polygon" ] }, "coordinates": { "type": "array", "items": { "type": "array", "minItems": 4, "items": { "type": "array", "minItems": 2, "items": { "type": "number" } } } }, "bbox": { "type": "array", "minItems": 4, "items": { "type": "number" } } } }, { "title": "GeoJSON MultiPoint", "type": "object", "required": [ "type", "coordinates" ], "description": "Geoproperty. Geojson reference to the item. MultiPoint", "properties": { "type": { "type": "string", "enum": [ "MultiPoint" ] }, "coordinates": { "type": "array", "items": { "type": "array", "minItems": 2, "items": { "type": "number" } } }, "bbox": { "type": "array", "minItems": 4, "items": { "type": "number" } } } }, { "title": "GeoJSON MultiLineString", "type": "object", "required": [ "type", "coordinates" ], "description": "Geoproperty. Geojson reference to the item. MultiLineString", "properties": { "type": { "type": "string", "enum": [ "MultiLineString" ] }, "coordinates": { "type": "array", "items": { "type": "array", "minItems": 2, "items": { "type": "array", "minItems": 2, "items": { "type": "number" } } } }, "bbox": { "type": "array", "minItems": 4, "items": { "type": "number" } } } }, { "title": "GeoJSON MultiPolygon", "type": "object", "required": [ "type", "coordinates" ], "description": "Geoproperty. Geojson reference to the item. MultiLineString", "properties": { "type": { "type": "string", "enum": [ "MultiPolygon" ] }, "coordinates": { "type": "array", "items": { "type": "array", "items": { "type": "array", "minItems": 4, "items": { "type": "array", "minItems": 2, "items": { "type": "number" } } } } }, "bbox": { "type": "array", "minItems": 4, "items": { "type": "number" } } } } ], "description": "Geoproperty. Geojson reference to the item. It can be Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygon" }, "address": { "type": "object", "description": "Property. The mailing address. Model:'https://schema.org/address'", "properties": { "streetAddress": { "type": "string", "description": "Property. The street address. Model:'https://schema.org/streetAddress'" }, "addressLocality": { "type": "string", "description": "Property. The locality in which the street address is, and which is in the region. Model:'https://schema.org/addressLocality'" }, "addressRegion": { "type": "string", "description": "Property. The region in which the locality is, and which is in the country. Model:'https://schema.org/addressRegion'" }, "addressCountry": { "type": "string", "description": "Property. The country. For example, Spain. Model:'https://schema.org/addressCountry'" }, "postalCode": { "type": "string", "description": "Property. The postal code. For example, 24004. Model:'https://schema.org/https://schema.org/postalCode'" }, "postOfficeBoxNumber": { "type": "string", "description": "Property. The post office box number for PO box addresses. For example, 03578. Model:'https://schema.org/postOfficeBoxNumber'" } } }, "areaServed": { "type": "string", "description": "Property. The geographic area where a service or offered item is provided. Model:'https://schema.org/Text'" } } }, "PhysicalObject-Commons": { "type": "object", "properties": { "color": { "type": "string", "description": "Property. The color of the product. Model:'https://schema.org/color'" }, "image": { "type": "string", "format": "uri", "description": "Property. An image of the item. Model:'https://schema.org/URL'" }, "annotations": { "type": "array", "description": "Property. Annotations about the item. Model:'https://schema.org/Text'", "items": { "type": "string" } } } }, "DateTime-Commons": { "type": "object", "description": "Property. All date-time elements in data models unless explicitly stated are ISO 8601 compliant", "properties": { "openingHoursSpecification": { "type": "array", "description": "Property. A structured value providing information about the opening hours of a place or a certain service inside a place. Model:'https://schema.org/openingHoursSpecification'", "items": { "type": "object", "properties": { "opens": { "type": "string", "format": "time" }, "closes": { "type": "string", "format": "time" }, "dayOfWeek": { "type": "string", "description": "Property. Model:'http://schema.org/dayOfWeek'. The day of the week for which these opening hours are valid. URLs from GoodRelations (http://purl.org/goodrelations/v1) are used (for Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday plus a special entry for PublicHolidays).", "anyOf": [ { "type": "string", "description": "Property. Array of days of the week.", "enum": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "PublicHolidays" ] }, { "type": "string", "description": "Property. Array of days of the week.", "enum": [ "https://schema.org/Monday", "https://schema.org/Tuesday", "https://schema.org/Wednesday", "https://schema.org/Thursday", "https://schema.org/Friday", "https://schema.org/Saturday", "https://schema.org/Sunday", "https://schema.org/PublicHolidays" ] } ] }, "validFrom": { "description": "Property. The date when the item becomes valid. A date value in the form CCYY-MM-DD or a combination of date and time of day in the form [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm] in ISO 8601 date format.", "anyOf": [ { "type": "string", "format": "date", "description": "Property. Model:'http://schema.org/Date." }, { "type": "string", "format": "date-time", "description": "Property. Model:'http://schema.org/DateTime." } ] }, "validThrough": { "type": "string", "description": "Property. The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours. A date value in the form CCYY-MM-DD or a combination of date and time of day in the form [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm] in ISO 8601 date format.", "anyOf": [ { "type": "string", "format": "date", "description": "Property. Model:'http://schema.org/Date." }, { "type": "string", "format": "date-time", "description": "Property. Model:'http://schema.org/DateTime." } ] } } }, "minItems": 1 } }, "openingHours": { "type": "string", "description": "Property. Model:'https://schema.org/openingHours'. The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'. Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su. Times are specified using 24:00 format. For example, 3pm is specified as 15:00, 10am as 10:00. Here is an example: . If a business is open 7 days a week, then it can be specified as ." } }, "Contact-Commons": { "description": "Property. All contact elements in data models unless explicitly stated according to schema.org", "type": "object", "properties": { "contactPoint": { "type": "object", "description": "Property. Model:'https://schema.org/ContactPoint'. The details to contact with the item.", "properties": { "contactType": { "type": "string", "description": "Property. Contact type of this item." }, "email": { "$ref": "#/definitions/email" }, "telephone": { "type": "string", "description": "Property. Telephone of this contact." }, "name": { "type": "string", "description": "Property. The name of this item." }, "url": { "type": "string", "format": "uri", "description": "Property. URL which provides a description or further information about this item." }, "areaServed": { "type": "string", "description": "Property. The geographic area where a service or offered item is provided. Supersedes serviceArea." }, "availableLanguage": { "description": "Property. Model:'http://schema.org/availableLanguage'. A language someone may use with or at the item, service or place. Please use one of the language codes from the IETF BCP 47 standard. It is implemented the Text option but it could be also Language", "anyOf": [ { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } ] }, "contactOption": { "description": "Property. Model:'http://schema.org/contactOption'. An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers).", "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "faxNumber": { "type": "string", "description": "Property. Model:'http://schema.org/Text'. The fax number." }, "productSupported": { "type": "string", "description": "Property. Model:'http://schema.org/Text'. The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. \"iPhone\") or a general category of products or services (e.g. \"smartphones\")." }, "availabilityRestriction": { "description": "Relationship. Model:'http://schema.org/hoursAvailable'. This property links a contact point to information about when the contact point is not available. The details are provided using the Opening Hours Specification class.", "anyOf": [ { "type": "array", "description": "Property. Array of identifiers format of any NGSI entity.", "items": { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$" } }, { "type": "array", "description": "Property. Array of identifiers format of any NGSI entity.", "items": { "type": "string", "format": "uri" } } ] } } } } }, "Person-Commons": { "description": "Property. All properties to identify a person according to schema.org", "type": "object", "properties": { "person": { "type": "object", "description": "Property. Model:'https://schema.org/Person'. A person (alive, dead, undead, or fictional).", "properties": { "additionalName": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. An additional name for a Person, can be used for a middle name." }, "familyName": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Family name. In the U.S., the last name of a Person." }, "givenName": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. Given name. In the U.S., the first name of a Person." }, "telephone": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. The telephone number." }, "email": { "$ref": "#/definitions/email" } } } } }, "Extensible-Commons": { "description": "Property. All properties to allow interoperability with TMForum Open-APIs", "type": "object", "properties": { "Addressable": { "type": "object", "description": "Base schema for addressable entities", "properties": { "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "id": { "type": "string", "description": "unique identifier" } } }, "Extensible": { "type": "object", "description": "Base Extensible schema for use in TMForum Open-APIs", "properties": { "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } }, "dependencies": { "@schemaLocation": [ "@baseType", "@type" ] } } } }, "TimeSeriesAggregation": { "type": "object", "description": "Property. Object defining the temporal processing of a basic property during a period. It provides Maximum, minimum, instant value and average. Attributes using this should be named with the suffix TSA", "properties": { "avgOverTime": { "type": "number" }, "minOverTime": { "type": "number" }, "maxOverTime": { "type": "number" }, "instValue": { "type": "number" } } } } }