You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
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"])"
Would configuring CBOR mapper inside DigitalCovidCertificate to cborMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); do the trick in this case?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The text was updated successfully, but these errors were encountered: