openMetadataInitiative / openMINDS_SANDS

A metadata model capturing Spatial Anchoring of Neuroscience Data Structures, including brain atlas definitions.
MIT License
12 stars 11 forks source link

[bug ?] coordinate points json schema discrepency? #150

Open xgui3783 opened 2 years ago

xgui3783 commented 2 years ago

per https://github.com/HumanBrainProject/openMINDS_SANDS/blob/3602c70/schemas/miscellaneous/coordinatePoint.schema.tpl.json#L8-L16 and https://humanbrainproject.github.io/openMINDS/v3/SANDS/v3/miscellaneous/coordinatePoint.html , it seems CoordinatePoint > coordinates should be of type array, with at least 2, at most 3 items, of type qualitativeValue.

But the generated json schema seems to suggest that it is a single object of type qualitativeValue ?

xgui3783 commented 2 years ago

perhaps related, openMINDS/v3/SANDS/v3/atlas/commonCoordinateSpace.schema.json > properties > https://openminds.ebrains.eu/vocab/axesOrigin > properties > typeOfUncertainty has no type. The object simple reads:

{
    "typeOfUncertainty": {
        "_instruction": "Add the type of uncertainty used for this quantitative value.",
        "_linkedTypes": [
            "https://openminds.ebrains.eu/controlledTerms/TypeOfUncertainty"
        ],
        "description": "Distinct technique used to quantify the uncertainty of a measurement.",
        "title": "typeOfUncertainty"
    }
}
xgui3783 commented 2 years ago

Re second issue (quoted below), I seem to have gleamed some additional information.

It appears the _linkedTypes infer the type?

If that is the case, shouldn't the openminds generator actually populate the schema? Yes it will signficantly increase the size of the json schema, but it is not designed to be human readable any way? in the html generated, it can still rely on the _linkedTypes to create the necessary hyper links?

perhaps related, openMINDS/v3/SANDS/v3/atlas/commonCoordinateSpace.schema.json > properties > https://openminds.ebrains.eu/vocab/axesOrigin > properties > typeOfUncertainty has no type. The object simple reads:

{
    "typeOfUncertainty": {
        "_instruction": "Add the type of uncertainty used for this quantitative value.",
        "_linkedTypes": [
            "https://openminds.ebrains.eu/controlledTerms/TypeOfUncertainty"
        ],
        "description": "Distinct technique used to quantify the uncertainty of a measurement.",
        "title": "typeOfUncertainty"
    }
}
lzehl commented 2 years ago

@xgui3783 thanks for this issue.

For the "_linkedTypes": they indeed infer the type information within the openMINDS syntax. Within JSON-Schema this is resolved in referencing the respective schema type (not including it as a nested schema as it is done for "_embeddedTypes"). @olinux I just realized that we do not make use of "@ref" for linked types in the JSON-Schemas. What was the reason for this decision?

For the CoordinatePoint > coordinates issue: this seems to be indeed an error in the building pipeline: @olinux can you have a look at this?

lzehl commented 2 years ago

@olinux did you have a look yet?