ga4gh-beacon / beacon-v2-Models

Models that leverage the Beacon Framework v2
Apache License 2.0
4 stars 7 forks source link

(minor) DUODataUse "modifiers" property definition doubt. #99

Closed redmitry closed 2 years ago

redmitry commented 2 years ago

Hello,

There is a strange construct in the datasets/defaultSchema.json

"modifiers": {
    "type": "array",
    "items": {
        "allOf": [
            {
                "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-framework-v2/main/common/ontologyTerm.json"
            },
            {
                "examples": [
                    {
                        "id": "EFO:0001645"
                    },
                    {
                        "id": "EFO:0001655"
                    }
                ]
            }
        ]
    }
}

IMHO could be more clear:

"modifiers": {
    "type": "array",
    "items": {
        "$ref": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-framework-v2/main/common/ontologyTerm.json"
     },        
     "examples": [
         [ { "id": "EFO:0001645" }, { "id": "EFO:0001655" } ],
         [ { "id": "EFO:0001665" }, { "id": "EFO:0001675" } ]
      ]
}

Note that while there is no validation rules for the example keyword, for instance in the datasets/defaultSchema.json IMO it should be an array also.

Cheers,

Dmitry

mbaudis commented 2 years ago

@redmitry Good catch. This is a remnant from earlier JSON Schema versions which didn’t allow any other argument (examples, definitions…)when using a $ref.

AFAIK

jrambla commented 2 years ago

Solved in #100