{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chatterapi-com/json-schema/chatterapi-com-reddit-thread-schema.json",
  "title": "RedditThread",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chatterapi-com-openapi.json#/components/schemas/RedditThread",
  "type": "object",
  "properties": {
    "post": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "fullname": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "author": {
              "type": [
                "string",
                "null"
              ]
            },
            "subreddit": {
              "type": "string"
            },
            "permalink": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "externalUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "score": {
              "type": [
                "number",
                "null"
              ]
            },
            "numComments": {
              "type": [
                "number",
                "null"
              ]
            },
            "upvoteRatio": {
              "type": [
                "number",
                "null"
              ]
            },
            "createdAt": {
              "type": "string",
              "description": "ISO 8601 UTC timestamp"
            },
            "nsfw": {
              "type": "boolean"
            },
            "locked": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "media": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "image",
                        "video",
                        "gallery"
                      ]
                    },
                    "urls": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "type",
                    "urls"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "id",
            "fullname",
            "title",
            "body",
            "author",
            "subreddit",
            "permalink",
            "url",
            "externalUrl",
            "score",
            "numComments",
            "upvoteRatio",
            "createdAt",
            "nsfw",
            "locked",
            "media"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "comments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "fullname": {
            "type": "string"
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "postId": {
            "type": [
              "string",
              "null"
            ]
          },
          "postTitle": {
            "type": [
              "string",
              "null"
            ]
          },
          "author": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": "string"
          },
          "bodyTruncated": {
            "type": "boolean"
          },
          "score": {
            "type": [
              "number",
              "null"
            ]
          },
          "subreddit": {
            "type": [
              "string",
              "null"
            ]
          },
          "permalink": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "ISO 8601 UTC timestamp"
          }
        },
        "required": [
          "id",
          "fullname",
          "parentId",
          "postId",
          "postTitle",
          "author",
          "body",
          "bodyTruncated",
          "score",
          "subreddit",
          "permalink",
          "url",
          "createdAt"
        ],
        "additionalProperties": false
      }
    },
    "unloadedReplyStubs": {
      "type": "number"
    },
    "reportedCommentCount": {
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "post",
    "comments",
    "unloadedReplyStubs",
    "reportedCommentCount"
  ],
  "additionalProperties": false
}