{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.peptideschool.org/data/peptideschool-public-research-source-inventory-v1.0.0.schema.json",
  "title": "PeptideSchool Public Research Article Source Inventory",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "dataset",
    "scope",
    "summary",
    "records"
  ],
  "properties": {
    "dataset": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "version",
        "canonicalPage",
        "license",
        "publisher",
        "author",
        "language",
        "publicationDate",
        "reviewDate",
        "citation"
      ],
      "properties": {
        "id": {
          "const": "peptideschool-public-research-source-inventory"
        },
        "version": {
          "const": "1.0.0"
        },
        "canonicalPage": {
          "const": "https://www.peptideschool.org/research-article-source-inventory"
        },
        "license": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "spdx",
            "url"
          ],
          "properties": {
            "spdx": {
              "const": "CC-BY-4.0"
            },
            "url": {
              "const": "https://creativecommons.org/licenses/by/4.0/"
            }
          }
        },
        "publisher": {
          "const": "PeptideSchool"
        },
        "author": {
          "const": "PeptideSchool Editorial Desk"
        },
        "language": {
          "const": "en-US"
        },
        "publicationDate": {
          "type": "string",
          "format": "date"
        },
        "reviewDate": {
          "type": "string",
          "format": "date"
        },
        "citation": {
          "type": "string",
          "minLength": 80
        }
      }
    },
    "scope": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "purpose",
        "included",
        "excluded",
        "interpretation"
      ],
      "properties": {
        "purpose": {
          "type": "string",
          "minLength": 80
        },
        "included": {
          "type": "string",
          "minLength": 80
        },
        "excluded": {
          "type": "string",
          "minLength": 80
        },
        "interpretation": {
          "type": "string",
          "minLength": 80
        }
      }
    },
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "articleCount",
        "familyCounts",
        "sourceReferenceCount",
        "uniqueSourceUrlCount",
        "uniqueSourceDomainCount",
        "uniquePublisherCount"
      ],
      "properties": {
        "articleCount": {
          "const": 100
        },
        "familyCounts": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "peptide",
            "topic",
            "comparison",
            "method",
            "math",
            "glossary"
          ],
          "properties": {
            "peptide": {
              "type": "integer",
              "minimum": 0
            },
            "topic": {
              "type": "integer",
              "minimum": 0
            },
            "comparison": {
              "type": "integer",
              "minimum": 0
            },
            "method": {
              "type": "integer",
              "minimum": 0
            },
            "math": {
              "type": "integer",
              "minimum": 0
            },
            "glossary": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "sourceReferenceCount": {
          "type": "integer",
          "minimum": 200
        },
        "uniqueSourceUrlCount": {
          "type": "integer",
          "minimum": 40
        },
        "uniqueSourceDomainCount": {
          "type": "integer",
          "minimum": 10
        },
        "uniquePublisherCount": {
          "type": "integer",
          "minimum": 10
        }
      }
    },
    "records": {
      "type": "array",
      "minItems": 100,
      "maxItems": 100,
      "uniqueItems": true,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "url",
          "title",
          "family",
          "publicationDate",
          "reviewDate",
          "institutionalAuthor",
          "sourceCount",
          "sourceDomains",
          "sources",
          "relatedArticleCount"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "url": {
            "type": "string",
            "pattern": "^https://www\\.peptideschool\\.org/research/"
          },
          "title": {
            "type": "string",
            "minLength": 20
          },
          "family": {
            "enum": [
              "peptide",
              "topic",
              "comparison",
              "method",
              "math",
              "glossary"
            ]
          },
          "publicationDate": {
            "type": "string",
            "format": "date"
          },
          "reviewDate": {
            "type": "string",
            "format": "date"
          },
          "institutionalAuthor": {
            "const": "Published by PeptideSchool Editorial Desk"
          },
          "sourceCount": {
            "type": "integer",
            "minimum": 2
          },
          "sourceDomains": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 4
            }
          },
          "sources": {
            "type": "array",
            "minItems": 2,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title",
                "publisher",
                "url"
              ],
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 4
                },
                "publisher": {
                  "type": "string",
                  "minLength": 2
                },
                "url": {
                  "type": "string",
                  "pattern": "^https://"
                }
              }
            }
          },
          "relatedArticleCount": {
            "type": "integer",
            "minimum": 2
          }
        }
      }
    }
  }
}
