Skip to content

Commit

Permalink
Schema update to support nullable values (#16)
Browse files Browse the repository at this point in the history
* Schema update to support nullable values

* Updated schema to make not required fields nullable
  • Loading branch information
oleksandrsarapulovgl authored May 28, 2021
1 parent 5e04b03 commit ff40d87
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions decoder/src/main/java/dgca/verifier/app/decoder/JsonSchema.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ const val JSON_SCHEMA_V1 = "{\n" +
" },\n" +
" \"v\": {\n" +
" \"description\": \"Vaccination Group\",\n" +
" \"type\": \"array\",\n" +
" \"type\": [\"null\", \"array\"],\n" +
" \"items\": {\n" +
" \"\$ref\": \"#/\$defs/vaccination_entry\"\n" +
" },\n" +
" \"minItems\": 1\n" +
" },\n" +
" \"t\": {\n" +
" \"description\": \"Test Group\",\n" +
" \"type\": \"array\",\n" +
" \"type\": [\"null\", \"array\"],\n" +
" \"items\": {\n" +
" \"\$ref\": \"#/\$defs/test_entry\"\n" +
" },\n" +
" \"minItems\": 1\n" +
" },\n" +
" \"r\": {\n" +
" \"description\": \"Recovery Group\",\n" +
" \"type\": \"array\",\n" +
" \"type\": [\"null\", \"array\"],\n" +
" \"items\": {\n" +
" \"\$ref\": \"#/\$defs/recovery_entry\"\n" +
" },\n" +
Expand All @@ -84,30 +84,30 @@ const val JSON_SCHEMA_V1 = "{\n" +
" \"\$defs\": {\n" +
" \"dose_posint\": {\n" +
" \"description\": \"Dose Number / Total doses in Series: positive integer, range: [1,9]\",\n" +
" \"type\": \"integer\",\n" +
" \"type\": [\"null\", \"integer\"],\n" +
" \"minimum\": 1,\n" +
" \"maximum\": 9\n" +
" },\n" +
" \"country_vt\": {\n" +
" \"description\": \"Country of Vaccination / Test, ISO 3166 where possible\",\n" +
" \"type\": \"string\"\n" +
" \"type\": [\"null\", \"string\"]\n" +
" },\n" +
" \"issuer\": {\n" +
" \"description\": \"Certificate Issuer\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"maxLength\": 50\n" +
" },\n" +
" \"person_name\": {\n" +
" \"description\": \"Person name: Surname(s), given name(s) - in that order\",\n" +
" \"required\": [\n" +
" \"fnt\"\n" +
" ],\n" +
" \"type\": \"object\",\n" +
" \"type\": [\"null\", \"object\"],\n" +
" \"properties\": {\n" +
" \"fn\": {\n" +
" \"title\": \"Family name\",\n" +
" \"description\": \"The family or primary name(s) of the person addressed in the certificate\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"maxLength\": 50,\n" +
" \"examples\": [\n" +
" \"d'Červenková Panklová\"\n" +
Expand All @@ -125,7 +125,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" \"gn\": {\n" +
" \"title\": \"Given name\",\n" +
" \"description\": \"The given name(s) of the person addressed in the certificate\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"maxLength\": 50,\n" +
" \"examples\": [\n" +
" \"Jiřina-Maria Alena\"\n" +
Expand All @@ -134,7 +134,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" \"gnt\": {\n" +
" \"title\": \"Standardised given name\",\n" +
" \"description\": \"The given name(s) of the person transliterated\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"maxLength\": 50,\n" +
" \"examples\": [\n" +
" \"JIRINA<MARIA<ALENA\"\n" +
Expand All @@ -144,7 +144,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" },\n" +
" \"certificate_id\": {\n" +
" \"description\": \"Certificate Identifier, format as per UVCI: Annex 2 in https://ec.europa.eu/health/sites/health/files/ehealth/docs/vaccination-proof_interoperability-guidelines_en.pdf\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"maxLength\": 50\n" +
" },\n" +
" \"vaccination_entry\": {\n" +
Expand All @@ -161,7 +161,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" \"is\",\n" +
" \"ci\"\n" +
" ],\n" +
" \"type\": \"object\",\n" +
" \"type\": [\"null\", \"object\"],\n" +
" \"properties\": {\n" +
" \"tg\": {\n" +
" \"description\": \"disease or agent targeted\",\n" +
Expand Down Expand Up @@ -219,7 +219,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" \"is\",\n" +
" \"ci\"\n" +
" ],\n" +
" \"type\": \"object\",\n" +
" \"type\": [\"null\", \"object\"],\n" +
" \"properties\": {\n" +
" \"tg\": {\n" +
" \"\$ref\": \"#/\$defs/disease-agent-targeted\"\n" +
Expand All @@ -230,7 +230,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" },\n" +
" \"nm\": {\n" +
" \"description\": \"NAA Test Name\",\n" +
" \"type\": \"string\"\n" +
" \"type\": [\"null\", \"string\"]\n" +
" },\n" +
" \"ma\": {\n" +
" \"description\": \"RAT Test name and manufacturer\",\n" +
Expand All @@ -243,7 +243,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" },\n" +
" \"dr\": {\n" +
" \"description\": \"Date/Time of Test Result\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"format\": \"date-time\"\n" +
" },\n" +
" \"tr\": {\n" +
Expand All @@ -252,7 +252,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" },\n" +
" \"tc\": {\n" +
" \"description\": \"Testing Centre\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"maxLength\": 50\n" +
" },\n" +
" \"co\": {\n" +
Expand Down Expand Up @@ -280,7 +280,7 @@ const val JSON_SCHEMA_V1 = "{\n" +
" \"du\",\n" +
" \"ci\"\n" +
" ],\n" +
" \"type\": \"object\",\n" +
" \"type\": [\"null\", \"object\"],\n" +
" \"properties\": {\n" +
" \"tg\": {\n" +
" \"\$ref\": \"#/\$defs/disease-agent-targeted\"\n" +
Expand Down Expand Up @@ -316,32 +316,32 @@ const val JSON_SCHEMA_V1 = "{\n" +
" },\n" +
" \"disease-agent-targeted\": {\n" +
" \"description\": \"EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.1\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"valueset-uri\": \"valuesets/disease-agent-targeted.json\"\n" +
" },\n" +
" \"vaccine-prophylaxis\": {\n" +
" \"description\": \"EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.2\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"valueset-uri\": \"valuesets/vaccine-prophylaxis.json\"\n" +
" },\n" +
" \"vaccine-medicinal-product\": {\n" +
" \"description\": \"EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.3\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"valueset-uri\": \"valuesets/vaccine-medicinal-product.json\"\n" +
" },\n" +
" \"vaccine-mah-manf\": {\n" +
" \"description\": \"EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.4\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"valueset-uri\": \"valuesets/vaccine-mah-manf.json\"\n" +
" },\n" +
" \"test-manf\": {\n" +
" \"description\": \"EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.8\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"valueset-uri\": \"valuesets/test-manf.json\"\n" +
" },\n" +
" \"test-result\": {\n" +
" \"description\": \"EU eHealthNetwork: Value Sets for Digital Green Certificates. version 1.0, 2021-04-16, section 2.9\",\n" +
" \"type\": \"string\",\n" +
" \"type\": [\"null\", \"string\"],\n" +
" \"valueset-uri\": \"valuesets/test-results.json\"\n" +
" }\n" +
" }\n" +
Expand Down

0 comments on commit ff40d87

Please sign in to comment.