{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://naser.github.io/research-publications/schemas/paper.schema.json",
  "title": "Naser Ezzati-Jivan publication record",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "paper_id",
    "page_url",
    "title",
    "title_variants",
    "authors",
    "author_details",
    "publication",
    "publication_type",
    "status",
    "canonical_source_url",
    "source_record_id",
    "identifiers",
    "abstract",
    "abstract_source",
    "abstract_available",
    "scholar_eligibility",
    "description",
    "evidence_level",
    "evidence",
    "summary",
    "tags",
    "keywords",
    "versions",
    "access",
    "resources",
    "citation_guidance",
    "provenance",
    "batch"
  ],
  "properties": {
    "schema_version": {
      "const": "0.6.0"
    },
    "paper_id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "page_url": {
      "type": "string",
      "format": "uri"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "title_variants": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "authors": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "author_details": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "orcid",
          "profile_url"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "orcid": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "publication": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "year",
        "venue",
        "type",
        "publication_date"
      ],
      "properties": {
        "year": {
          "type": "integer",
          "minimum": 1900,
          "maximum": 2100
        },
        "venue": {
          "type": "string",
          "minLength": 1
        },
        "type": {
          "type": "string",
          "minLength": 1
        },
        "publication_date": {
          "type": "string",
          "minLength": 4
        },
        "online_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "print_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "volume": {
          "type": [
            "string",
            "null"
          ]
        },
        "issue": {
          "type": [
            "string",
            "null"
          ]
        },
        "pages": {
          "type": [
            "string",
            "null"
          ]
        },
        "article_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "publisher": {
          "type": [
            "string",
            "null"
          ]
        },
        "issn": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "isbn": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "crossref_type": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "publication_type": {
      "type": "string",
      "minLength": 1
    },
    "status": {
      "type": "string",
      "minLength": 1
    },
    "canonical_source_url": {
      "type": "string",
      "format": "uri"
    },
    "source_record_id": {
      "type": "string",
      "minLength": 1
    },
    "identifiers": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "doi": {
          "type": [
            "string",
            "null"
          ]
        },
        "arxiv": {
          "type": [
            "string",
            "null"
          ]
        },
        "arxiv_doi": {
          "type": [
            "string",
            "null"
          ]
        },
        "dblp": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "abstract": {
      "type": [
        "string",
        "null"
      ]
    },
    "abstract_source": {
      "type": [
        "string",
        "null"
      ]
    },
    "abstract_available": {
      "type": "boolean"
    },
    "scholar_eligibility": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "eligible",
        "basis",
        "note"
      ],
      "properties": {
        "eligible": {
          "type": "boolean"
        },
        "basis": {
          "enum": [
            "complete-visible-author-abstract",
            "not-eligible"
          ]
        },
        "note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "evidence_level": {
      "enum": [
        "full-text-reviewed",
        "metadata-or-abstract-reviewed"
      ]
    },
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source_basis",
        "coverage",
        "summary_origin",
        "review_status",
        "verified_on",
        "sources"
      ],
      "properties": {
        "source_basis": {
          "enum": [
            "full-text-reviewed",
            "abstract-and-metadata-reviewed",
            "metadata-only"
          ]
        },
        "coverage": {
          "type": "string",
          "minLength": 1
        },
        "summary_origin": {
          "type": "string",
          "minLength": 1
        },
        "review_status": {
          "type": "string",
          "minLength": 1
        },
        "verified_on": {
          "type": "string",
          "minLength": 10
        },
        "sources": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "note"
            ],
            "properties": {
              "note": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      }
    },
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "core_contribution",
        "problem",
        "method",
        "findings",
        "limitations",
        "future_work"
      ],
      "properties": {
        "core_contribution": {
          "type": "string",
          "minLength": 1
        },
        "problem": {
          "type": "string",
          "minLength": 1
        },
        "method": {
          "type": "string",
          "minLength": 1
        },
        "findings": {
          "type": "string",
          "minLength": 1
        },
        "limitations": {
          "type": "string",
          "minLength": 1
        },
        "future_work": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "tags": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
      }
    },
    "keywords": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "versions": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "label",
          "relation",
          "title",
          "url",
          "status",
          "canonical_for_citation"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "relation": {
            "type": "string",
            "enum": [
              "version-of-record",
              "accepted-manuscript",
              "preprint",
              "source-record"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "pdf_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "status": {
            "type": "string",
            "minLength": 1
          },
          "canonical_for_citation": {
            "type": "boolean"
          }
        }
      }
    },
    "access": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "status",
        "note",
        "license"
      ],
      "properties": {
        "status": {
          "type": "string",
          "minLength": 1
        },
        "note": {
          "type": "string",
          "minLength": 1
        },
        "license": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "resources": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "data",
        "slides",
        "demo"
      ],
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "data": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "slides": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "demo": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      }
    },
    "citation_guidance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "when_to_cite",
        "points",
        "canonical_version_id"
      ],
      "properties": {
        "when_to_cite": {
          "type": "string",
          "minLength": 1
        },
        "points": {
          "type": "array",
          "minItems": 2,
          "maxItems": 4,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "canonical_version_id": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "provenance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "metadata_verified_on",
        "metadata_source",
        "summary_written_by",
        "summary_verified_by",
        "linked_preprint_record",
        "author_order_note"
      ],
      "properties": {
        "metadata_verified_on": {
          "type": "string",
          "format": "date"
        },
        "metadata_source": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "summary_written_by": {
          "type": "string",
          "minLength": 1
        },
        "summary_verified_by": {
          "type": "string",
          "minLength": 1
        },
        "linked_preprint_record": {
          "type": [
            "string",
            "null"
          ]
        },
        "author_order_note": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "batch": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "phase",
        "batch_label",
        "status",
        "selected_at"
      ],
      "properties": {
        "phase": {
          "type": "integer",
          "minimum": 1
        },
        "batch_label": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "string",
          "minLength": 1
        },
        "selected_at": {
          "type": "string",
          "format": "date"
        }
      }
    }
  }
}
