ehn-dcc-development / eu-dcc-schema

Schema for the ehn DCC payload
Apache License 2.0
164 stars 59 forks source link

Next #9

Closed dirkx closed 3 years ago

dirkx commented 3 years ago

Made schema work with 3 different validators, added example.json with all the options 'tot the max'

gabywh commented 3 years ago

As I understand this, "nm" would not be needed. Test name and manufacturer is only needed if the test is of type RAT. Sorry, I see that the regulation says "optional for NAAT test" (sic!). Should it also be "RAT name"?

There have been some changes even today on what is optional and not. I will be updating these soon (today, I hope)

For conditional mandatory: the underlying approach / idea for generation was to have any logic and decisions etc ("business rules" if you will) in the generating code and leave the JSON schema as essentially a passive data carrier. The constraints applied in the JSON schema (e.g. maxLength , pattern etc) are there to catch any rogue / outlier elements as a kind of extra safety net.

jschlyter commented 3 years ago

Let's go with what we have here and make a step improvement in the code baseline.

Submit your review and I'll merge (we have a requirement for 2 reviewers for pull to main)

jschlyter commented 3 years ago

@gabywh I pushed some minor test changes, so I your review is required once more - sorry about that.