Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #137 from ehn-dcc-development/release/1.3.1
Browse files Browse the repository at this point in the history
Release 1.3.1
  • Loading branch information
dslmeinte authored Mar 21, 2022
2 parents a603410 + de3ae37 commit 178c59b
Show file tree
Hide file tree
Showing 39 changed files with 45 additions and 2,617 deletions.
2 changes: 2 additions & 0 deletions DCC.Types.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"type": "object",
"properties": {
"tg": {
"description": "disease or agent targeted",
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/disease-agent-targeted"
},
"tt": {
Expand Down Expand Up @@ -134,6 +135,7 @@
"type": "object",
"properties": {
"tg": {
"description": "disease or agent targeted",
"$ref": "https://id.uvci.eu/DCC.ValueSets.schema.json#/$defs/disease-agent-targeted"
},
"fr": {
Expand Down
8 changes: 6 additions & 2 deletions DCC.combined-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://id.uvci.eu/DCC.combined-schema.json",
"title": "EU DCC",
"description": "EU Digital Covid Certificate",
"$comment": "Schema version 1.3.0",
"$comment": "Schema version 1.3.1",
"type": "object",
"oneOf": [
{
Expand Down Expand Up @@ -38,7 +38,9 @@
"type": "string",
"pattern": "^\\d+.\\d+.\\d+$",
"examples": [
"1.3.0"
"1.0.0",
"1.3.0",
"1.3.1"
]
},
"nam": {
Expand Down Expand Up @@ -221,6 +223,7 @@
"type": "object",
"properties": {
"tg": {
"description": "disease or agent targeted",
"$ref": "#/$defs/disease-agent-targeted"
},
"tt": {
Expand Down Expand Up @@ -278,6 +281,7 @@
"type": "object",
"properties": {
"tg": {
"description": "disease or agent targeted",
"$ref": "#/$defs/disease-agent-targeted"
},
"fr": {
Expand Down
6 changes: 4 additions & 2 deletions DCC.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://id.uvci.eu/DCC.schema.json",
"title": "EU DCC",
"description": "EU Digital Covid Certificate",
"$comment": "Schema version 1.3.0",
"$comment": "Schema version 1.3.1",
"type": "object",
"oneOf": [
{
Expand Down Expand Up @@ -38,7 +38,9 @@
"type": "string",
"pattern": "^\\d+.\\d+.\\d+$",
"examples": [
"1.3.0"
"1.0.0",
"1.3.0",
"1.3.1"
]
},
"nam": {
Expand Down
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ JSON_FILES= *.json \
examples/recovery/*.json \
test/invalid/*.json \
test/valid/*.json \
valuesets/*.json

AJV= ./node_modules/.bin/ajv -c ajv-formats --spec=draft2020 --strict=false


test:: compile validate-valuesets validate-examples check-formatting $(MERGED_SCHEMA)
test:: compile validate-examples check-formatting $(MERGED_SCHEMA)
$(AJV) test -s $(MERGED_SCHEMA) -d "examples/vaccination/*.json" --valid
$(AJV) test -s $(MERGED_SCHEMA) -d "examples/recovery/*.json" --valid
$(AJV) test -s $(MERGED_SCHEMA) -d "examples/test/*.json" --valid
Expand All @@ -41,20 +40,17 @@ check-formatting::
rm $$file.tmp; \
done

validate-examples::
validate-examples:
$(AJV) validate -r "DCC.*.schema.json" -s "DCC.schema.json" -d "examples/vaccination/*.json"
$(AJV) validate -r "DCC.*.schema.json" -s "DCC.schema.json" -d "examples/recovery/*.json"
$(AJV) validate -r "DCC.*.schema.json" -s "DCC.schema.json" -d "examples/test/*.json"

validate-valid-tests::
validate-valid-tests:
$(AJV) validate -r "DCC.*.schema.json" -s "DCC.schema.json" -d "test/valid/*.json"

validate-invalid-tests::
validate-invalid-tests:
$(AJV) test -r "DCC.*.schema.json" -s "DCC.schema.json" -d "test/invalid/*.json" --invalid

validate-valuesets::
$(AJV) validate -s "valueset.json" -d "valuesets/*.json"

$(MERGED_SCHEMA): $(SCHEMATA)
python3 merge.py --id $(MERGED_ID) $(SCHEMATA) | jq . > $@
$(AJV) compile -s $@
Expand All @@ -67,3 +63,4 @@ install-ajv:

clean:
rm -f $(MERGED_SCHEMA)

16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This repository contains a JSON schema for the EU Digital Covid Certificate.

**Schema version:** 1.3.0
**Release date:** 2020-06-11
**Schema version:** 1.3.1
**Release date:** _to be determined_


## Introduction
Expand Down Expand Up @@ -33,22 +33,14 @@ For easy testing, they are combined in:

The rule labeled as `$(MERGED_SCHEMA)` in the [Makefile](./Makefile) makes this target by combining the 4 schema files (“schemata”) mentioned above into one schema file, and also reformatting and validating it.
The [`merge.sh` script](./merge.sh) does the same, but without reformatting and validating the resulting JSON.
This can be useful for development purposes, but make sure to also run `make` prior to committing.
This can be useful for development purposes, but make sure to run `make` prior to committing.

_Note:_ the first 4, non-combined schema files are always leading.


### Value sets

The [value set JSON files](./valuesets) MUST validate against the [`valueset.json` schema file](./valueset.json).
The value set file [`test-manf.json`](./valuesets/test-manf.json) can be generated by running the following CLI command:

$ source valuesets/source-update/update-rat.sh > valuesets/test-manf.json

The `update-rat.sh` shell script retrieves the required information from https://covid-19-diagnostics.jrc.ec.europa.eu/.
This is primarily meant as a tool for whoever is managing the governance of the central deployment.
In particular, this script is _not_ (to be) run by the Makefile, nor the CI.

See https://github.com/ehn-dcc-development/ehn-dcc-valuesets

## Implementation Notes

Expand Down
2 changes: 1 addition & 1 deletion examples/recovery/simple.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion examples/recovery/transliterated.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "ابو بكر محمد بن زكريا الرازي",
"fnt": "ABW<BKR<MXHMD<BN<ZKRYA<ALRAZY",
Expand Down
2 changes: 1 addition & 1 deletion examples/test/simple-naat.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion examples/test/simple-rat.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion examples/test/transliterated.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "ابو بكر محمد بن زكريا الرازي",
"fnt": "ABW<BKR<MXHMD<BN<ZKRYA<ALRAZY",
Expand Down
2 changes: 1 addition & 1 deletion examples/vaccination/simple.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion examples/vaccination/transliterated.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "ابو بكر محمد بن زكريا الرازي",
"fnt": "ABW<BKR<MXHMD<BN<ZKRYA<ALRAZY",
Expand Down
2 changes: 1 addition & 1 deletion test/invalid/empty.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "d'Arsøns - van Halen",
"gn": "François-Joan",
Expand Down
2 changes: 1 addition & 1 deletion test/invalid/invalid_dob.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Jones",
"fnt": "JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/invalid/invalid_dob2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Jones",
"fnt": "JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/invalid/invalid_vac.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/invalid/missing_dob.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Jones",
"fnt": "JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/invalid/missing_fnt.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Jones",
"gn": "Dave",
Expand Down
2 changes: 1 addition & 1 deletion test/valid/R-dates1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/valid/R-dates2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/valid/R-min-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Li",
"fnt": "LI"
Expand Down
2 changes: 1 addition & 1 deletion test/valid/T-naat-min-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Li",
"fnt": "LI"
Expand Down
2 changes: 1 addition & 1 deletion test/valid/T-rat-dates1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/valid/T-rat-dates2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/valid/T-rat-dates3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/valid/T-rat-min-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Li",
"fnt": "LI"
Expand Down
2 changes: 1 addition & 1 deletion test/valid/V-dates1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/valid/V-dates2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Smith-Jones",
"fnt": "SMITH<JONES",
Expand Down
2 changes: 1 addition & 1 deletion test/valid/V-min-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.3.0",
"ver": "1.3.1",
"nam": {
"fn": "Li",
"fnt": "LI"
Expand Down
25 changes: 0 additions & 25 deletions valueset.json

This file was deleted.

Loading

0 comments on commit 178c59b

Please sign in to comment.