ehn-dcc-development / hcert-kotlin

Kotlin multiplatform implementation of the HCERT/DCC specification
Apache License 2.0
25 stars 25 forks source link

Missing default value for TC for schema validation #39

Closed Alival-IT closed 3 years ago

Alival-IT commented 3 years ago

@nodh

if you scan a code with missing test facility, the validation fails. the fix is to define the default value as null

@SerialName("tc")
val testFacility: String? = null,

i think the default values are needed, or kotlinx serialization can enable the null validation/parsing

you can test it here https://github.com/eu-digital-green-certificates/dcc-quality-assurance/blob/main/SI/1.3.0/specialcases/TEST-AG.png