From baf5c1e924c8a19cb8eec7d35dae268f51a8d13c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Sat, 9 Nov 2024 19:00:39 +0100 Subject: [PATCH] fix schema workbench and credential --- idhub/templates/credentials/snapshot.json | 10 ++++------ schemas/{snapshot.json => workbench.json} | 14 +++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) rename schemas/{snapshot.json => workbench.json} (79%) diff --git a/idhub/templates/credentials/snapshot.json b/idhub/templates/credentials/snapshot.json index 7d9ded3..2781a23 100644 --- a/idhub/templates/credentials/snapshot.json +++ b/idhub/templates/credentials/snapshot.json @@ -4,11 +4,10 @@ "https://idhub.pangea.org/context/base.jsonld", "https://idhub.pangea.org/context/snapshot.jsonld" ], - "id": "{{ vc_id }}", + "id": "urn:uuid:{{ vc_id }}", "type": [ "VerifiableCredential", - "VerifiableAttestation", - "Snapshot" + "DeviceSnapshot" ], "issuer": { "id": "{{ issuer_did }}", @@ -16,7 +15,6 @@ }, "issuanceDate": "{{ issuance_date }}", "validFrom": "{{ issuance_date }}", - "validUntil": "{{ validUntil }}", "name": [ { "value": "Snapshot of Workbench script", @@ -36,7 +34,7 @@ "software": "{{ software }}", "timestamp": "{{ timestamp }}", "data": "{{ data }}", - "erase": "{{ erase }}" + "dataDeletion": "{{ erase }}" }, "credentialStatus": { "id": "{{ credential_status_id}}", @@ -44,7 +42,7 @@ "revocationBitmapIndex": "{{ id_credential }}" }, "credentialSchema": { - "id": "https://idhub.pangea.org/vc_schemas/snapshot.json", + "id": "https://idhub.pangea.org/vc_schemas/v1/workbench.json", "type": "FullJsonSchemaValidator2021" } } diff --git a/schemas/snapshot.json b/schemas/workbench.json similarity index 79% rename from schemas/snapshot.json rename to schemas/workbench.json index 7fea9c8..128e1c5 100644 --- a/schemas/snapshot.json +++ b/schemas/workbench.json @@ -1,7 +1,7 @@ { - "$id": "https://idhub.pangea.org/vc_schemas/v1/snapshot.json", + "$id": "https://idhub.pangea.org/vc_schemas/v1/workbench.json", "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "Snapshot", + "title": "DeviceSnapshot", "description": "Snapshot create by workbench-script, software for discover hardware in one device.", "name": [ { @@ -12,16 +12,16 @@ "type": "object", "allOf": [ { - "$ref": "https://idhub.pangea.org/vc_schemas/ebsi/attestation.json" + "$ref": "https://www.w3.org/2018/credentials/v1" }, { "properties": { "credentialSubject": { - "description": "Defines additional properties on credentialSubject", + "description": "Define the properties of a digital device snapshot", "type": "object", "properties": { "id": { - "description": "Defines a hash of token sign_token", + "description": "Defines a hash of id token", "type": "string", "minLength": 36 }, @@ -47,13 +47,13 @@ }, "timestamp": { "description": "Time when is make this snapshot.", - "type": "string" + "type": "date-time" }, "data": { "description": "Device details discovery data.", "type": "string", }, - "erase": { + "dataDeletion": { "description": "Datas of erase disk process", "type": "string", "minLength": 0