nwb-linkml/nwb_schema_language/project/jsonschema/nwb_schema_language.schema.json

625 lines
21 KiB
JSON
Raw Normal View History

2023-08-16 23:07:36 +00:00
{
"$defs": {
2023-08-17 06:47:35 +00:00
"AnyType": {
"additionalProperties": true,
"description": "",
"title": "AnyType",
"type": "object"
},
"Attribute": {
2023-08-16 23:07:36 +00:00
"additionalProperties": false,
2023-08-17 06:47:35 +00:00
"description": "",
2023-08-16 23:07:36 +00:00
"properties": {
2023-08-17 06:47:35 +00:00
"default_value": {
"$ref": "#/$defs/AnyType",
"description": "Optional default value for variable-valued attributes."
},
"dims": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/AnyType"
}
],
2023-08-17 06:47:35 +00:00
"type": "string"
},
"type": "array"
},
"doc": {
"description": "Description of corresponding object.",
2023-08-16 23:07:36 +00:00
"type": "string"
},
2023-08-17 06:47:35 +00:00
"dtype": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/FlatDtype"
},
{
"$ref": "#/$defs/CompoundDtype"
},
{
"$ref": "#/$defs/ReferenceDtype"
}
],
"type": "string"
},
"type": "array"
2023-08-16 23:07:36 +00:00
},
"name": {
"type": "string"
2023-08-17 06:47:35 +00:00
},
"required": {
"description": "Optional boolean key describing whether the attribute is required. Default value is True.",
"type": "boolean"
},
"shape": {
"items": {
"anyOf": [
2023-08-17 06:47:35 +00:00
{
"minimum": 1,
"type": "integer"
},
{
"const": "null",
"type": "string"
},
{
"$ref": "#/$defs/AnyType"
2023-08-17 06:47:35 +00:00
}
],
"type": "string"
},
"type": "array"
},
"value": {
"$ref": "#/$defs/AnyType",
"description": "Optional constant, fixed value for the attribute."
2023-08-16 23:07:36 +00:00
}
},
"required": [
2023-08-17 06:47:35 +00:00
"name",
"doc"
2023-08-16 23:07:36 +00:00
],
2023-08-17 06:47:35 +00:00
"title": "Attribute",
2023-08-16 23:07:36 +00:00
"type": "object"
},
2023-08-17 06:47:35 +00:00
"CompoundDtype": {
2023-08-16 23:07:36 +00:00
"additionalProperties": false,
2023-08-17 06:47:35 +00:00
"description": "",
2023-08-16 23:07:36 +00:00
"properties": {
2023-08-17 06:47:35 +00:00
"doc": {
"description": "Description of corresponding object.",
"type": "string"
2023-08-16 23:07:36 +00:00
},
2023-08-17 06:47:35 +00:00
"dtype": {
"anyOf": [
{
"$ref": "#/$defs/ReferenceDtype"
},
{
"$ref": "#/$defs/FlatDtype"
}
],
"type": "string"
2023-08-17 06:47:35 +00:00
},
"name": {
2023-08-16 23:07:36 +00:00
"type": "string"
2023-08-17 06:47:35 +00:00
}
},
"required": [
"name",
"doc",
"dtype"
],
"title": "CompoundDtype",
"type": "object"
},
"Dataset": {
"additionalProperties": false,
"description": "",
"properties": {
"attributes": {
"items": {
"$ref": "#/$defs/Attribute"
},
"type": "array"
},
"default_name": {
"type": "string"
},
"default_value": {
"$ref": "#/$defs/AnyType",
"description": "Optional default value for variable-valued attributes."
2023-08-16 23:07:36 +00:00
},
2023-08-17 06:47:35 +00:00
"dims": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/AnyType"
}
],
2023-08-17 06:47:35 +00:00
"type": "string"
},
"type": "array"
},
"doc": {
"description": "Description of corresponding object.",
2023-08-16 23:07:36 +00:00
"type": "string"
},
2023-08-17 06:47:35 +00:00
"dtype": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/FlatDtype"
},
{
"$ref": "#/$defs/CompoundDtype"
},
{
"$ref": "#/$defs/ReferenceDtype"
}
],
"type": "string"
},
"type": "array"
2023-08-16 23:07:36 +00:00
},
2023-08-17 06:47:35 +00:00
"linkable": {
"type": "boolean"
},
2023-08-16 23:07:36 +00:00
"name": {
"type": "string"
},
2023-08-17 06:47:35 +00:00
"neurodata_type_def": {
"description": "Used alongside neurodata_type_inc to indicate inheritance, naming, and mixins",
2023-08-16 23:07:36 +00:00
"type": "string"
},
2023-08-17 06:47:35 +00:00
"neurodata_type_inc": {
"description": "Used alongside neurodata_type_def to indicate inheritance, naming, and mixins",
2023-08-17 06:47:35 +00:00
"type": "string"
},
"quantity": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"$ref": "#/$defs/QuantityEnum"
}
],
"type": "string"
},
"shape": {
"items": {
"anyOf": [
2023-08-17 06:47:35 +00:00
{
"minimum": 1,
"type": "integer"
},
{
"const": "null",
"type": "string"
},
{
"$ref": "#/$defs/AnyType"
2023-08-17 06:47:35 +00:00
}
],
"type": "string"
},
"type": "array"
},
"value": {
"$ref": "#/$defs/AnyType",
"description": "Optional constant, fixed value for the attribute."
2023-08-16 23:07:36 +00:00
}
},
"required": [
2023-08-17 06:47:35 +00:00
"doc"
2023-08-16 23:07:36 +00:00
],
2023-08-17 06:47:35 +00:00
"title": "Dataset",
2023-08-16 23:07:36 +00:00
"type": "object"
},
2023-08-18 08:11:14 +00:00
"Datasets": {
"additionalProperties": false,
"description": "",
"properties": {
"datasets": {
"items": {
"$ref": "#/$defs/Dataset"
},
"type": "array"
}
},
"title": "Datasets",
"type": "object"
},
2023-08-17 06:47:35 +00:00
"FlatDtype": {
"description": "",
"enum": [
"float",
"float32",
"double",
"float64",
"long",
"int64",
"int",
"int32",
"int16",
"short",
"int8",
"uint",
"uint32",
"uint16",
"uint8",
"uint64",
"numeric",
"text",
"utf",
"utf8",
"utf-8",
"ascii",
"bool",
"isodatetime"
],
"title": "FlatDtype",
"type": "string"
},
"Group": {
2023-08-16 23:07:36 +00:00
"additionalProperties": false,
2023-08-17 06:47:35 +00:00
"description": "",
2023-08-16 23:07:36 +00:00
"properties": {
2023-08-17 06:47:35 +00:00
"attributes": {
"items": {
"$ref": "#/$defs/Attribute"
},
"type": "array"
},
"datasets": {
"items": {
"$ref": "#/$defs/Dataset"
},
"type": "array"
},
"default_name": {
"type": "string"
},
"doc": {
"description": "Description of corresponding object.",
"type": "string"
},
"groups": {
"items": {
"$ref": "#/$defs/Group"
2023-08-16 23:07:36 +00:00
},
2023-08-17 06:47:35 +00:00
"type": "array"
},
"linkable": {
"type": "boolean"
},
"links": {
"items": {
"$ref": "#/$defs/Link"
},
"type": "array"
},
"name": {
"type": "string"
},
"neurodata_type_def": {
"description": "Used alongside neurodata_type_inc to indicate inheritance, naming, and mixins",
2023-08-17 06:47:35 +00:00
"type": "string"
},
"neurodata_type_inc": {
"description": "Used alongside neurodata_type_def to indicate inheritance, naming, and mixins",
2023-08-17 06:47:35 +00:00
"type": "string"
},
"quantity": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"$ref": "#/$defs/QuantityEnum"
}
],
"type": "string"
}
},
"required": [
"doc"
],
"title": "Group",
"type": "object"
},
2023-08-18 08:11:14 +00:00
"Groups": {
"additionalProperties": false,
"description": "",
"properties": {
"groups": {
"items": {
"$ref": "#/$defs/Group"
},
"type": "array"
}
},
"title": "Groups",
"type": "object"
},
2023-08-17 06:47:35 +00:00
"Link": {
"additionalProperties": false,
"description": "",
"properties": {
"doc": {
"description": "Description of corresponding object.",
"type": "string"
},
"name": {
"type": "string"
},
"quantity": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"$ref": "#/$defs/QuantityEnum"
}
],
"type": "string"
},
"target_type": {
"description": "Describes the neurodata_type of the target that the reference points to",
"type": "string"
2023-08-16 23:07:36 +00:00
}
},
2023-08-17 06:47:35 +00:00
"required": [
"doc",
"target_type"
],
"title": "Link",
2023-08-16 23:07:36 +00:00
"type": "object"
},
2023-08-17 06:47:35 +00:00
"Namespace": {
2023-08-16 23:07:36 +00:00
"additionalProperties": false,
2023-08-17 06:47:35 +00:00
"description": "",
2023-08-16 23:07:36 +00:00
"properties": {
2023-08-17 06:47:35 +00:00
"author": {
"description": "List of strings with the names of the authors of the namespace.",
"items": {
"type": "string"
},
"type": "array"
2023-08-16 23:07:36 +00:00
},
2023-08-17 06:47:35 +00:00
"contact": {
"description": "List of strings with the contact information for the authors. Ordering of the contacts should match the ordering of the authors.",
"items": {
"type": "string"
},
"type": "array"
},
"date": {
"description": "Date that a namespace was last modified or released",
2023-10-09 22:06:53 +00:00
"format": "date-time",
2023-08-16 23:07:36 +00:00
"type": "string"
},
2023-08-17 06:47:35 +00:00
"doc": {
"description": "Description of corresponding object.",
2023-08-16 23:07:36 +00:00
"type": "string"
},
2023-08-17 06:47:35 +00:00
"full_name": {
"description": "Optional string with extended full name for the namespace.",
2023-08-16 23:07:36 +00:00
"type": "string"
},
"name": {
"type": "string"
},
"schema_": {
2023-08-17 06:47:35 +00:00
"description": "List of the schema to be included in this namespace.",
"items": {
"$ref": "#/$defs/Schema"
},
"type": "array"
2023-08-16 23:07:36 +00:00
},
2023-08-17 06:47:35 +00:00
"version": {
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string"
}
},
"required": [
"doc",
"name",
"version",
"author",
"contact"
],
"title": "Namespace",
"type": "object"
},
"Namespaces": {
"additionalProperties": false,
"description": "",
"properties": {
"namespaces": {
"items": {
"$ref": "#/$defs/Namespace"
},
"type": "array"
2023-08-16 23:07:36 +00:00
}
},
"title": "Namespaces",
"type": "object"
},
2023-08-17 06:47:35 +00:00
"QuantityEnum": {
"description": "",
"enum": [
"*",
"?",
"+",
"zero_or_many",
"one_or_many",
"zero_or_one"
],
"title": "QuantityEnum",
"type": "string"
},
"ReferenceDtype": {
"additionalProperties": false,
"description": "",
"properties": {
"reftype": {
"$ref": "#/$defs/ReftypeOptions",
"description": "describes the kind of reference"
},
"target_type": {
"description": "Describes the neurodata_type of the target that the reference points to",
"type": "string"
}
},
"required": [
"target_type"
],
"title": "ReferenceDtype",
"type": "object"
},
"ReftypeOptions": {
2023-08-16 23:07:36 +00:00
"description": "",
"enum": [
2023-08-17 06:47:35 +00:00
"ref",
"reference",
"object",
"region"
2023-08-16 23:07:36 +00:00
],
2023-08-17 06:47:35 +00:00
"title": "ReftypeOptions",
2023-08-16 23:07:36 +00:00
"type": "string"
2023-08-17 06:47:35 +00:00
},
"Schema": {
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"namespace": {}
},
"required": [
"namespace"
]
},
"then": {
"properties": {
"source": {}
},
"required": [
"source"
]
}
},
{
"if": {
"properties": {
"source": {}
},
"required": [
"source"
]
},
"then": {
"properties": {
"namespace": {}
},
"required": [
"namespace"
]
}
},
{
"if": {
"properties": {
"namespace": {}
},
"required": [
"namespace"
]
},
"then": {
"properties": {
"source": {}
},
"required": [
"source"
]
}
},
{
"if": {
"properties": {
"source": {}
},
"required": [
"source"
]
},
"then": {
"properties": {
"namespace": {}
},
"required": [
"namespace"
]
}
}
],
"description": "",
"properties": {
"doc": {
"type": "string"
},
"namespace": {
"description": "describes a named reference to another namespace. In contrast to source, this is a reference by name to a known namespace (i.e., the namespace is resolved during the build and must point to an already existing namespace). This mechanism is used to allow, e.g., extension of a core namespace (here the NWB core namespace) without requiring hard paths to the files describing the core namespace. Either source or namespace must be specified, but not both.",
"type": "string"
},
"neurodata_types": {
"description": "an optional list of strings indicating which data types should be included from the given specification source or namespace. The default is null indicating that all data types should be included.",
"items": {
"anyOf": [
{
"$ref": "#/$defs/Dataset"
},
{
"$ref": "#/$defs/Group"
}
],
"type": "string"
},
"type": "array"
},
"source": {
"description": "describes the name of the YAML (or JSON) file with the schema specification. The schema files should be located in the same folder as the namespace file.",
"pattern": ".*\\.(yml|yaml|json)",
"type": "string"
},
"title": {
"description": "a descriptive title for a file for documentation purposes.",
"type": "string"
}
},
"title": "Schema",
"type": "object"
2023-08-16 23:07:36 +00:00
}
},
"$id": "https://w3id.org/p2p_ld/nwb-schema-language",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": true,
"metamodel_version": "1.7.0",
"title": "nwb-schema-language",
"type": "object",
"version": null
}