mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-14 02:34:28 +00:00
sneakers-the-rat
fd9aef9531
- split off generated subclasses into "include" files, not sure if that's good, but in any case we have them separable now. - more work on cleanly un-nesting scalar and 1D-vector data into attributes and lists, respectively - brought the pydantic generator in-repo to do a bunch of overrides
625 lines
No EOL
21 KiB
JSON
625 lines
No EOL
21 KiB
JSON
{
|
|
"$defs": {
|
|
"AnyType": {
|
|
"additionalProperties": true,
|
|
"description": "",
|
|
"title": "AnyType",
|
|
"type": "object"
|
|
},
|
|
"Attribute": {
|
|
"additionalProperties": false,
|
|
"description": "",
|
|
"properties": {
|
|
"default_value": {
|
|
"$ref": "#/$defs/AnyType",
|
|
"description": "Optional default value for variable-valued attributes."
|
|
},
|
|
"dims": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/AnyType"
|
|
}
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"doc": {
|
|
"description": "Description of corresponding object.",
|
|
"type": "string"
|
|
},
|
|
"dtype": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/FlatDtype"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/CompoundDtype"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/ReferenceDtype"
|
|
}
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"required": {
|
|
"description": "Optional boolean key describing whether the attribute is required. Default value is True.",
|
|
"type": "boolean"
|
|
},
|
|
"shape": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"const": "null",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/AnyType"
|
|
}
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"value": {
|
|
"$ref": "#/$defs/AnyType",
|
|
"description": "Optional constant, fixed value for the attribute."
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"doc"
|
|
],
|
|
"title": "Attribute",
|
|
"type": "object"
|
|
},
|
|
"CompoundDtype": {
|
|
"additionalProperties": false,
|
|
"description": "",
|
|
"properties": {
|
|
"doc": {
|
|
"description": "Description of corresponding object.",
|
|
"type": "string"
|
|
},
|
|
"dtype": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/ReferenceDtype"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/FlatDtype"
|
|
}
|
|
],
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"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."
|
|
},
|
|
"dims": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/AnyType"
|
|
}
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"doc": {
|
|
"description": "Description of corresponding object.",
|
|
"type": "string"
|
|
},
|
|
"dtype": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/FlatDtype"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/CompoundDtype"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/ReferenceDtype"
|
|
}
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"linkable": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"neurodata_type_def": {
|
|
"description": "Used alongside neurodata_type_inc to indicate inheritance, naming, and mixins",
|
|
"type": "string"
|
|
},
|
|
"neurodata_type_inc": {
|
|
"description": "Used alongside neurodata_type_def to indicate inheritance, naming, and mixins",
|
|
"type": "string"
|
|
},
|
|
"quantity": {
|
|
"anyOf": [
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/QuantityEnum"
|
|
}
|
|
],
|
|
"type": "string"
|
|
},
|
|
"shape": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"const": "null",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/AnyType"
|
|
}
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"value": {
|
|
"$ref": "#/$defs/AnyType",
|
|
"description": "Optional constant, fixed value for the attribute."
|
|
}
|
|
},
|
|
"required": [
|
|
"doc"
|
|
],
|
|
"title": "Dataset",
|
|
"type": "object"
|
|
},
|
|
"Datasets": {
|
|
"additionalProperties": false,
|
|
"description": "",
|
|
"properties": {
|
|
"datasets": {
|
|
"items": {
|
|
"$ref": "#/$defs/Dataset"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"title": "Datasets",
|
|
"type": "object"
|
|
},
|
|
"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": {
|
|
"additionalProperties": false,
|
|
"description": "",
|
|
"properties": {
|
|
"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"
|
|
},
|
|
"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",
|
|
"type": "string"
|
|
},
|
|
"neurodata_type_inc": {
|
|
"description": "Used alongside neurodata_type_def to indicate inheritance, naming, and mixins",
|
|
"type": "string"
|
|
},
|
|
"quantity": {
|
|
"anyOf": [
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/QuantityEnum"
|
|
}
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"doc"
|
|
],
|
|
"title": "Group",
|
|
"type": "object"
|
|
},
|
|
"Groups": {
|
|
"additionalProperties": false,
|
|
"description": "",
|
|
"properties": {
|
|
"groups": {
|
|
"items": {
|
|
"$ref": "#/$defs/Group"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"title": "Groups",
|
|
"type": "object"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"required": [
|
|
"doc",
|
|
"target_type"
|
|
],
|
|
"title": "Link",
|
|
"type": "object"
|
|
},
|
|
"Namespace": {
|
|
"additionalProperties": false,
|
|
"description": "",
|
|
"properties": {
|
|
"author": {
|
|
"description": "List of strings with the names of the authors of the namespace.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"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",
|
|
"format": "date",
|
|
"type": "string"
|
|
},
|
|
"doc": {
|
|
"description": "Description of corresponding object.",
|
|
"type": "string"
|
|
},
|
|
"full_name": {
|
|
"description": "Optional string with extended full name for the namespace.",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"schema_": {
|
|
"description": "List of the schema to be included in this namespace.",
|
|
"items": {
|
|
"$ref": "#/$defs/Schema"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"title": "Namespaces",
|
|
"type": "object"
|
|
},
|
|
"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": {
|
|
"description": "",
|
|
"enum": [
|
|
"ref",
|
|
"reference",
|
|
"object",
|
|
"region"
|
|
],
|
|
"title": "ReftypeOptions",
|
|
"type": "string"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"$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
|
|
} |