HumanBrainProject / openMINDS

openMINDS comprises a set of metadata models for research products in the field of neuroscience.
MIT License
40 stars 13 forks source link

internalIdentifier is a required field but it is not described in the properties #6

Closed xgui3783 closed 3 years ago

xgui3783 commented 3 years ago

as of a8d67d1f4598174dec079a1aa75fc50c720e2c24, for example

in action artefact, after unzipping, annotation.schema.json looks like the following:

{
    "$id": "https://openminds.ebrains.eu/sands/v1.0/annotation?format=json-schema",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "description": "Structured information describing an annotation.",
    "properties": {
        "@id": {
            "description": "Metadata node identifier.",
            "type": "string"
        },
        "@type": {
            "const": "https://openminds.ebrains.eu/sands/Annotation",
            "type": "string"
        },
        "bestViewPoint": {
            "_instruction": "Add the coordinate point identifying the best view of this annotation in space.",
            "else": {
                "properties": {
                    "@id": {
                        "format": "iri",
                        "type": "string"
                    }
                },
                "required": [
                    "@id"
                ]
            },
            "if": {
                "required": [
                    "@type"
                ]
            },
            "then": {
                "properties": {
                    "@id": {
                        "format": "iri",
                        "type": "string"
                    },
                    "@type": {
                        "enum": [
                            "https://openminds.ebrains.eu/sands/CoordinatePoint"
                        ],
                        "format": "iri",
                        "type": "string"
                    }
                },
                "required": [
                    "@id"
                ]
            },
            "type": "object"
        },
        "criteria": {
            "_instruction": "Add the protocol execution defining the criteria that were applied to produce this annotation.",
            "else": {
                "properties": {
                    "@id": {
                        "format": "iri",
                        "type": "string"
                    }
                },
                "required": [
                    "@id"
                ]
            },
            "if": {
                "required": [
                    "@type"
                ]
            },
            "then": {
                "properties": {
                    "@id": {
                        "format": "iri",
                        "type": "string"
                    },
                    "@type": {
                        "enum": [
                            "https://openminds.ebrains.eu/core/ProtocolExecution"
                        ],
                        "format": "iri",
                        "type": "string"
                    }
                },
                "required": [
                    "@id"
                ]
            },
            "type": "object"
        },
        "criteriaQualityType": {
            "_instruction": "Add the quality type of the stated criteria used to define this annotation.",
            "else": {
                "properties": {
                    "@id": {
                        "format": "iri",
                        "type": "string"
                    }
                },
                "required": [
                    "@id"
                ]
            },
            "if": {
                "required": [
                    "@type"
                ]
            },
            "then": {
                "properties": {
                    "@id": {
                        "format": "iri",
                        "type": "string"
                    },
                    "@type": {
                        "enum": [
                            "https://openminds.ebrains.eu/controlledTerms/CriteriaQualityType"
                        ],
                        "format": "iri",
                        "type": "string"
                    }
                },
                "required": [
                    "@id"
                ]
            },
            "type": "object"
        },
        "displayColor": {
            "_instruction": "Enter the preferred display color (RGB) for this annotation.",
            "items": {
                "maximum": 255,
                "minimum": 0,
                "type": "integer"
            },
            "maxItems": 3,
            "minItems": 3,
            "type": "array"
        },
        "inspiredBy": {
            "_instruction": "Add one or several (source) images that inspired the definition of this annotation.",
            "items": {
                "else": {
                    "properties": {
                        "@id": {
                            "format": "iri",
                            "type": "string"
                        }
                    },
                    "required": [
                        "@id"
                    ]
                },
                "if": {
                    "required": [
                        "@type"
                    ]
                },
                "then": {
                    "properties": {
                        "@id": {
                            "format": "iri",
                            "type": "string"
                        },
                        "@type": {
                            "enum": [
                                "https://openminds.ebrains.eu/sands/Image"
                            ],
                            "format": "iri",
                            "type": "string"
                        }
                    },
                    "required": [
                        "@id"
                    ]
                }
            },
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
        },
        "internalFileIdentifier": {
            "_instruction": "Enter the identifier used for this annotation within the file it is stored in.",
            "type": "string"
        },
        "laterality": {
            "_instruction": "Add one or both sides of the body or bilateral organ that this annotation is defined in.",
            "items": {
                "else": {
                    "properties": {
                        "@id": {
                            "format": "iri",
                            "type": "string"
                        }
                    },
                    "required": [
                        "@id"
                    ]
                },
                "if": {
                    "required": [
                        "@type"
                    ]
                },
                "then": {
                    "properties": {
                        "@id": {
                            "format": "iri",
                            "type": "string"
                        },
                        "@type": {
                            "enum": [
                                "https://openminds.ebrains.eu/controlledTerms/Laterality"
                            ],
                            "format": "iri",
                            "type": "string"
                        }
                    },
                    "required": [
                        "@id"
                    ]
                }
            },
            "maxItems": 2,
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
        },
        "namingTerm": {
            "_instruction": "Add one or several anatomical entities that name this annotation.",
            "items": {
                "else": {
                    "properties": {
                        "@id": {
                            "format": "iri",
                            "type": "string"
                        }
                    },
                    "required": [
                        "@id"
                    ]
                },
                "if": {
                    "required": [
                        "@type"
                    ]
                },
                "then": {
                    "properties": {
                        "@id": {
                            "format": "iri",
                            "type": "string"
                        },
                        "@type": {
                            "enum": [
                                "https://openminds.ebrains.eu/sands/AnatomicalEntity"
                            ],
                            "format": "iri",
                            "type": "string"
                        }
                    },
                    "required": [
                        "@id"
                    ]
                }
            },
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
        },
        "relatedAtlasTerm": {
            "_instruction": "Add one or several anatomical entities of registered brain atlas annotations to which this annotation is related to.",
            "items": {
                "else": {
                    "properties": {
                        "@id": {
                            "format": "iri",
                            "type": "string"
                        }
                    },
                    "required": [
                        "@id"
                    ]
                },
                "if": {
                    "required": [
                        "@type"
                    ]
                },
                "then": {
                    "properties": {
                        "@id": {
                            "format": "iri",
                            "type": "string"
                        },
                        "@type": {
                            "enum": [
                                "https://openminds.ebrains.eu/sands/AnatomicalEntity"
                            ],
                            "format": "iri",
                            "type": "string"
                        }
                    },
                    "required": [
                        "@id"
                    ]
                }
            },
            "minItems": 1,
            "type": "array",
            "unqiueItems": true
        },
        "visualizedIn": {
            "_instruction": "Add the image in which this annotation is visualized in.",
            "else": {
                "properties": {
                    "@id": {
                        "format": "iri",
                        "type": "string"
                    }
                },
                "required": [
                    "@id"
                ]
            },
            "if": {
                "required": [
                    "@type"
                ]
            },
            "then": {
                "properties": {
                    "@id": {
                        "format": "iri",
                        "type": "string"
                    },
                    "@type": {
                        "enum": [
                            "https://openminds.ebrains.eu/sands/Image"
                        ],
                        "format": "iri",
                        "type": "string"
                    }
                },
                "required": [
                    "@id"
                ]
            },
            "type": "object"
        }
    },
    "required": [
        "namingTerm",
        "laterality",
        "internalIdentifier",
        "@id",
        "@type",
        "criteriaQualityType"
    ],
    "type": "object"
}

internalIdentifier is in the required array, but not described in properties object

lzehl commented 3 years ago

@xgui3783 thanks for reporting this issue. This was missed in the last update of the schema. It should be deleted from the required array. I'll correct it.

lzehl commented 3 years ago

@xgui3783 the schema is fixed already in the v1 branch of openMINDS/SANDS. The corrected schema will be also in the next sub-release. I'm closing this issue now and thanks again for reporting the error.