Closed JesusMcCloud closed 3 years ago
first of all thanks for your awsome work. we are currently integrating your libraries into one of our android applications. integration is straight forward.
But we also stumbled across the this issue. Using the default code:
chain = DefaultChain.buildVerificationChain(repository)
a validator is created and added to the chain
DefaultSchemaValidationService()
the validate function always fails and sets the error to:
CBOR_DESERIALIZATION_FAILED
and also hides the exception, I would recommend throwing the exception out of the validator. I would also recommend changing the error from CBOR_DESERIALIZATION_FAILED to something like SCHEMA_VALIDATION_FAILED.
The validator can't find the file "json/DCC.combined-schema.json". Also I am unable to provide the file to the validator as i can't find this file ;)
This one is the closest file I could find: https://github.com/ehn-dcc-development/ehn-dcc-schema/blob/release/1.3.0/DCC.combined-schema.json
For our first test we will create a Chain without a validator or with a very basic validator.
Thanks
Thanks for the input!
The file is located in src/commonMain/resources
On Android resource loading like done in the code won't work and the schema validation library does not support .getResourceAsStream
, which would work on Android.
My bad for not considering Android!
Until there's an official fix, you could replace the schema validation service with a NOOP one on Android.
In addition, logging is already making progress.
Commits bb1b569c4d97ebf54066ba81ff76ff3ecc204cc4 and 3cff16fc34f0ae5feff2f53242f5b2bfce1cfc88 should address both issues
perfect thanks will run a new test asap
Currently, both the JVM target and the JS target do not support all JSON schema features. On JS, schema validation is known to not cover all aspects, on the JVM, further investigation is needed.