{
  "openapi": "3.1.0",
  "info": {
    "title": "WC3Replays API",
    "version": "1.0.0",
    "description": "Replay parsing, Warcraft III icons, and the signed-in replay library. Authentication and client-error ingestion routes are internal website plumbing, not integration APIs."
  },
  "servers": [
    {
      "url": "https://wc3replays.com"
    }
  ],
  "externalDocs": {
    "url": "https://wc3replays.com/api-docs"
  },
  "tags": [
    {
      "name": "parser",
      "description": "Anonymous replay parsing, upload limits, and parser health."
    },
    {
      "name": "icons",
      "description": "Warcraft III icon lookup and batch resolution."
    },
    {
      "name": "library",
      "description": "Session-authenticated replay library and explicit report publication."
    }
  ],
  "paths": {
    "/api/replays/parse": {
      "post": {
        "tags": ["parser"],
        "summary": "Analyze a Warcraft III replay",
        "description": "Anonymous access is supported. Upload one nonempty .w3g file in the replay field; .nwg files are unsupported. Cross-site browser requests and untrusted Origin headers are rejected. Discover current limits before uploading. Saving to a signed-in library is reported separately by x-replay-library-save.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": ["replay"],
                "properties": {
                  "replay": {
                    "type": "string",
                    "format": "binary",
                    "description": "A Warcraft III .w3g replay."
                  },
                  "expectedHash": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{64}$",
                    "description": "Optional SHA-256 hash; malformed or mismatched hashes are rejected."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Optional diagnostic sidecar."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Parsed replay and presentation data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParseSuccess"
                }
              }
            }
          },
          "400": {
            "description": "Invalid replay or multipart request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParseFailure"
                }
              }
            }
          },
          "403": {
            "description": "Untrusted request origin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParseFailure"
                }
              }
            }
          },
          "413": {
            "description": "Upload, request, or response size exceeds its budget.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParseFailure"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded; respect Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParseFailure"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "499": {
            "description": "Request was cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParseFailure"
                }
              }
            }
          },
          "500": {
            "description": "Replay parsing failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParseFailure"
                }
              }
            }
          }
        }
      }
    },
    "/api/replays/parse/limits": {
      "get": {
        "tags": ["parser"],
        "summary": "Read current upload and rate limits",
        "responses": {
          "200": {
            "description": "Current byte budgets, extensions, and rate limits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "maxCompressedBytes": {
                      "type": "integer"
                    },
                    "multipartOverheadBytes": {
                      "type": "integer"
                    },
                    "maxRequestBytes": {
                      "type": "integer"
                    },
                    "allowedExtensions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "rateLimit": {
                      "type": "object",
                      "properties": {
                        "requests": {
                          "type": "integer"
                        },
                        "windowMS": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/replays/parser-health": {
      "get": {
        "tags": ["parser"],
        "summary": "Read parser health",
        "description": "Reports parser inspection state, including cached or stale results. Use conditional requests with If-None-Match where appropriate.",
        "responses": {
          "200": {
            "description": "Parser health report.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "304": {
            "description": "Not modified."
          },
          "500": {
            "description": "Health inspection failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "503": {
            "description": "Stale report served after an inspection failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "head": {
        "tags": ["parser"],
        "summary": "Read parser health headers",
        "responses": {
          "200": {
            "description": "Health headers without a body."
          },
          "304": {
            "description": "Not modified."
          },
          "500": {
            "description": "Health inspection failed."
          },
          "503": {
            "description": "Stale health report."
          }
        }
      }
    },
    "/api/replay-icons": {
      "get": {
        "tags": ["icons"],
        "summary": "Resolve a Warcraft III icon",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object identifier or display name."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object identifier or display name."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "unit, building, ability, item, upgrade, or hero."
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object kind hint, including command and environment."
          },
          {
            "name": "fallback",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use none to return 404 instead of an SVG fallback."
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "SVG fallback size."
          },
          {
            "name": "passive",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "reforged",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "noViolence",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "debug",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use 1 for JSON resolution details."
          },
          {
            "name": "_stats",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use 1 for JSON index statistics."
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved icon, or an SVG fallback. With debug=1, returns JSON resolution information instead.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "304": {
            "description": "Not modified (ETag match)."
          },
          "404": {
            "description": "No icon found and fallback=none."
          }
        }
      },
      "head": {
        "tags": ["icons"],
        "summary": "Fetch icon headers without a body",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object identifier or display name."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object identifier or display name."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "unit, building, ability, item, upgrade, or hero."
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object kind hint, including command and environment."
          },
          {
            "name": "fallback",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use none to return 404 instead of an SVG fallback."
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "SVG fallback size."
          },
          {
            "name": "passive",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "reforged",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "noViolence",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "debug",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use 1 for JSON resolution details."
          },
          {
            "name": "_stats",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use 1 for JSON index statistics."
          }
        ],
        "responses": {
          "200": {
            "description": "Icon headers."
          },
          "304": {
            "description": "Not modified."
          },
          "404": {
            "description": "No icon found and fallback=none."
          }
        }
      },
      "post": {
        "tags": ["icons"],
        "summary": "Resolve a batch of icons",
        "description": "Accepts an array or { requests: [...] }. Processes only the first 100 entries and reports truncation. Maximum JSON body size is 128 KiB.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IconRequest"
                    }
                  },
                  {
                    "type": "object",
                    "required": ["requests"],
                    "properties": {
                      "requests": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/IconRequest"
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolution results keyed by request key, id, name, or array index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "options": {
        "tags": ["icons"],
        "summary": "List supported icon methods",
        "responses": {
          "204": {
            "description": "Allow: GET, HEAD, POST, OPTIONS."
          }
        }
      }
    },
    "/api/replay-icons/{asset}": {
      "parameters": [
        {
          "name": "asset",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Cache-friendly asset slug. Resolution still uses the query parameters."
        }
      ],
      "get": {
        "tags": ["icons"],
        "summary": "Resolve a Warcraft III icon",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object identifier or display name."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object identifier or display name."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "unit, building, ability, item, upgrade, or hero."
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object kind hint, including command and environment."
          },
          {
            "name": "fallback",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use none to return 404 instead of an SVG fallback."
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "SVG fallback size."
          },
          {
            "name": "passive",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "reforged",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "noViolence",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "debug",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use 1 for JSON resolution details."
          },
          {
            "name": "_stats",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use 1 for JSON index statistics."
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved icon, or an SVG fallback. With debug=1, returns JSON resolution information instead.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "304": {
            "description": "Not modified (ETag match)."
          },
          "404": {
            "description": "No icon found and fallback=none."
          }
        }
      },
      "head": {
        "tags": ["icons"],
        "summary": "Fetch icon headers without a body",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object identifier or display name."
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object identifier or display name."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "unit, building, ability, item, upgrade, or hero."
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Object kind hint, including command and environment."
          },
          {
            "name": "fallback",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use none to return 404 instead of an SVG fallback."
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "SVG fallback size."
          },
          {
            "name": "passive",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "reforged",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "noViolence",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Boolean preference."
          },
          {
            "name": "debug",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use 1 for JSON resolution details."
          },
          {
            "name": "_stats",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Use 1 for JSON index statistics."
          }
        ],
        "responses": {
          "200": {
            "description": "Icon headers."
          },
          "304": {
            "description": "Not modified."
          },
          "404": {
            "description": "No icon found and fallback=none."
          }
        }
      },
      "post": {
        "tags": ["icons"],
        "summary": "Resolve a batch of icons",
        "description": "Accepts an array or { requests: [...] }. Processes only the first 100 entries and reports truncation. Maximum JSON body size is 128 KiB.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IconRequest"
                    }
                  },
                  {
                    "type": "object",
                    "required": ["requests"],
                    "properties": {
                      "requests": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/IconRequest"
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolution results keyed by request key, id, name, or array index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "options": {
        "tags": ["icons"],
        "summary": "List supported icon methods",
        "responses": {
          "204": {
            "description": "Allow: GET, HEAD, POST, OPTIONS."
          }
        }
      }
    },
    "/api/replays/library": {
      "get": {
        "tags": ["library"],
        "summary": "List the current account's saved replays",
        "description": "Uses the site session when present. Without an account returns account: null and replays: []. If accounts are unconfigured, enabled is false.",
        "responses": {
          "200": {
            "description": "Account availability, account identity, and saved replay summaries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/replays/library/{hash}": {
      "parameters": [
        {
          "name": "hash",
          "in": "path",
          "required": true,
          "description": "SHA-256 content hash of an owned replay.",
          "schema": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        }
      ],
      "get": {
        "tags": ["library"],
        "summary": "Download an owned replay",
        "description": "Requires a signed-in site session. Mutations require an Origin header matching the request URL origin. Returns 503 when accounts are unconfigured or unavailable.",
        "responses": {
          "200": {
            "description": "Replay bytes.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": ["library"],
        "summary": "Select a player for an owned replay",
        "description": "Requires a signed-in site session. Mutations require an Origin header matching the request URL origin. Returns 503 when accounts are unconfigured or unavailable.",
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "Must equal the request URL origin (https://wc3replays.com in production).",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": ["playerId"],
                "properties": {
                  "playerId": {
                    "type": ["integer", "null"],
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Selection saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["library"],
        "summary": "Delete an owned replay",
        "description": "Requires a signed-in site session. Mutations require an Origin header matching the request URL origin. Returns 503 when accounts are unconfigured or unavailable.",
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "Must equal the request URL origin (https://wc3replays.com in production).",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Replay deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ok"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/replays/library/{hash}/share": {
      "parameters": [
        {
          "name": "hash",
          "in": "path",
          "required": true,
          "description": "SHA-256 content hash of an owned replay.",
          "schema": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        }
      ],
      "get": {
        "tags": ["library"],
        "summary": "Read publication status for an owned replay",
        "description": "Requires a signed-in site session. Mutations require an Origin header matching the request URL origin. Returns 503 when accounts are unconfigured or unavailable.",
        "responses": {
          "200": {
            "description": "Current share identifier, or null.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": ["library"],
        "summary": "Publish an allowlisted replay report",
        "description": "Requires a signed-in site session. Mutations require an Origin header matching the request URL origin. Returns 503 when accounts are unconfigured or unavailable. Requires explicit publication consent; does not publish raw replay bytes. JSON body is limited to 1024 bytes.",
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "Must equal the request URL origin (https://wc3replays.com in production).",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": ["publish"],
                "properties": {
                  "publish": {
                    "const": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Published share identifier.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["library"],
        "summary": "Revoke publication of an owned replay",
        "description": "Requires a signed-in site session. Mutations require an Origin header matching the request URL origin. Returns 503 when accounts are unconfigured or unavailable.",
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "description": "Must equal the request URL origin (https://wc3replays.com in production).",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Publication revoked (shareId: null).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Error": {
        "description": "Request rejected or service unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": ["error"],
              "properties": {
                "error": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "ParseSuccess": {
        "type": "object",
        "required": [
          "apiVersion",
          "presentationSchemaVersion",
          "ok",
          "status",
          "replay",
          "warnings"
        ],
        "properties": {
          "apiVersion": {
            "type": "integer"
          },
          "presentationSchemaVersion": {
            "type": "integer"
          },
          "ok": {
            "const": true
          },
          "status": {
            "const": 200
          },
          "replay": {
            "type": "object",
            "additionalProperties": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "ParseFailure": {
        "type": "object",
        "required": ["ok", "status", "error", "warnings"],
        "properties": {
          "ok": {
            "const": false
          },
          "status": {
            "type": "integer"
          },
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "IconRequest": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "fallback": {
            "type": "string"
          },
          "passive": {
            "type": "boolean"
          },
          "reforged": {
            "type": "boolean"
          },
          "noViolence": {
            "type": "boolean"
          }
        }
      },
      "Ok": {
        "type": "object",
        "required": ["ok"],
        "properties": {
          "ok": {
            "const": true
          }
        }
      },
      "ShareStatus": {
        "type": "object",
        "required": ["shareId"],
        "properties": {
          "shareId": {
            "type": ["string", "null"],
            "pattern": "^[a-f0-9]{48}$"
          }
        }
      }
    }
  }
}
