From fb19dc8b673de9d28ec57311fe1d89b8857558b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=B6sel?= Date: Fri, 17 Feb 2023 11:54:26 +0100 Subject: [PATCH 1/2] rework of Program & ProgramRequest for NGSI-LD --- Program/schema.json | 59 +++++++++++++++------------------ ProgramRequest/schema.json | 67 ++++++++++++++++++++++++-------------- 2 files changed, 70 insertions(+), 56 deletions(-) diff --git a/Program/schema.json b/Program/schema.json index 3c77d37..0cd519d 100644 --- a/Program/schema.json +++ b/Program/schema.json @@ -1,15 +1,10 @@ { "$schema": "http://json-schema.org/schema", - "$schemaVersion": "0.0.1", - "$id": "https://smart-data-models.github.io/TrafficManagement/Program/schema.json", - "title": "Smart Data models -Program schema\",", - "description": "description of a program variable message signs", + "$schemaVersion": "0.0.2", + "$id": "https://smart-data-models.github.io/dataModel.Traffic/Program/schema.json", + "title": "Smart Data models Program schema", + "description": "This is the data model for representing description of a Traffic Sign Program", "type": "object", - "required": [ - "id", - "type", - "status" - ], "allOf": [ { "$ref1": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" @@ -21,35 +16,35 @@ "properties": { "status": { "type": "string", + "description": "Property. The status program", "enum": [ - "deleted", - "unknown", - "ready", - "inPreparation", - "waiting", - "active" + "DELETED", + "UNKNOWN", + "READY", + "INPREPERATION", + "WAITING", + "ACTIVE" ] }, - "lastErrorMessage": { - "type": "string" + "name": { + "type": "string", + "description": "Property. Model:'https://schema.org/Text'. The name of the program - the pid is encoded into the id." }, - "executionResultCode": { + "comment": { "type": "string", - "enum": [ - "working", - "prepared", - "ok", - "error", - "timeout", - "canceled" - ] + "description": "Property. Model:'https://schema.org/Text'. A comment to the program." + }, + "programGroup": { + "type": "string", + "description": "Property. Model:'https://schema.org/Text'. The name of program group this program belongs to." } - }, - "required": [ - "id", - "type" - ], - "": {} + } } + ], + "required": [ + "id", + "type", + "name", + "status" ] } \ No newline at end of file diff --git a/ProgramRequest/schema.json b/ProgramRequest/schema.json index 3f0a962..368ceed 100644 --- a/ProgramRequest/schema.json +++ b/ProgramRequest/schema.json @@ -1,44 +1,63 @@ { "$schema": "http://json-schema.org/schema", - "$schemaVersion": "0.0.1", - "$id": "https://smart-data-models.github.io/TrafficManagement/ProgramRequest/schema.json", - "title": "Smart Data models -ProgramRequest schema\",", - "description": "description of a request for a program", + "$schemaVersion": "0.0.2", + "$id": "https://smart-data-models.github.io/dataModel.Traffic/ProgramRequest/schema.json", + "title": "Smart Data models ProgramRequest schema", + "description": "This is the data model for representing description of a ProgramRequest", "type": "object", - "required": [ - "id", - "type", - "refProgram", - "status" - ], "allOf": [ { - "$ref1": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" + "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons", + "description:All from GSMA-Commons ": {} + }, + { + "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons", + "description:All from Location-Commons ": {} }, { "properties": { "refProgram": { - "type": "string" + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/EntityIdentifierType" + } + ], + "description": "Property. Relationship. Model of the program" }, "initiator": { - "type": "string" + "type": "string", + "description": "Property. Model:'https://schema.org/Text'. The person or organisation, that initiated this request" }, "status": { "type": "string", "enum": [ - "new", - "waiting", - "executed", - "rejected" + "NEW", + "WAITING", + "EXECUTED", + "REJECTED" ], - "": {} + "description": "Property. Model:'https://schema.org/Text'. The current status of this programRequest" + }, + "action": { + "type": "string", + "enum": [ + "DEACTIVATE", + "ACTIVATE" + ], + "description": "Property. Model:'https://schema.org/Text'. The action this request calls for - default is ACTIVATE." } - }, - "required": [ - "id", - "type" - ], - "": {} + } } + ], + "required": [ + "id", + "type", + "name", + "refProgram", + "status" ] } \ No newline at end of file From 3287a9d0036cc835eb0bd6a3a3bcf2a5df4b370a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=B6sel?= Date: Fri, 17 Feb 2023 17:29:09 +0100 Subject: [PATCH 2/2] Attribute "name" & "comment" entfernt, stattdessen werden die Attribut "name" & "description" aus GSMA Commons verwendet --- Program/schema.json | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Program/schema.json b/Program/schema.json index 0cd519d..dd99711 100644 --- a/Program/schema.json +++ b/Program/schema.json @@ -26,15 +26,7 @@ "ACTIVE" ] }, - "name": { - "type": "string", - "description": "Property. Model:'https://schema.org/Text'. The name of the program - the pid is encoded into the id." - }, - "comment": { - "type": "string", - "description": "Property. Model:'https://schema.org/Text'. A comment to the program." - }, - "programGroup": { + "programGroup": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. The name of program group this program belongs to." } @@ -44,7 +36,6 @@ "required": [ "id", "type", - "name", "status" ] } \ No newline at end of file