From f6e88ce2dfa7f971c7a74ea3df005b58b7114603 Mon Sep 17 00:00:00 2001 From: Lorenzo Ronzani Date: Tue, 2 Apr 2024 13:39:45 +0200 Subject: [PATCH] Improved the vc schema of the identity --- identity/jsonschema.json | 208 ++++++++++++++++++++++++++++++++++++++- identity/vc-example.json | 4 +- identity/vocab.md | 6 +- 3 files changed, 210 insertions(+), 8 deletions(-) diff --git a/identity/jsonschema.json b/identity/jsonschema.json index f43cecd..7b67354 100644 --- a/identity/jsonschema.json +++ b/identity/jsonschema.json @@ -130,14 +130,216 @@ "type": "string" }, "gender": { - "type": "string" + "type": "string", + "enum": [ + "Male", + "Female", + "Other" + ] }, "birthDate": { "type": "string", - "format": "date-time" + "format": "date" }, "nationality": { - "type": "string" + "type": "string", + "enum": [ + "Afghanistan", + "Albania", + "Algeria", + "Andorra", + "Angola", + "Antigua and Barbuda", + "Argentina", + "Armenia", + "Australia", + "Austria", + "Azerbaijan", + "Bahamas", + "Bahrain", + "Bangladesh", + "Barbados", + "Belarus", + "Belgium", + "Belize", + "Benin", + "Bhutan", + "Bolivia", + "Bosnia and Herzegovina", + "Botswana", + "Brazil", + "Brunei", + "Bulgaria", + "Burkina Faso", + "Burundi", + "Côte d'Ivoire", + "Cabo Verde", + "Cambodia", + "Cameroon", + "Canada", + "Central African Republic", + "Chad", + "Chile", + "China", + "Colombia", + "Comoros", + "Congo (Congo-Brazzaville)", + "Costa Rica", + "Croatia", + "Cuba", + "Cyprus", + "Czechia (Czech Republic)", + "Democratic Republic of the Congo", + "Denmark", + "Djibouti", + "Dominica", + "Dominican Republic", + "Ecuador", + "Egypt", + "El Salvador", + "Equatorial Guinea", + "Eritrea", + "Estonia", + "\"Eswatini (fmr. \"\"Swaziland\"\")\"", + "Ethiopia", + "Fiji", + "Finland", + "France", + "Gabon", + "Gambia", + "Georgia", + "Germany", + "Ghana", + "Greece", + "Grenada", + "Guatemala", + "Guinea", + "Guinea-Bissau", + "Guyana", + "Haiti", + "Holy See", + "Honduras", + "Hungary", + "Iceland", + "India", + "Indonesia", + "Iran", + "Iraq", + "Ireland", + "Israel", + "Italy", + "Jamaica", + "Japan", + "Jordan", + "Kazakhstan", + "Kenya", + "Kiribati", + "Kuwait", + "Kyrgyzstan", + "Laos", + "Latvia", + "Lebanon", + "Lesotho", + "Liberia", + "Libya", + "Liechtenstein", + "Lithuania", + "Luxembourg", + "Madagascar", + "Malawi", + "Malaysia", + "Maldives", + "Mali", + "Malta", + "Marshall Islands", + "Mauritania", + "Mauritius", + "Mexico", + "Micronesia", + "Moldova", + "Monaco", + "Mongolia", + "Montenegro", + "Morocco", + "Mozambique", + "Myanmar (formerly Burma)", + "Namibia", + "Nauru", + "Nepal", + "Netherlands", + "New Zealand", + "Nicaragua", + "Niger", + "Nigeria", + "North Korea", + "North Macedonia", + "Norway", + "Oman", + "Pakistan", + "Palau", + "Palestine State", + "Panama", + "Papua New Guinea", + "Paraguay", + "Peru", + "Philippines", + "Poland", + "Portugal", + "Qatar", + "Romania", + "Russia", + "Rwanda", + "Saint Kitts and Nevis", + "Saint Lucia", + "Saint Vincent and the Grenadines", + "Samoa", + "San Marino", + "Sao Tome and Principe", + "Saudi Arabia", + "Senegal", + "Serbia", + "Seychelles", + "Sierra Leone", + "Singapore", + "Slovakia", + "Slovenia", + "Solomon Islands", + "Somalia", + "South Africa", + "South Korea", + "South Sudan", + "Spain", + "Sri Lanka", + "Sudan", + "Suriname", + "Sweden", + "Switzerland", + "Syria", + "Tajikistan", + "Tanzania", + "Thailand", + "Timor-Leste", + "Togo", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Turkmenistan", + "Tuvalu", + "Uganda", + "Ukraine", + "United Arab Emirates", + "United Kingdom", + "United States of America", + "Uruguay", + "Uzbekistan", + "Vanuatu", + "Venezuela", + "Vietnam", + "Yemen", + "Zambia", + "Zimbabwe" + ] }, "image": { "type": "string" diff --git a/identity/vc-example.json b/identity/vc-example.json index 506c213..e8e3c0f 100644 --- a/identity/vc-example.json +++ b/identity/vc-example.json @@ -2,8 +2,8 @@ "identityNumber": "ab123cd456", "name": "Mario", "surname": "Tanuki", - "gender": "Fluid", + "gender": "Male", "birthDate": "02/04/2024", - "nationality": "Swiss", + "nationality": "Switzerland", "image": "base64 image encoded" } \ No newline at end of file diff --git a/identity/vocab.md b/identity/vocab.md index c17b82f..01e37f0 100644 --- a/identity/vocab.md +++ b/identity/vocab.md @@ -17,9 +17,9 @@ surname of the person as string ``` # gender -gender of the person as string +gender of the person as string from an Enum (Male, Female, Other) ``` - "gender": "Fluid" + "gender": "Male" ``` # birthDate @@ -31,7 +31,7 @@ date of birth of the person as string utc date (like issuanceDate default parame # nationality nationatility of the person as string ``` - "nationality": "Swiss" + "nationality": "Switzerland" ``` # image