Closed ahwagner closed 1 year ago
Hi @ahwagner
The difference is not that big as it looked like in the Files changed
tab. I applied some formatting on the JSON schema files, resulting on adding/removing a lot of white spaces. That is why GitHub diff viewer is freaking out. You can choose to ignore whitespace changes by clicking on the checkbox, as outlined in the picture below:
There is little to no change when whitespaces are ignored. Sorry for the confusion..
The real change affects only one line:
"$schema": "https://json-schema.org/draft/2019-09/schema#"
vrs.json
from your PR - "$schema": "http://json-schema.org/draft-07/schema"
PXF version uses HTTPS and later JSON schema specs (I am not aware of the significance of the trailing #
char).
So, the only real difference is the JSON schema specs version. I am not sure why/who/how the $schema
got "updated", but the obvious solution is to use draft-07
, as it corresponds to the published version. The JSON schema library we use under the hood can manage different schema version in validation of a single JSON document.
Therefore, I think we should accept your PR & merge.
Hi @ahwagner @pnrobinson there are some more things that need to be resolved wrt. vrs.json
.
First, @ahwagner we cannot use the vrs.json
you shared to validate phenopacket-schema v2.0.2
(latest). We deployed the Java artifact into Maven central in June 2022. Since phenopacket-schema repository references/imports vrs repository, whichever vrs version was current as of June 2022, that is the version now associated with phenopacket-schema v2.0.2
. Therefore, I cannot use the vrs.json schema which you recently shared as it produces false validation errors. I must use the version from June 2022. It seems like the last main
commit is ae5662efa5bb5befe876747efd9cb0335ba5becc
; I will check it out and use whichever vrs.json
I find there in the phenopacket validator.
Second, I will have to update the JSON schema version to 2019-09
. I thought the JSON schema validator library would let us use different schemas, but it won't. I was wrong..
Please let me know if you have any comments/thoughts.
The issue above in pictures.
VRS proto specs embedded in phenopacket-schema v2.0.2
:
And the current VRS JSON schema:
They're incompatible.
These are not incompatible. These differences were expected and intentional through conversation between @julesjacobsen, @pnrobinson, and I when building VRS Protobuf for Phenopackets v2. I think we should schedule a meeting to work through this so we are all on the same page.
@pnrobinson here is a PR for the exact vrs.json file used to support the Phenopackets v2 spec.