Skip to content

Commit

Permalink
3.3 version IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Hammar committed Nov 30, 2021
1 parent a416302 commit 827ee75
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion api/REST/RealEstateCore_REST_specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _This specification defines the first version of the RealEstateCore REST API._

_It comprises a non-normative section where principles for the REST API is described. And a normative section where requirements for being and API to be "RealEstateCore Compliant" are stated._

_Formally, the API is specified via an Open API Specification (formerly Swagger API) generated from the OWL ontology, and from which the normative requirements section below stems. See [OAS Spec](https://github.com/RealEstateCore/rec/blob/3.2/api/REST/rec-full-v3.2.yaml)._
_Formally, the API is specified via an Open API Specification (formerly Swagger API) generated from the OWL ontology, and from which the normative requirements section below stems. See [OAS Spec](https://github.com/RealEstateCore/rec/blob/3.3/api/REST/rec-full-v3.3.yaml)._

_Throughout this specification RealEstateCore may be abbreviated to REC._

Expand Down
2 changes: 1 addition & 1 deletion api/edge_messages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Edge Message specification is expressed using JSON Schema (see [json-schema.
## Edge Message Walkthrough

The format corresponds to a version of RealEstateCore and is stated at the root of the message, so that different versions devices using different versions can be used next to each other, but still parsed correctly.
`"format": "rec3.2"`
`"format": "rec3.3"`

Edge messages are sent to or from core:Devices. Hence Device Id is also included in the message root.
`"deviceId":"myDeviceId"`
Expand Down
68 changes: 34 additions & 34 deletions api/edge_messages/edge_message.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://w3id.org/rec/edge_message/3.2/",
"$id": "https://w3id.org/rec/edge_message/3.3/",
"type": "object",
"title": "RealEstateCore Edge Message Schema",
"required": [
Expand All @@ -10,18 +10,18 @@
],
"properties": {
"format": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/format",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/format",
"type": "string",
"title": "The Format Schema",
"description": "RealEstateCore edge message version",
"default": "rec3.2",
"default": "rec3.3",
"examples": [
"rec3.2"
"rec3.3"
],
"pattern": "^(.*)$"
},
"deviceId": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/deviceId",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/deviceId",
"type": "string",
"title": "The DeviceId Schema,",
"description": "Either IRI or ID of Device",
Expand All @@ -32,12 +32,12 @@
"pattern": "^(.*)$"
},
"observations": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/observations",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/observations",
"type": "array",
"title": "The Observations Array Schema",
"default": null,
"items": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/observations/items",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/observations/items",
"type": "object",
"title": "The Observation Schema",
"default": null,
Expand All @@ -53,7 +53,7 @@
],
"properties": {
"observationTime": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/observations/items/properties/observationTime",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/observations/items/properties/observationTime",
"type": "string",
"title": "The ObservationTime Schema",
"description": "ISO 8601 date-time string, UTC",
Expand All @@ -65,7 +65,7 @@
"format": null
},
"value": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/observations/items/properties/value",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/observations/items/properties/value",
"type": "number",
"title": "The Value Schema",
"description": "Observed value (number)",
Expand All @@ -75,7 +75,7 @@
]
},
"valueString": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/observations/items/properties/valueString",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/observations/items/properties/valueString",
"type": "string",
"title": "The ValueString Schema",
"description": "Observed value (string)",
Expand All @@ -86,7 +86,7 @@
"pattern": "^(.*)$"
},
"valueBoolean": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/observations/items/properties/valueBoolean",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/observations/items/properties/valueBoolean",
"type": "boolean",
"title": "The ValueBoolean Schema",
"description": "Observed Value (Boolean)",
Expand All @@ -96,7 +96,7 @@
]
},
"quantityKind": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/observations/items/properties/quantityKind",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/observations/items/properties/quantityKind",
"type": "string",
"title": "The QuantityKind Schema",
"description": "quantityKind",
Expand All @@ -108,7 +108,7 @@
"format": "iri"
},
"sensorId": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/observations/items/properties/sensorId",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/observations/items/properties/sensorId",
"type": "string",
"title": "The SensorId Schema",
"description": "IRI or ID of Sensor",
Expand All @@ -122,12 +122,12 @@
}
},
"actuationCommands": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationCommands",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationCommands",
"type": "array",
"title": "The ActuationCommands Array Schema",
"default": null,
"items": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationCommands/items",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationCommands/items",
"type": "object",
"title": "The ActuationCommand Schema",
"default": null,
Expand All @@ -143,7 +143,7 @@
],
"properties": {
"actuationCommandTime": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationCommands/items/properties/actuationCommandTime",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationCommands/items/properties/actuationCommandTime",
"type": "string",
"title": "The ActuationCommandTime Schema",
"description": "DateTime of ActuationCommand (ISO 8601 UTC)",
Expand All @@ -155,7 +155,7 @@
"format": null
},
"actuationCommandId": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationCommands/items/properties/actuationId",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationCommands/items/properties/actuationId",
"type": "string",
"title": "The ActuationCommandId Schema",
"description": "IRI or ID of Actuation",
Expand All @@ -166,7 +166,7 @@
"pattern": "^(.*)$"
},
"actuatorId": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationCommands/items/properties/actuatorId",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationCommands/items/properties/actuatorId",
"type": "string",
"title": "The ActuatorId Schema",
"description": "IRI or ID of Actuator",
Expand All @@ -177,7 +177,7 @@
"pattern": "^(.*)$"
},
"value": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationCommands/items/properties/value",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationCommands/items/properties/value",
"type": "number",
"title": "The Value Schema",
"description": "Value to be actuated, validated with ActuationInterface",
Expand All @@ -187,7 +187,7 @@
]
},
"valueString": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationCommands/items/properties/valueString",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationCommands/items/properties/valueString",
"type": "string",
"title": "The ValueString Schema",
"description": "Value to be actuated, validated with ActuationInterface",
Expand All @@ -198,7 +198,7 @@
"pattern": "^(.*)$"
},
"valueBoolean": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationCommands/items/properties/valueBoolean",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationCommands/items/properties/valueBoolean",
"type": "boolean",
"title": "The ValueBoolean Schema",
"description": "Value to be actuated, validated with ActuationInterface",
Expand All @@ -211,12 +211,12 @@
}
},
"actuationResponses": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationResponses",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationResponses",
"type": "array",
"title": "The ActuationResponses Array Schema",
"default": null,
"items": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationResponses/items",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationResponses/items",
"type": "object",
"title": "The ActuationResponse Schema",
"default": null,
Expand All @@ -228,7 +228,7 @@
],
"properties": {
"actuatorId": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationResponses/items/properties/actuatorId",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationResponses/items/properties/actuatorId",
"type": "string",
"title": "The ActuatorId Schema",
"description": "IRI or ID of Actuator",
Expand All @@ -239,7 +239,7 @@
"pattern": "^(.*)$"
},
"actuationCommandId": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationResponses/items/properties/actuationId",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationResponses/items/properties/actuationId",
"type": "string",
"title": "The ActuationId Schema",
"description": "IRI or ID of Actuation",
Expand All @@ -250,7 +250,7 @@
"pattern": "^(.*)$"
},
"responseCode": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationResponses/items/properties/responseCode",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationResponses/items/properties/responseCode",
"type": "string",
"title": "The ResponseCode Schema",
"description": "Response code from actuator",
Expand All @@ -268,7 +268,7 @@
"pattern": "^(.*)$"
},
"actuationResponseTime": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/actuationResponses/items/properties/actuationResponseTime",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/actuationResponses/items/properties/actuationResponseTime",
"type": "string",
"title": "The ActuationResponseTime Schema",
"description": "Time of ActuationResponse, ISO 8601 UTC",
Expand All @@ -283,12 +283,12 @@
}
},
"exceptions": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/exceptions",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/exceptions",
"type": "array",
"title": "The Exceptions Array Schema",
"default": null,
"items": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/exceptions/items",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/exceptions/items",
"type": "object",
"title": "The Exception Schema",
"default": null,
Expand All @@ -300,7 +300,7 @@
],
"properties": {
"exceptionTime": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/exceptions/items/properties/exceptionTime",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/exceptions/items/properties/exceptionTime",
"type": "string",
"title": "The ExceptionTime Schema",
"description": "Time of Exception, ISO 8601 UTC",
Expand All @@ -312,7 +312,7 @@
"format": null
},
"origin": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/exceptions/items/properties/origin",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/exceptions/items/properties/origin",
"type": "string",
"title": "The Origin Schema",
"description": "The type of device from where the exception originates. \"sensor\" if exception when making observation, \"actuator\" if exception while making actuation",
Expand All @@ -330,7 +330,7 @@
"pattern": "^(.*)$"
},
"id": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/exceptions/items/properties/id",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/exceptions/items/properties/id",
"type": "string",
"title": "The Id Schema",
"description": "IRI or ID of device, sensor or actuator from where the exception originates",
Expand All @@ -341,7 +341,7 @@
"pattern": "^(.*)$"
},
"exception": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/exceptions/items/properties/exception",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/exceptions/items/properties/exception",
"type": "string",
"title": "The ExceptionMessage Schema",
"description": "exceptionMessage, more info about exception",
Expand All @@ -352,7 +352,7 @@
"pattern": "^(.*)$"
},
"retry": {
"$id": "https://w3id.org/rec/edge_message/3.2/#/properties/exceptions/items/properties/retry",
"$id": "https://w3id.org/rec/edge_message/3.3/#/properties/exceptions/items/properties/retry",
"type": "integer",
"title": "The Retry Count Schema",
"description": "Number of retries, if it is a repeating exception",
Expand Down
2 changes: 1 addition & 1 deletion api/edge_messages/edge_message_cloud-to-edge_example.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"format": "rec3.2",
"format": "rec3.3",
"deviceId": "https://recref.com/device/64b65a99-a53c-47f5-b959-1c7a641d82d8",
"actuationCommands":[
{
Expand Down
2 changes: 1 addition & 1 deletion api/edge_messages/edge_message_edge-to-cloud_example.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"format": "rec3.2",
"format": "rec3.3",
"deviceId": "https://recref.com/device/64b65a99-a53c-47f5-b959-1c7a641d82d8",
"observations": [
{
Expand Down
2 changes: 1 addition & 1 deletion ontology/alignments/BrickSchema.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:rec-building="https://w3id.org/rec/building/"
xmlns:cpannotationschema="http://www.ontologydesignpatterns.org/schemas/cpannotationschema.owl#">
<owl:Ontology rdf:about="https://w3id.org/rec/alignments/BrickSchema">
<owl:imports rdf:resource="https://w3id.org/rec/metadata/3.2/"/>
<owl:imports rdf:resource="https://w3id.org/rec/metadata/3.3/"/>
<ns:license rdf:resource="https://opensource.org/licenses/BSD-3-Clause"/>
<ns:license rdf:resource="https://opensource.org/licenses/MIT"/>
<dc:contributor xml:lang="en">Erik Wallin</dc:contributor>
Expand Down

0 comments on commit 827ee75

Please sign in to comment.