eu-digital-green-certificates / dgc-testdata

Repository for storing generated QR code data for testing.
Apache License 2.0
157 stars 218 forks source link

SK: EXPECTEDSCHEMAVALIDATION #357

Open bhavin-qryptal opened 3 years ago

bhavin-qryptal commented 3 years ago

Affected Country: SK

Issue Description

Ref: [SK/2DCode/raw/3.json]

E           jsonschema.exceptions.ValidationError: [{'tg': '840539006', 'vp': '1119305005', 'mp': 'EU/1/21/1529', 'ma': 'ORG-100001699', 'dn': 1, 'sd': 2, 'dt': '2021-03-30', 'co': 'SK', 'is': 'National Health Information Center, Slovakia', 'ci': 'urn:uvci:01:SK:614AF9C2B1BF4C5C85041B14039AD093'}, {'tg': '840539006', 'vp': '1119305005', 'mp': 'EU/1/21/1529', 'ma': 'ORG-100001699', 'dn': 2, 'sd': 2, 'dt': '2021-05-19', 'co': 'SK', 'is': 'National Health Information Center, Slovakia', 'ci': 'urn:uvci:01:SK:614AF9C2B1BF4C5C85041B14039AD093'}] is too long
E           
E           Failed validating 'maxItems' in schema['properties']['v']:
E               {'description': 'Vaccination Group',
E                'items': {'description': 'Vaccination Entry',
E                          'properties': {'ci': {'description': 'Certificate '
E                                                               'Identifier, format as '
E                                                               'per UVCI: Annex 2 in  '
E                                                               'https://ec.europa.eu/health/sites/health/files/ehealth/docs/vaccination-proof_interoperability-guidelines_en.pdf',
E                                                'maxLength': 80,
E                                                'type': 'string'},
E                                         'co': {'description': 'Country of '
E                                                               'Vaccination / Test, '
E                                                               'ISO 3166 alpha-2 '
E                                                               'where possible',
E                                                'pattern': '[A-Z]{1,10}',
E                                                'type': 'string',
E                                                'valueset-uri': 'valuesets/country-2-codes.json'},
E                                         'dn': {'description': 'Dose Number / Total '
E                                                               'doses in Series: '
E                                                               'positive integer',
E                                                'minimum': 1,
E                                                'type': 'integer'},
E                                         'dt': {'description': 'ISO8601 complete '
E                                                               'date: Date of '
E                                                               'Vaccination',
E                                                'format': 'date',
E                                                'type': 'string'},
E                                         'is': {'description': 'Certificate Issuer',
E                                                'maxLength': 80,
E                                                'type': 'string'},
E                                         'ma': {'description': 'EU eHealthNetwork: '
E                                                               'Value Sets for '
E                                                               'Digital Covid '
E                                                               'Certificates. version '
E                                                               '1.0, 2021-04-16, '
E                                                               'section 2.4',
E                                                'type': 'string',
E                                                'valueset-uri': 'valuesets/vaccine-mah-manf.json'},
E                                         'mp': {'description': 'EU eHealthNetwork: '
E                                                               'Value Sets for '
E                                                               'Digital Covid '
E                                                               'Certificates. version '
E                                                               '1.0, 2021-04-16, '
E                                                               'section 2.3',
E                                                'type': 'string',
E                                                'valueset-uri': 'valuesets/vaccine-medicinal-product.json'},
E                                         'sd': {'description': 'Dose Number / Total '
E                                                               'doses in Series: '
E                                                               'positive integer',
E                                                'minimum': 1,
E                                                'type': 'integer'},
E                                         'tg': {'description': 'EU eHealthNetwork: '
E                                                               'Value Sets for '
E                                                               'Digital Covid '
E                                                               'Certificates. version '
E                                                               '1.0, 2021-04-16, '
E                                                               'section 2.1',
E                                                'type': 'string',
E                                                'valueset-uri': 'valuesets/disease-agent-targeted.json'},
E                                         'vp': {'description': 'EU eHealthNetwork: '
E                                                               'Value Sets for '
E                                                               'Digital Covid '
E                                                               'Certificates. version '
E                                                               '1.0, 2021-04-16, '
E                                                               'section 2.2',
E                                                'type': 'string',
E                                                'valueset-uri': 'valuesets/vaccine-prophylaxis.json'}},
E                          'required': ['tg',
E                                       'vp',
E                                       'mp',
E                                       'ma',
E                                       'dn',
E                                       'sd',
E                                       'dt',
E                                       'co',
E                                       'is',
E                                       'ci'],
E                          'type': 'object'},
E                'maxItems': 1,
E                'minItems': 1,
E                'type': 'array'}
E           
E           On instance['v']:
E               [{'ci': 'urn:uvci:01:SK:614AF9C2B1BF4C5C85041B14039AD093',
E                 'co': 'SK',
E                 'dn': 1,
E                 'dt': '2021-03-30',
E                 'is': 'National Health Information Center, Slovakia',
E                 'ma': 'ORG-100001699',
E                 'mp': 'EU/1/21/1529',
E                 'sd': 2,
E                 'tg': '840539006',
E                 'vp': '1119305005'},
E                {'ci': 'urn:uvci:01:SK:614AF9C2B1BF4C5C85041B14039AD093',
E                 'co': 'SK',
E                 'dn': 2,
E                 'dt': '2021-05-19',
E                 'is': 'National Health Information Center, Slovakia',
E                 'ma': 'ORG-100001699',
E                 'mp': 'EU/1/21/1529',
E                 'sd': 2,
E                 'tg': '840539006',
E                 'vp': '1119305005'}]

Proposed Solution

Only one vaccination record should exist in a given DGC.