SvenTiigi / EUDCCKit

EU Digital COVID Certificate Kit for the Apple Platform  (unofficial)
https://sventiigi.github.io/EUDCCKit/
MIT License
30 stars 11 forks source link

Questions regarding current JSON decoding choices #3

Closed ygini closed 3 years ago

ygini commented 3 years ago

Hello

After reviewing the JSON file format pdf (https://ec.europa.eu/health/sites/default/files/ehealth/docs/covid-certificate_json_specification_en.pdf) I have one question: nam/fn and nam/fnt are both reputed mandatories (Exactly 1 (one) non-empty field MUST be provided) but nam/fn is decoded as optional when nam/fnt is decoded a required, is there a reason for that?

SvenTiigi commented 3 years ago

Hi @ygini

The current definition of EUDCC.Name is based on a JSON schema I have downloaded from the EU server which states that there is only one required property fnt (see attached code snippet)

But you are correct that the JSON specification from https://ec.europa.eu/health/sites/default/files/ehealth/docs/covid-certificate_json_specification_en.pdf declares different requirements 🤔

So I think it would be best fitting to change the requirements based on the covid-certificate_json_specification_en.pdf. Additionally I will try to check if there is a way to find the most current JSON specification requirements for the EU Digital COVID Certificate as most of the links I have stored are no longer reachable to download the JSON specification files 😅

"person_name": {
    "description": "Person name: Surname(s), forename(s) - in that order",
    "required": [
        "fnt"
    ],
    "type": "object",
    "properties": {
        "fn": {
            "title": "Surname",
            "description": "The surname or primary name(s) of the person addressed in the certificate",
            "type": "string",
            "maxLength": 80,
            "examples": [
                "d'Červenková Panklová"
            ]
        },
        "fnt": {
            "title": "Standardised surname",
            "description": "The surname(s) of the person, transliterated ICAO 9303",
            "type": "string",
            "pattern": "^[A-Z<]*$",
            "maxLength": 80,
            "examples": [
                "DCERVENKOVA<PANKLOVA"
            ]
        },
        "gn": {
            "title": "Forename",
            "description": "The forename(s) of the person addressed in the certificate",
            "type": "string",
            "maxLength": 80,
            "examples": [
                "Jiřina-Maria Alena"
            ]
        },
        "gnt": {
            "title": "Standardised forename",
            "description": "The forename(s) of the person, transliterated ICAO 9303",
            "type": "string",
            "pattern": "^[A-Z<]*$",
            "maxLength": 80,
            "examples": [
                "JIRINA<MARIA<ALENA"
            ]
        }
    }
},
SvenTiigi commented 3 years ago

Here is the corresponding link to the referenced JSON schema

https://github.com/ehn-dcc-development/ehn-dcc-schema/blob/release/1.3.0/DCC.combined-schema.json#L102

SvenTiigi commented 3 years ago

Closing due inactivity. Feel free to re-open the issue at any time.