{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://universalpaper.org/research/schema/0/index.schema.json",
  "title": "Universal Paper Research index (up-research/index/0)",
  "description": "Every entry in Universal Paper Research, with the fixed lists they are filed under. Research is not part of the Universal Paper language. These formats may change or be withdrawn, and no agreement depends on them.",
  "type": "object",
  "required": [
    "format",
    "title",
    "url",
    "updated",
    "notice",
    "kinds",
    "topics",
    "statuses",
    "language_change",
    "entries"
  ],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "format": {
      "const": "up-research/index/0"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "updated": {
      "type": "string",
      "format": "date"
    },
    "notice": {
      "type": "string",
      "minLength": 1
    },
    "kinds": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "definition",
          "url",
          "count"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "definition": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "plural": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "definition",
          "url",
          "count"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "definition": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          }
        }
      }
    },
    "statuses": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "meaning",
          "kinds"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "enum": [
              "open",
              "answered",
              "exploring",
              "prototype",
              "concluded",
              "withdrawn"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "meaning": {
            "type": "string",
            "minLength": 1
          },
          "kinds": {
            "type": "array",
            "items": {
              "enum": [
                "note",
                "experiment",
                "reusable",
                "question"
              ]
            }
          }
        }
      }
    },
    "language_change": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "minLength": 1
      }
    },
    "outcomes": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "minLength": 1
      },
      "description": "The results an experiment may report."
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "feed": {
      "type": "string",
      "format": "uri"
    },
    "schemas": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "format": "uri"
      }
    },
    "entries": {
      "type": "array",
      "items": {
        "$ref": "entry.schema.json"
      },
      "description": "Newest first. No entry carries detail or refs here; fetch its json address for those."
    }
  }
}
