{
    "$schema": "http://json-schema.org/draft-04/schema",
    "description": "DESCRIBE NANOPUB",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "nanopub"
    ],
    "properties": {
        "nanopub": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "bel_statement",
                "citation"
            ],
            "properties": {
                "bel_statement": {
                    "type": "string",
                    "title": "BEL Statement",
                    "description": "A BEL Statement is an expression that represents knowledge of the existence of biological entities and relationships between them that are known to be observed within a particular context, based on some source of prior knowledge such as a scientific publication or newly generated experimental data."
                },
                "citation": {
                    "type": "object",
                    "title": "Citation",
                    "description": "The citation specifies the written source where the biological knowledge was referenced.",
                    "required": [
                        "type",
                        "id"
                    ],
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": [
                                "PubMed",
                                "Book",
                                "Journal",
                                "Online Resource",
                                "Other"
                            ],
                            "title": "Citation Type",
                            "description": "The citation type of the reference."
                        },
                        "id": {
                            "type": [
                                "string",
                                "number"
                            ],
                            "title": "Citation ID",
                            "description": "The citation identifier (PubMed ID, ISBN, DOI, URL) of the reference."
                        },
                        "name": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "title": "Citation Name",
                            "description": "The citation name of the reference."
                        },
                        "date": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "title": "Citation Date",
                            "description": "The citation date of the reference."
                        },
                        "authors": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "title": "Citation Authors",
                            "description": "The citation authors of the reference.",
                            "items": {
                                "type": "string",
                                "minItems": 0
                            }
                        },
                        "comment": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "title": "Citation Comment",
                            "description": "The citation comment of the reference."
                        }
                    }
                },
                "experiment_context": {
                    "type": [
                        "array",
                        "null"
                    ],
                    "title": "Experiment Context",
                    "description": "An experiment context specifies the experiment's parameters where this interaction was observed.",
                    "items": {
                        "type": "object",
                        "required": [
                            "name",
                            "value"
                        ],
                        "properties": {
                            "name": {
                                "type": "string",
                                "title": "Annotation Type",
                                "description": "Annotation type listing - sourced from the BEL Annotation resource names"
                            },
                            "value": {
                                "type": [
                                    "string",
                                    "number",
                                    "boolean",
                                    "array"
                                ],
                                "title": "Annotations",
                                "description": "Annotations such as Homo sapiens, cancer, epithelial tissue sourced from the BEL Annotation resources",
                                "items": {
                                    "type": [
                                        "string",
                                        "number",
                                        "boolean"
                                    ]
                                }
                            },
                            "uri": {
                                "type": "string",
                                "title": "Annotation URI",
                                "description": "URI for Annotation",
                                "format": "uri",
                                "items": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    }
                },
                "support": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "title": "Support",
                    "description": "Abstract from source text to provide support for this nanopub"
                },
                "references": {
                    "type": [
                        "object",
                        "null"
                    ],
                    "title": "References",
                    "description": "The references section identifies annotation and namespace URIs.",
                    "properties": {
                        "annotations": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "title": "Annotation references",
                            "description": "References to annotation resources.",
                            "item": {
                                "type": "object",
                                "properties": {
                                    "keyword": {
                                        "type": "string",
                                        "title": "Keyword",
                                        "description": "Keyword that identifies this annotation resource, but only in the context of this Nanopub."
                                    },
                                    "uri": {
                                        "type": "string",
                                        "format": "uri",
                                        "title": "URI",
                                        "description": "URI that identifies this annotation resource."
                                    }
                                },
                                "required": [
                                    "keyword",
                                    "uri"
                                ]
                            }
                        },
                        "namespaces": {
                            "type": [
                                "array",
                                "null"
                            ],
                            "title": "Namespace references",
                            "description": "References to namespace resources.",
                            "item": {
                                "type": "object",
                                "properties": {
                                    "keyword": {
                                        "type": "string",
                                        "title": "Keyword",
                                        "description": "Keyword that identifies this namespace resource, but only in the context of this Nanopub."
                                    },
                                    "uri": {
                                        "type": "string",
                                        "format": "uri",
                                        "title": "URI",
                                        "description": "URI that identifies this namespace resource."
                                    }
                                },
                                "required": [
                                    "keyword",
                                    "uri"
                                ]
                            }
                        }
                    }
                },
                "metadata": {
                    "type": [
                        "array",
                        "null"
                    ],
                    "title": "Nanopub resource metadata",
                    "description": "Metadata that describes the nanopub resource.",
                    "items": {
                        "oneOf": [
                            {
                                "type": "object",
                                "required": [
                                    "name",
                                    "value"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "title": "Name",
                                        "description": "The name of this metadata property."
                                    },
                                    "value": {
                                        "type": [
                                            "array",
                                            "boolean",
                                            "number",
                                            "object",
                                            "string"
                                        ],
                                        "title": "Value",
                                        "description": "The value of this metadata property.",
                                        "items": {
                                            "type": [
                                                "array",
                                                "boolean",
                                                "integer",
                                                "number",
                                                "null",
                                                "object",
                                                "string"
                                            ]
                                        }
                                    }
                                }
                            },
                            {
                                "type": "object",
                                "required": [
                                    "uri"
                                ],
                                "title": "Annotation URI(s)",
                                "description": "URI(s) for Annotations",
                                "properties": {
                                    "uri": {
                                        "type": [
                                            "string",
                                            "array"
                                        ],
                                        "format": "uri",
                                        "items": {
                                            "type": "string",
                                            "format": "uri"
                                        }
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        }
    }
}