{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://kaikei.keydrop.net/schema/0.1/manifest.schema.json",
  "title": "manifest",
  "description": "manifest.json（01-basics.md）",
  "type": "object",
  "required": [
    "specVersion",
    "files"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "specVersion": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
    },
    "taxMasterVersion": {
      "type": "string",
      "pattern": "^\\d{4}\\.\\d+$"
    },
    "generator": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "path",
          "sha256"
        ],
        "properties": {
          "path": {
            "type": "string",
            "pattern": "^(?!/)(?!.*\\.\\.)[A-Za-z0-9._/-]+$",
            "description": "帳簿のフォルダからの相対パス"
          },
          "sha256": {
            "$ref": "common.schema.json#/$defs/sha256"
          },
          "entries": {
            "type": "integer",
            "minimum": 0
          },
          "sealed": {
            "type": "boolean"
          },
          "prevSealedHash": {
            "$ref": "common.schema.json#/$defs/sha256"
          }
        },
        "additionalProperties": false
      }
    },
    "extensions": {
      "$ref": "common.schema.json#/$defs/extensions"
    }
  },
  "additionalProperties": false
}
