{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.5/storeProtocol/repository.schema.json",
  "$comment": "OpenEik 0.5: folded by tools/fold-schemas-0.5.mjs from the proposal storeProtocol, which 0.5 makes a rule (open questions, 28). Written by hand, not generated.",
  "title": "A repository",
  "description": "The answer to GET <base>/v0/repos/{owner}/{name} (Part VI, 6.8.4, rule 2): the repository, and what the store takes of it (6.8.11, rule 1).",
  "type": "object",
  "properties": {
    "ok": {
      "const": true,
      "description": "The call was answered as asked (Part VI, 6.8.1, rule 4)."
    },
    "repo": {
      "type": "object",
      "properties": {
        "owner": {
          "type": "string",
          "minLength": 1,
          "description": "The repository's owner, the first name of owner/name."
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "The repository's name, the second name of owner/name."
        },
        "visibility": {
          "type": "string",
          "minLength": 1,
          "description": "public where anyone may read it, private otherwise; a store may name others."
        },
        "source": {
          "description": "Where the repository belongs to the project of an authoring application, what names it, its kind first; null or none otherwise (6.8.4, rule 3).",
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "kind"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "reads": {
          "type": "array",
          "description": "The formats the store reads for this repository (Part VI, 6.7, rule 1).",
          "items": {
            "type": "string",
            "pattern": "^openeik/[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?$"
          }
        }
      },
      "required": [
        "owner",
        "name"
      ]
    },
    "limits": {
      "type": "object",
      "description": "What the store takes of the repository, each a whole number of bytes, and each one it may leave out (6.8.11, rule 1).",
      "properties": {
        "assetBytes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 67108864,
          "description": "The most bytes of one asset, at most 64 MiB (Part XV, 4); 64 MiB where it is not given."
        },
        "putObjectBytes": {
          "type": "integer",
          "minimum": 1,
          "description": "The most UTF-8 bytes of one object's text that one objects/put carries; 40 MiB where it is not given."
        },
        "objectBytes": {
          "type": "integer",
          "minimum": 1,
          "description": "The most UTF-8 bytes of an object, sent in parts where it is larger than putObjectBytes; a client takes it as no more than 402 653 186."
        },
        "uploadPart": {
          "type": "integer",
          "minimum": 1,
          "description": "The size of an upload's parts, where the store takes objects in parts (6.8.7)."
        }
      }
    }
  },
  "required": [
    "ok",
    "repo",
    "limits"
  ]
}
