Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

DGCBarcodeDecoder fails to decode a valid 1.0.0 test result #79

@aspruds

Description

@aspruds

DGCBarcodeDecoder fails to decode a valid test result which is created using "1.0.0" schema. In particular, field "dr" (Date/Time of Test Result) was valid, but optional field in schema "1.0.0", it is removed in schema "1.3.0". As a result, the decoder now fails. Would it be possible/feasible to support older schemas in addition to "1.3.0"?

Exception
se.digg.dgc.payload.v1.DGCSchemaException: Failed to decode DCC from CBOR encoding
at se.digg.dgc.payload.v1.DigitalCovidCertificate.decode(DigitalCovidCertificate.java:258) ~[dgc-schema-1.0.1.jar:na]
at se.digg.dgc.service.impl.DefaultDGCDecoder.decode(DefaultDGCDecoder.java:71) ~[dgc-create-validate-1.0.1.jar:na]

UnrecognizedPropertyException: Unrecognized field "dr" (class se.digg.dgc.payload.v1.TestEntry), not marked as ignorable (10 known properties: "tt", "tg", "ma", "ci", "is", "co", "tr", "nm", "sc", "tc"])"

Test data
https://github.com/eu-digital-green-certificates/dgc-testdata/blob/main/BG/2DCode/raw/5.json

Schemas
1.0.0: https://github.com/ehn-dcc-development/ehn-dcc-schema/blob/release/1.0.0/DGC.combined-schema.json
1.3.0 (dr is missing): https://github.com/ehn-dcc-development/ehn-dcc-schema/blob/release/1.3.0/DCC.combined-schema.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions