{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gameshot-games/json-schema/gameshot-games-story-response-schema.json",
  "title": "StoryResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gameshot-games-stories-api-openapi.yml#/components/schemas/StoryResponse",
  "type": "object",
  "required": [
    "schemaVersion",
    "story"
  ],
  "properties": {
    "schemaVersion": {
      "const": 1
    },
    "story": {
      "$ref": "#/$defs/Story"
    }
  },
  "$defs": {
    "Story": {
      "type": "object",
      "required": [
        "publicId",
        "title",
        "status",
        "sourceCount",
        "reportCount",
        "firstReportAt",
        "latestAt",
        "latest",
        "digest",
        "digestUpdatedAt",
        "links",
        "reports",
        "storyline",
        "related"
      ],
      "properties": {
        "publicId": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "settled"
          ]
        },
        "sourceCount": {
          "type": "integer",
          "minimum": 0
        },
        "reportCount": {
          "type": "integer",
          "minimum": 0
        },
        "firstReportAt": {
          "type": "string",
          "format": "date-time"
        },
        "latestAt": {
          "type": "string",
          "format": "date-time"
        },
        "latest": {
          "type": "string"
        },
        "digest": {
          "type": [
            "string",
            "null"
          ]
        },
        "digestUpdatedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "links": {
          "type": "object",
          "required": [
            "aihot"
          ],
          "properties": {
            "aihot": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "reports": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StoryReport"
          }
        },
        "storyline": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StoryNeighbor"
          }
        },
        "related": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StoryNeighbor"
          }
        }
      }
    },
    "StoryNeighbor": {
      "type": "object",
      "required": [
        "publicId",
        "title",
        "relation",
        "links"
      ],
      "properties": {
        "publicId": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "relation": {
          "type": "string"
        },
        "links": {
          "type": "object",
          "required": [
            "aihot",
            "api"
          ],
          "properties": {
            "aihot": {
              "type": "string",
              "format": "uri"
            },
            "api": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      }
    },
    "StoryReport": {
      "type": "object",
      "required": [
        "id",
        "title",
        "summary",
        "source",
        "publishedAt",
        "links"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "object",
          "required": [
            "name",
            "firstParty"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "firstParty": {
              "type": "boolean"
            }
          }
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time"
        },
        "links": {
          "type": "object",
          "required": [
            "aihot"
          ],
          "properties": {
            "aihot": {
              "type": "string",
              "format": "uri"
            },
            "original": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      }
    }
  }
}