From 140114824730fa529077b8db0fe7e306574a8a40 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 27 Feb 2024 10:28:14 +0100 Subject: [PATCH] new schemas --- schemas/course-credential.json | 34 ++++++++++++++++--------- schemas/e-operator-claim.json | 16 +++++++----- schemas/federation-membership.json | 35 +++++++++++++++---------- schemas/financial-vulnerability.json | 38 ++++++++++++++++++---------- schemas/membership-card.json | 20 ++++++++++----- 5 files changed, 92 insertions(+), 51 deletions(-) diff --git a/schemas/course-credential.json b/schemas/course-credential.json index 3d3d26a..6efce05 100644 --- a/schemas/course-credential.json +++ b/schemas/course-credential.json @@ -1,5 +1,5 @@ { - "$id": "https://idhub.pangea.org/vc_schemas/course-credential.json", + "$id": "https://idhub.pangea.org/vc_schemas/course-credential", "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "NGO Course Credential Schema", "description": "A NGO Course Credential Schema awarded by a NGO federation and their NGO members, as proposed by Lafede.cat", @@ -30,44 +30,54 @@ "properties": { "id": { "description": "Defines a unique identifier (DID) of the credential subject: the credential of a completed course by a student", - "type": "string" + "type": "string", + "minLength": 1 }, "firstName": { "type": "string", - "description": "The first name of the student" + "description": "The first name of the student", + "minLength": 1 }, "lastName": { "type": "string", - "description": "The family name of the student" + "description": "The family name of the student", + "minLength": 1 }, "email": { "type": "string", - "format": "email" + "format": "email", + "pattern": "^\\S+@\\S+\\.\\S+$" }, "personalIdentifier": { "type": "string", - "description": "The personal identifier of the student, such as ID number" + "description": "The personal identifier of the student, such as ID number", + "minLength": 1 }, "issuedDate": { "type": "string", "description": "The date the credential was issued", - "format": "date" + "format": "date", + "minLength": 1 }, "modeOfInstruction": { "type": "string", - "description": "The mode of instruction: online, in-person, etc." + "description": "The mode of instruction: online, in-person, etc.", + "minLength": 1 }, "courseDuration": { "type": "integer", - "description": "The duration of the course in hours" + "description": "The duration of the course in hours", + "minLength": 1 }, "courseDays": { "type": "integer", - "description": "The number of days the course lasts" + "description": "The number of days the course lasts", + "minLength": 1 }, "courseName": { "type": "string", - "description": "The name of the course" + "description": "The name of the course", + "minLength": 1 }, "courseDescription": { "type": "string", @@ -103,7 +113,7 @@ "description": "The framework in which the course belongs to" }, "courseCredits": { - "type": ["number", "string"], + "type": "integer", "description": "The number of (ECTS) credits awarded for the course" }, "dateOfAssessment": { diff --git a/schemas/e-operator-claim.json b/schemas/e-operator-claim.json index d2757b6..ab3dfed 100644 --- a/schemas/e-operator-claim.json +++ b/schemas/e-operator-claim.json @@ -30,19 +30,23 @@ "properties": { "id": { "description": "Defines a unique identifier of the credential subject", - "type": "string" + "type": "string", + "minLength": 1 }, "legalName": { "description": "Legal name of the operator", - "type": "string" + "type": "string", + "minLength": 1 }, "role": { "description": "Role, either operator, witness, auditor", - "type": "string" + "type": "string", + "minLength": 1 }, "email": { "type": "string", - "format": "email" + "format": "email", + "pattern": "^\\S+@\\S+\\.\\S+$" }, "accreditedBy": { "description": "Legal name of the accrediting entity", @@ -50,11 +54,11 @@ }, "operatorNumber": { "description": "Operator number awarded by accrediting entity", - "type": ["number", "string"] + "type": "string" }, "limitJurisdiction": { "description": "Regional scope", - "type": ["number", "string"] + "type": "string" }, "accreditedFor": { "description": "Operation type: e.g. manufacture, repair, refurbishment, remanufacture, transport, dismantle, recycle, verification, audit", diff --git a/schemas/federation-membership.json b/schemas/federation-membership.json index 50ce7b5..88fd856 100644 --- a/schemas/federation-membership.json +++ b/schemas/federation-membership.json @@ -30,15 +30,18 @@ "properties": { "id": { "description": "Defines a unique identifier of the credential subject", - "type": "string" + "type": "string", + "minLength": 1 }, "federation": { "description": "Federation the credential subject is affiliated with", - "type": "string" + "type": "string", + "minLength": 1 }, "legalName": { "description": "Legal name of the affiliated organisation", - "type": "string" + "type": "string", + "minLength": 1 }, "shortName": { "description": "Short name of the organisation of the affiliated organisation", @@ -46,7 +49,7 @@ }, "registrationIdentifier": { "description": "Registration identifier of the affiliated organisation", - "type": ["number", "string"] + "type": "string" }, "publicRegistry": { "description": "Registry where the affiliated organisation is registered: 'Generalitat de Catalunya', 'Ministerio del interior de EspaƱa'", @@ -58,19 +61,22 @@ }, "postCode": { "description": "Postal code of the member organisation", - "type": ["number", "string"] + "type": "string", + "minLength": 1 }, "city": { "description": "City of the member organisation", - "type": "string" + "type": "string", + "minLength": 1 }, "taxReference": { "description": "Tax reference as VAT registration of the member organisation", - "type": ["number", "string"] + "type": "string" }, "membershipType": { "description": "Type of membership: full / observer", - "type": "string" + "type": "string", + "minLength": 1 }, "membershipStatus": { "description": "Type of membership: active / suspended, etc.", @@ -78,18 +84,20 @@ }, "membershipId": { "description": "Membership identifier: an internal unique number or code", - "type": ["number", "string"] + "type": "string" }, "membershipSince": { "type": "string", - "format": "date" + "format": "date", + "minLength": 1 }, "email": { "type": "string", - "format": "email" + "format": "email", + "pattern": "^\\S+@\\S+\\.\\S+$" }, "phone": { - "type": ["number", "string"] + "type": "string" }, "website": { "type": "string", @@ -101,7 +109,8 @@ }, "certificationDate": { "type": "string", - "format": "date" + "format": "date", + "minLength": 1 } }, "required": [ diff --git a/schemas/financial-vulnerability.json b/schemas/financial-vulnerability.json index 63850ff..dfc25d0 100644 --- a/schemas/financial-vulnerability.json +++ b/schemas/financial-vulnerability.json @@ -30,56 +30,68 @@ "properties": { "id": { "description": "Defines a unique identifier (DID) of the credential subject", - "type": "string" + "type": "string", + "minLength": 1 }, "firstName": { "description": "Name of the credential subject", - "type": "string" + "type": "string", + "minLength": 1 }, "lastName": { "description": "Surname of the credential subject", - "type": "string" + "type": "string", + "minLength": 1 }, "email": { "type": "string", - "format": "email" + "format": "email", + "pattern": "^\\S+@\\S+\\.\\S+$" }, "phoneNumber": { - "type": ["number", "string"] + "type": "string" }, "identityDocType": { "description": "Type of the Identity Document of the credential subject", - "type": "string" + "type": "string", + "minLength": 1 }, "identityNumber": { "description": "Number of the Identity Document of the credential subject", - "type": "string" + "type": "string", + "minLength": 1 }, "streetAddress": { "description": "Postal address of the credential Subject", - "type": "string" + "type": "string", + "minLength": 1 }, "socialWorkerName": { "description": "Name of the social worker that support the vulnerable person/family", - "type": "string" + "type": "string", + "minLength": 1 }, "socialWorkerSurname": { "description": "Surname of the social worker that support the vulnerable person/family", - "type": "string" + "type": "string", + "minLength": 1 }, "financialVulnerabilityScore": { "description": "Measure of an individual's susceptibility to financial hardship", - "type": ["number", "string"] + "type": "string", + "minLength": 1 }, "amountCoveredByOtherAids": { - "type": ["number", "string"] + "type": "string", + "minLength": 1 }, "connectivityOptionList": { "type": "string" }, "assessmentDate": { "type": "string", - "format": "date" + "format": "date", + "minLength": 1 } }, "required": [ diff --git a/schemas/membership-card.json b/schemas/membership-card.json index eb19695..2a4a793 100644 --- a/schemas/membership-card.json +++ b/schemas/membership-card.json @@ -30,11 +30,13 @@ "properties": { "id": { "description": "Defines a unique identifier of the credential subject", - "type": "string" + "type": "string", + "minLength": 1 }, "organisation": { "description": "Organisation the credential subject is affiliated with", - "type": "string" + "type": "string", + "minLength": 1 }, "membershipType": { "description": "Type of membership", @@ -42,11 +44,12 @@ }, "membershipId": { "description": "Membership identifier", - "type": ["number", "string"] + "type": "string" }, "affiliatedSince": { "type": "string", - "format": "date" + "format": "date", + "minLength": 1 }, "affiliatedUntil": { "type": "string", @@ -57,7 +60,8 @@ "enum": [ "natural", "legal" - ] + ], + "minLength": 1 }, "identityDocType": { "description": "Type of the Identity Document of the credential subject", @@ -69,7 +73,8 @@ }, "firstName": { "description": "Name of the natural person or name of the legal person (organisation)", - "type": "string" + "type": "string", + "minLength": 1 }, "lastName": { "type": "string" @@ -79,7 +84,8 @@ }, "email": { "type": "string", - "format": "email" + "format": "email", + "pattern": "^\\S+@\\S+\\.\\S+$" } }, "required": [